class CanonicalLinkWidget extends BaseWidget (View source)

Traits

Properties

protected $name
protected $target
protected $zone
protected ExtensionInterface $extension from  BaseWidget
protected $priority
protected string $template from  BaseWidget
protected string $templateFolder from  BaseWidget
protected ?string $slug from  BaseWidget
protected int $cacheDuration from  BaseWidget

Methods

setTwig(Environment $twig)

No description

Environment
getTwig()

No description

setRequest(Request $request)

No description

Request
getRequest()

No description

setResponse(Response $response)

No description

Response
getResponse()

No description

setName(string $name)

No description

string
getName()

No description

setTarget(string $target)

No description

string
getTarget()

No description

setPriority(int $priority)

No description

int
getPriority()

No description

void
injectExtension(ExtensionInterface $extension)

No description

getExtension()

No description

string|null
__invoke(array $params = [])

Method to 'invoke' the widget. Simple wrapper around the 'run' method, which can be overridden in a custom Widget or trait

string|null
run(array $params = [])

Actual method that 'runs' the widget and returns the output. For reasons of extensibility: Do not call directly, but call $widget() to invoke.

setTemplate(string $template)

No description

string
getTemplate()

No description

string|null
getTemplateFolder()

No description

setZone(string $zone)

No description

string
getZone()

No description

string
getSlug()

No description

int
getCacheDuration()

No description

__construct(Canonical $canonical)

No description

Details

TwigTrait setTwig(Environment $twig)

Parameters

Environment $twig

Return Value

TwigTrait

Environment getTwig()

Return Value

Environment

RequestTrait setRequest(Request $request)

Parameters

Request $request

Return Value

RequestTrait

Request getRequest()

Return Value

Request

ResponseTrait setResponse(Response $response)

Parameters

Response $response

Return Value

ResponseTrait

Response getResponse()

Return Value

Response

BaseWidget setName(string $name)

Parameters

string $name

Return Value

BaseWidget

string getName()

Return Value

string

BaseWidget setTarget(string $target)

Parameters

string $target

Return Value

BaseWidget

string getTarget()

Return Value

string from Bolt\Widget\Injector\Target constants enum

BaseWidget setPriority(int $priority)

Parameters

int $priority

Return Value

BaseWidget

int getPriority()

Return Value

int

void injectExtension(ExtensionInterface $extension)

Parameters

ExtensionInterface $extension

Return Value

void

getExtension()

string|null __invoke(array $params = [])

Method to 'invoke' the widget. Simple wrapper around the 'run' method, which can be overridden in a custom Widget or trait

Parameters

array $params

Return Value

string|null

protected string|null run(array $params = [])

Actual method that 'runs' the widget and returns the output. For reasons of extensibility: Do not call directly, but call $widget() to invoke.

Parameters

array $params

Return Value

string|null

BaseWidget setTemplate(string $template)

Parameters

string $template

Return Value

BaseWidget

string getTemplate()

Return Value

string

string|null getTemplateFolder()

Return Value

string|null

BaseWidget setZone(string $zone)

Parameters

string $zone

Return Value

BaseWidget

string getZone()

Return Value

string from Bolt\Widget\Injector\RequestZone constants enum

string getSlug()

Return Value

string

int getCacheDuration()

Return Value

int

__construct(Canonical $canonical)

Parameters

Canonical $canonical