PHP Класс Bolt\Twig\Handler\WidgetHandler

Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
__construct ( Silex\Application $app )
countWidgets ( string $location = null, string $zone = Zone::FRONTEND ) : integer Return the number of widgets in the queue for a given type / location.
getWidgets ( ) : array Gets a list of the registered widgets.
hasWidgets ( string $location = null, string $zone = Zone::FRONTEND ) : boolean Check if a type / location has widgets in the queue.
widgets ( string $location = null, string $zone = Zone::FRONTEND, string $wrapper = 'widgetwrapper.twig' ) : string | Twig_Markup Renders a particular widget type on the given location.

Описание методов

__construct() публичный Метод

public __construct ( Silex\Application $app )
$app Silex\Application

countWidgets() публичный Метод

Return the number of widgets in the queue for a given type / location.
public countWidgets ( string $location = null, string $zone = Zone::FRONTEND ) : integer
$location string Location (e.g. 'dashboard_aside_top')
$zone string Either Zone::FRONTEND or Zone::BACKEND
Результат integer

getWidgets() публичный Метод

Gets a list of the registered widgets.
public getWidgets ( ) : array
Результат array

hasWidgets() публичный Метод

Check if a type / location has widgets in the queue.
public hasWidgets ( string $location = null, string $zone = Zone::FRONTEND ) : boolean
$location string Location (e.g. 'dashboard_aside_top')
$zone string Either Zone::FRONTEND or Zone::BACKEND
Результат boolean

widgets() публичный Метод

Renders a particular widget type on the given location.
public widgets ( string $location = null, string $zone = Zone::FRONTEND, string $wrapper = 'widgetwrapper.twig' ) : string | Twig_Markup
$location string Location (e.g. 'dashboard_aside_top')
$zone string Either Zone::FRONTEND or Zone::BACKEND
$wrapper string
Результат string | Twig_Markup