You are here

public function ConfirmFormModal::preprocess in Open Social 8.5

Same name and namespace in other branches
  1. 8.9 themes/socialbase/src/Plugin/Preprocess/ConfirmFormModal.php \Drupal\socialbase\Plugin\Preprocess\ConfirmFormModal::preprocess()
  2. 8.2 themes/socialbase/src/Plugin/Preprocess/ConfirmFormModal.php \Drupal\socialbase\Plugin\Preprocess\ConfirmFormModal::preprocess()
  3. 8.3 themes/socialbase/src/Plugin/Preprocess/ConfirmFormModal.php \Drupal\socialbase\Plugin\Preprocess\ConfirmFormModal::preprocess()
  4. 8.4 themes/socialbase/src/Plugin/Preprocess/ConfirmFormModal.php \Drupal\socialbase\Plugin\Preprocess\ConfirmFormModal::preprocess()
  5. 8.6 themes/socialbase/src/Plugin/Preprocess/ConfirmFormModal.php \Drupal\socialbase\Plugin\Preprocess\ConfirmFormModal::preprocess()
  6. 8.7 themes/socialbase/src/Plugin/Preprocess/ConfirmFormModal.php \Drupal\socialbase\Plugin\Preprocess\ConfirmFormModal::preprocess()
  7. 8.8 themes/socialbase/src/Plugin/Preprocess/ConfirmFormModal.php \Drupal\socialbase\Plugin\Preprocess\ConfirmFormModal::preprocess()

Preprocess theme hook variables.

Parameters

array $variables: The variables array, passed by reference (modify in place).

string $hook: The name of the theme hook.

array $info: The theme hook info array.

Overrides PreprocessBase::preprocess

File

themes/socialbase/src/Plugin/Preprocess/ConfirmFormModal.php, line 19

Class

ConfirmFormModal
Pre-processes variables for the "confirm_form__modal" theme hook.

Namespace

Drupal\socialbase\Plugin\Preprocess

Code

public function preprocess(array &$variables, $hook, array $info) {
  parent::preprocess($variables, $hook, $info);
  $form =& $variables['form'];
  $variables['title'] = $form['#title'];
  $form['actions']['cancel']['#attributes']['class'] = [
    'dialog-cancel',
    'btn',
    'btn-default',
    'pull-left',
  ];
}