button_yes_no_box(), button_allow_deny_box() html()

Yes / No and Allow / Deny as two toggle buttons, from the pair data handlers.

html()->button_yes_no_box($name, $values = [], $selected = null)
html()->button_allow_deny_box($name, $values = [], $selected = null)

Options

OptionMeaning
$name, $values, $selectedName; labels instead of the pair ([0 => ..., 1 => ...]); selected 0 or 1.

Example

Code

return html()->button_yes_no_box('is_public', [], 1) . ' ' . html()->button_allow_deny_box('access', [], 0);

See also: form/active_box, table/yes_no