Snippet::factory()
Returns either an open snippet capturing slots or the template string for self-enclosed snippets
Snippet::factory(array|string|null $name, array $data = [ ], bool $slots = false): Kirby\Template\Snippet|string
Parameters
| Name | Type | Default |
|---|---|---|
| $name * | array|string|null |
– |
| $data | array |
[ ] |
| $slots | bool |
false |
Return type
Kirby\Template\Snippet|string