new Snippet()
Creates a new snippet
new Snippet(string|null $file, array $data = [ ])
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
| $file | stringornull |
no default value | Full path to the PHP file of the snippet; can be null for "dummy" snippetsthat don't exist |
| $data | array |
[ ]
|
Associative array with variables that will be set inside the snippet |
Parent class
Kirby\Panel\Lab\Snippet
inherited from Kirby\Template\Snippet