RegisterResourceTokenParser

Type
Class
Namespace
craft\web\twig\tokenparsers
Inherits
craft\web\twig\tokenparsers\RegisterResourceTokenParser » Twig\TokenParser\AbstractTokenParser
Since
3.0.0

Class RegisterResourceTokenParser

View source (opens new window)

# Public Properties

Property Description
allowOptions boolean (opens new window) – Whether the tag can specify additional options
allowPosition boolean (opens new window) – Whether the tag can specify the position of the resource
allowRuntimePosition boolean (opens new window) – Whether the tag can specify a runtime-based position (load/ready)
allowTagPair boolean (opens new window) – Whether the tag supports a tag pair mode for capturing the JS/CSS
defaultPosition integer (opens new window), null (opens new window) – The default $position value that should be possed to the method, if it has a $position argument.
method string (opens new window) – The View method the tag represents
newCode string (opens new window), null (opens new window) – The new template code that should be used if this tag is deprecated
tag string (opens new window) – The tag name

# allowOptions

Type
boolean (opens new window)
Default value
false

Whether the tag can specify additional options

View source (opens new window)

# allowPosition

Type
boolean (opens new window)
Default value
false

Whether the tag can specify the position of the resource

View source (opens new window)

# allowRuntimePosition

Type
boolean (opens new window)
Default value
false

Whether the tag can specify a runtime-based position (load/ready)

View source (opens new window)

# allowTagPair

Type
boolean (opens new window)
Default value
false

Whether the tag supports a tag pair mode for capturing the JS/CSS

View source (opens new window)

# defaultPosition

Type
integer (opens new window), null (opens new window)
Default value
null
Since
3.6.11

The default $position value that should be possed to the method, if it has a $position argument.

View source (opens new window)

# method

Type
string (opens new window)
Default value
null

The View method the tag represents

View source (opens new window)

# newCode

Type
string (opens new window), null (opens new window)
Default value
null

The new template code that should be used if this tag is deprecated

View source (opens new window)

# tag

Type
string (opens new window)
Default value
null

The tag name

View source (opens new window)

# Public Methods

# __construct()

View source (opens new window)

Arguments

# decideBlockEnd()

View source (opens new window)

Arguments

  • $token (\Twig\Token)

Returns

boolean (opens new window)

# getTag()

View source (opens new window)

# parse()

View source (opens new window)

Arguments

  • $token