Skip to content

Kirby 5.0.4

SettingsButton::factory()

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

SettingsButton::factory() has been marked as unstable. It might be changed in a future Kirby major or minor release without being considered a breaking change. Use with caution.

SettingsButton::factory(Closure|array|string|bool $button = true, string|int|null $name = null, string|null $view = null, Kirby\Cms\ModelWithContent|Kirby\Cms\Language|null $model = null, array $data = [ ]): Kirby\Panel\Ui\Buttons\SettingsButton|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\Buttons\SettingsButtonornull

Parent class

Kirby\Panel\Ui\Buttons\SettingsButton inherited from Kirby\Panel\Ui\Buttons\ViewButton