Location: PHPKode > projects > MappingWidgets > mappingwidgets-0.3.1/plugins/function.mappingwidget.php
<?php

function smarty_function_mappingwidget( $params, & $smarty )
{
    // get reference to widget manager
    $mappingWidgetManager = & $smarty->get_template_vars( 'mappingWidgetManager' );
    
    if( empty($params['type']) )
    {
        $smarty->trigger_error( "mappingwidget function: missing 'type' parameter" );
        return;
    }
    
    // create widget
    $widget = $mappingWidgetManager->createWidget( $params );
    
    $str = $widget->getBody( );
    return $str;
}

?>
Return current item: MappingWidgets