RegisterResourceTokenParser ​
- Type
- Class
- Namespace
- craft\web\twig\tokenparsers
- Inherits
- craft\web\twig\tokenparsers\RegisterResourceTokenParser »
Twig\TokenParser\AbstractTokenParser - Since
- 3.0.0
Class RegisterResourceTokenParser
Public Properties ​
| Property | Description |
|---|---|
| allowOptions | boolean – Whether the tag can specify additional options |
| allowPosition | boolean – Whether the tag can specify the position of the resource |
| allowRuntimePosition | boolean – Whether the tag can specify a runtime-based position (load/ready) |
| allowTagPair | boolean – Whether the tag supports a tag pair mode for capturing the JS/CSS |
| defaultPosition | integer, null – The default $position value that should be possed to the method, if it has a $position argument. |
| method | string – The View method the tag represents |
| tag | string – The tag name |
allowOptions ​
- Type
- boolean
- Default value
false
Whether the tag can specify additional options
allowPosition ​
- Type
- boolean
- Default value
false
Whether the tag can specify the position of the resource
allowRuntimePosition ​
- Type
- boolean
- Default value
false
Whether the tag can specify a runtime-based position (load/ready)
allowTagPair ​
- Type
- boolean
- Default value
false
Whether the tag supports a tag pair mode for capturing the JS/CSS
defaultPosition ​
The default $position value that should be possed to the method, if it has a $position argument.
method ​
- Type
- string
- Default value
null
The View method the tag represents
tag ​
- Type
- string
- Default value
null
The tag name
Public Methods ​
| Method | Description |
|---|---|
| __construct() | |
| decideBlockEnd() | |
| getTag() | |
| parse() |
__construct() ​
Arguments ​
$tag(string) – The tag name$method(string) – The View method the tag represents$config(array) – Name-value pairs that will be used to initialize the object properties
decideBlockEnd() ​
Arguments ​
$token(\Twig\Token)
Returns ​
getTag() ​
parse() ​
Arguments ​
$token