You are here

function fasttoggle_do_option_confirm in Fasttoggle 7

Confirmation form for the option change of a object.

Parameters

array $form: The form render array.

array $form_state: The form state array.

string $object_type: The type of object being used.

string $title: The title for the attribute.

string $option: The potential new value for the object attribute.

Return value

array The render array for the confirmation dialog.

1 string reference to 'fasttoggle_do_option_confirm'
fasttoggle_do_toggle_option in ./fasttoggle.module
Handle a request to toggle an option.

File

./fasttoggle.module, line 711
Enables fast toggling of binary or not so binary settings.

Code

function fasttoggle_do_option_confirm(array $form, array $form_state, $object_type, $title, $option) {
  return confirm_form([], t('Are you sure you want to set the %obj_type %title to %option?', [
    '%obj_type' => $object_type,
    '%title' => $title,
    '%option' => $option,
  ]), $_GET['destination'] ? $_GET['destination'] : $object_type . '/' . $object->{$id_field}, '', t('Change'), t('Cancel'));
}