Ouzo\AutoloadNamespaces::getWidgetNamespace PHP Метод

getWidgetNamespace() публичный статический Метод

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

Usage 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();
}