Skip to content

Kirby 6.0.0

ViewButton::factory()

Creates new view button by looking up the button in all areas, if referenced by name and resolving to proper instance

ViewButton::factory(Closure|array|string|bool $button = true, string|int|null $name = null, string|null $view = null, ModelWithContent|Language|null $model = null, array $data = []): ViewButton|null

Parameters

Name Type Default
$button Closureorarrayorstringorbool true
$name stringorintornull null
$view stringornull null
$model Kirby\Cms\ModelWithContentorKirby\Cms\Languageornull null
$data array []

Return types

Kirby\Panel\Ui\Button\ViewButtonornull

Parent class

Kirby\Panel\Ui\Button\ViewButton