PHP 클래스 Bolt\Asset\Widget\Queue

저자: Gawain Lynch ([email protected])
저자: Bob den Otter ([email protected])
상속: implements Bolt\Asset\QueueInterface, use trait Bolt\Asset\AssetSortTrait
파일 보기 프로젝트 열기: bolt/bolt

보호된 프로퍼티들

프로퍼티 타입 설명
$cache Doctrine\Common\Cache\CacheProvider
$injector Bolt\Asset\Injector
$queue Queue with snippets of HTML to insert.
$render Twig_Environment

공개 메소드들

메소드 설명
__construct ( Bolt\Asset\Injector $injector, CacheProvider $cache, Twig_Environment $render ) 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 ( Request $request, Response $response )
render ( string $location, string $zone = Zone::FRONTEND, string $wrapperTemplate = 'widgetwrapper.twig' ) : string | null Render a location's widget.

보호된 메소드들

메소드 설명
addDeferredJavaScript ( Bolt\Asset\Widget\WidgetAssetInterface $widget, Response $response ) 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.

메소드 상세

__construct() 공개 메소드

NOTE: Constructor type hint for TwigEnvironment omitted for BC, add in v4
public __construct ( Bolt\Asset\Injector $injector, CacheProvider $cache, Twig_Environment $render )
$injector Bolt\Asset\Injector
$cache Doctrine\Common\Cache\CacheProvider
$render Twig_Environment

add() 공개 메소드

Add a wiget to the queue.
public add ( Bolt\Asset\Widget\WidgetAssetInterface $widget )
$widget Bolt\Asset\Widget\WidgetAssetInterface

addDeferredJavaScript() 보호된 메소드

Insert a snippet of Javascript to fetch the actual widget's contents.
protected addDeferredJavaScript ( Bolt\Asset\Widget\WidgetAssetInterface $widget, Response $response )
$widget Bolt\Asset\Widget\WidgetAssetInterface
$response Symfony\Component\HttpFoundation\Response

clear() 공개 메소드

public clear ( )

countItemsInQueue() 공개 메소드

Get the number of queued widgets.
public countItemsInQueue ( string $location, string $zone = Zone::FRONTEND ) : boolean
$location string Location (e.g. 'dashboard_aside_top')
$zone string Either Zone::FRONTEND or Zone::BACKEND
리턴 boolean

get() 공개 메소드

Get a widget from the queue.
public get ( string $key ) : Bolt\Asset\Widget\WidgetAssetInterface
$key string
리턴 Bolt\Asset\Widget\WidgetAssetInterface

getHtml() 보호된 메소드

Get the HTML content from the widget.
protected getHtml ( Bolt\Asset\Widget\WidgetAssetInterface $widget ) : string
$widget Bolt\Asset\Widget\WidgetAssetInterface
리턴 string

getQueue() 공개 메소드

Get the queued widgets.
public getQueue ( ) : Bolt\Asset\Widget\WidgetAssetInterface[]
리턴 Bolt\Asset\Widget\WidgetAssetInterface[]

getRendered() 공개 메소드

Get a rendered (and potentially cached) widget from the queue.
public getRendered ( string $key ) : Twig_Markup | string
$key string
리턴 Twig_Markup | string

hasItemsInQueue() 공개 메소드

Get the number of queued widgets.
public hasItemsInQueue ( string $location, string $zone = Zone::FRONTEND ) : boolean
$location string Location (e.g. 'dashboard_aside_top')
$zone string Either Zone::FRONTEND or Zone::BACKEND
리턴 boolean

process() 공개 메소드

public process ( Request $request, Response $response )
$request Symfony\Component\HttpFoundation\Request
$response Symfony\Component\HttpFoundation\Response

render() 공개 메소드

Render a location's widget.
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

프로퍼티 상세

$cache 보호되어 있는 프로퍼티

protected CacheProvider,Doctrine\Common\Cache $cache
리턴 Doctrine\Common\Cache\CacheProvider

$injector 보호되어 있는 프로퍼티

protected Injector,Bolt\Asset $injector
리턴 Bolt\Asset\Injector

$queue 보호되어 있는 프로퍼티

Queue with snippets of HTML to insert.
protected $queue

$render 보호되어 있는 프로퍼티

protected Twig_Environment $render
리턴 Twig_Environment