System\Classes\UiFactory\HasButtons
Public Methods
public static ajaxButton()
public static ajaxButton(
string $label = '',
string $handler = '',
string $icon = '',
bool $primary = '',
bool $secondary = false,
array $requestData = false,
$danger = false,
$hotkey = '',
$requestData = [],
$attributes = null
): System\Classes\ViewComponent|System\Classes\UiFactory\Migrate\AjaxButton
ajaxButton creates an AJAX button component
public static button()
public static button(
string $label = '',
string $href = '',
string $icon = '',
bool $primary = '',
bool $secondary = false,
$secondary = false,
$danger = false,
$hotkey = '',
$attributes = null
): System\Classes\ViewComponent|System\Classes\UiFactory\Migrate\Button
button creates a button component
public static dropdownButton()
public static dropdownButton(
string $label = '',
string $icon = '',
bool $primary = false,
bool $secondary = false,
bool $caret = true,
$attributes = null
): System\Classes\ViewComponent
dropdownButton creates a dropdown button component (slot-based)
Usage: <?php Ui::dropdownButton(label: 'Actions', secondary: true)->slot() ?> <?= Ui::dropdownItem(label: 'Edit', handler: 'onEdit') ?> <?php Ui::end() ?>
public static dropdownDivider()
public static dropdownDivider(): System\Classes\ViewComponent
dropdownDivider creates a dropdown menu separator
public static dropdownItem()
public static dropdownItem(
string $label = '',
string $handler = '',
string $href = '',
string $icon = '',
$attributes = null
): System\Classes\ViewComponent
dropdownItem creates a dropdown menu item component
public static iconButton()
public static iconButton(
string $label = '',
string $icon = '',
string $handler = '',
bool $danger = false,
$hotkey = '',
$attributes = null
): System\Classes\ViewComponent
iconButton creates an icon-only button component
public static popupButton()
public static popupButton(
string $label = '',
string $handler = '',
string $icon = '',
bool $primary = '',
bool $secondary = false,
array $requestData = false,
$danger = false,
$hotkey = '',
$requestData = [],
$attributes = null
): System\Classes\ViewComponent|System\Classes\UiFactory\Migrate\PopupButton
popupButton creates a popup button component