Head extends AbstractExtension
Class to show/capture head/inline scripts/styles and files.
Table of Contents
- $HeadLink : mixed
- $HeadMeta : mixed
- $HeadScript : mixed
- $HeadStyle : mixed
- $HeadTitle : mixed
- $InlineScript : mixed
- $serviceManager : mixed
- getContainer() : object
- Get container.
- getFunctions() : mixed
- getName() : mixed
- {@inheritdoc}
- headLink() : HeadLink
- View Helper Method.
- headMeta() : HeadMeta
- Retrieve object instance; optionally add meta tag.
- headScript() : HeadScript
- Return headScript object.
- headStyle() : HeadStyle
- Return headStyle object.
- headTitle() : HeadTitle
- Retrieve placeholder for title element and optionally set state.
- inlineScript() : InlineScript
- Return InlineScript object.
- setContainer() : mixed
- Set container (Service Manager).
- getInstance() : object
- Get intance of Laminas View Head*.
Properties
$HeadLink
protected
mixed
$HeadLink
$HeadMeta
protected
mixed
$HeadMeta
$HeadScript
protected
mixed
$HeadScript
$HeadStyle
protected
mixed
$HeadStyle
$HeadTitle
protected
mixed
$HeadTitle
$InlineScript
protected
mixed
$InlineScript
$serviceManager
protected
mixed
$serviceManager
Methods
getContainer()
Get container.
public
getContainer([string $name = null ]) : object
Parameters
- $name : string = null
Return values
object —getFunctions()
public
getFunctions() : mixed
Return values
mixed —getName()
{@inheritdoc}
public
getName() : mixed
Return values
mixed —headLink()
View Helper Method.
public
headLink([array<string|int, mixed> $attributes = null ][, string $placement = Placeholder::APPEND ]) : HeadLink
Parameters
- $attributes : array<string|int, mixed> = null
- $placement : string = Placeholder::APPEND
Return values
HeadLink —headMeta()
Retrieve object instance; optionally add meta tag.
public
headMeta([string $content = null ][, string $keyValue = null ][, string $keyType = 'name' ][, array<string|int, mixed> $modifiers = [] ][, string $placement = Placeholder::APPEND ]) : HeadMeta
Parameters
- $content : string = null
- $keyValue : string = null
- $keyType : string = 'name'
- $modifiers : array<string|int, mixed> = []
- $placement : string = Placeholder::APPEND
Return values
HeadMeta —headScript()
Return headScript object.
public
headScript([string $mode = HeadScript::FILE ][, string $spec = null ][, string $placement = 'APPEND' ][, array<string|int, mixed> $attrs = [] ][, string $type = 'text/javascript' ]) : HeadScript
Parameters
- $mode : string = HeadScript::FILE
-
Script or file
- $spec : string = null
-
Script/url
- $placement : string = 'APPEND'
-
Append, prepend, or set
- $attrs : array<string|int, mixed> = []
-
Array of script attributes
- $type : string = 'text/javascript'
-
Script type and/or array of script attributes
Return values
HeadScript —headStyle()
Return headStyle object.
public
headStyle([string $content = null ][, string $placement = 'APPEND' ][, string|array<string|int, mixed> $attributes = [] ]) : HeadStyle
Parameters
- $content : string = null
-
Stylesheet contents
- $placement : string = 'APPEND'
-
Append, prepend, or set
- $attributes : string|array<string|int, mixed> = []
-
Optional attributes to utilize
Return values
HeadStyle —headTitle()
Retrieve placeholder for title element and optionally set state.
public
headTitle([string $title = null ][, string $setType = null ]) : HeadTitle
Parameters
- $title : string = null
- $setType : string = null
Return values
HeadTitle —inlineScript()
Return InlineScript object.
public
inlineScript([string $mode = InlineScript::FILE ][, string $spec = null ][, string $placement = 'APPEND' ][, array<string|int, mixed> $attrs = [] ][, string $type = 'text/javascript' ]) : InlineScript
Parameters
- $mode : string = InlineScript::FILE
-
Script or file
- $spec : string = null
-
Script/url
- $placement : string = 'APPEND'
-
Append, prepend, or set
- $attrs : array<string|int, mixed> = []
-
Array of script attributes
- $type : string = 'text/javascript'
-
Script type and/or array of script attributes
Return values
InlineScript —setContainer()
Set container (Service Manager).
public
setContainer(ContainerInterface $container) : mixed
Parameters
- $container : ContainerInterface
Return values
mixed —getInstance()
Get intance of Laminas View Head*.
private
getInstance(string $instance) : object
Parameters
- $instance : string