Ouzo\AutoloadNamespaces::getWidgetNamespace PHP Method

getWidgetNamespace() public static method

public static getWidgetNamespace ( )
    public static function getWidgetNamespace()
    {
        $controllerPath = Config::getValue('namespace', 'widget');
        return $controllerPath ? $controllerPath : "\\Application\\Widget\\";
    }

Usage Example

Example #1
0
function renderWidget($widgetName)
{
    $className = ucfirst($widgetName);
    $viewWidget = new View($className . '/' . $widgetName);
    $classLoad = AutoloadNamespaces::getWidgetNamespace() . $className;
    $widget = new $classLoad($viewWidget);
    return $widget->render();
}