Свойство | Тип | Описание | |
---|---|---|---|
$cache | |||
$injector | Bolt\Asset\Injector | ||
$queue | Queue with snippets of HTML to insert. | ||
$render | Twig_Environment |
Метод | Описание | |
---|---|---|
__construct ( Bolt\Asset\Injector $injector, |
Constructor. | |
add ( Bolt\Asset\Widget\WidgetAssetInterface $widget ) | Add a wiget to the queue. | |
clear ( ) | ||
countItemsInQueue ( string $location, string $zone = Zone::FRONTEND ) : boolean | Get the number of queued widgets. | |
get ( string $key ) : Bolt\Asset\Widget\WidgetAssetInterface | Get a widget from the queue. | |
getQueue ( ) : Bolt\Asset\Widget\WidgetAssetInterface[] | Get the queued widgets. | |
getRendered ( string $key ) : Twig_Markup | string | Get a rendered (and potentially cached) widget from the queue. | |
hasItemsInQueue ( string $location, string $zone = Zone::FRONTEND ) : boolean | Get the number of queued widgets. | |
process ( |
||
render ( string $location, string $zone = Zone::FRONTEND, string $wrapperTemplate = 'widgetwrapper.twig' ) : string | null | Render a location's widget. |
Метод | Описание | |
---|---|---|
addDeferredJavaScript ( Bolt\Asset\Widget\WidgetAssetInterface $widget, |
Insert a snippet of Javascript to fetch the actual widget's contents. | |
getHtml ( Bolt\Asset\Widget\WidgetAssetInterface $widget ) : string | Get the HTML content from the widget. |
public __construct ( Bolt\Asset\Injector $injector, |
||
$injector | Bolt\Asset\Injector | |
$cache | ||
$render | Twig_Environment |
public add ( Bolt\Asset\Widget\WidgetAssetInterface $widget ) | ||
$widget | Bolt\Asset\Widget\WidgetAssetInterface |
protected addDeferredJavaScript ( Bolt\Asset\Widget\WidgetAssetInterface $widget, |
||
$widget | Bolt\Asset\Widget\WidgetAssetInterface | |
$response |
public getQueue ( ) : Bolt\Asset\Widget\WidgetAssetInterface[] | ||
Результат | Bolt\Asset\Widget\WidgetAssetInterface[] |
public getRendered ( string $key ) : Twig_Markup | string | ||
$key | string | |
Результат | Twig_Markup | string |
public process ( |
||
$request | ||
$response |
public render ( string $location, string $zone = Zone::FRONTEND, string $wrapperTemplate = 'widgetwrapper.twig' ) : string | null | ||
$location | string | Location (e.g. 'dashboard_aside_top') |
$zone | string | Either Zone::FRONTEND or Zone::BACKEND |
$wrapperTemplate | string | Template file for wrapper |
Результат | string | null |
protected CacheProvider,Doctrine\Common\Cache $cache | ||
Результат |