PHP Class Bolt\Twig\Handler\WidgetHandler

Afficher le fichier Open project: bolt/bolt Class Usage Examples

Méthodes publiques

Méthode Description
__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.

Method Details

__construct() public méthode

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

countWidgets() public méthode

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
Résultat integer

getWidgets() public méthode

Gets a list of the registered widgets.
public getWidgets ( ) : array
Résultat array

hasWidgets() public méthode

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
Résultat boolean

widgets() public méthode

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
Résultat string | Twig_Markup