You are here

protected function DropdownActions::preprocessLinks in Open Social 8.6

Same name and namespace in other branches
  1. 8.9 themes/socialbase/src/Plugin/Preprocess/DropdownActions.php \Drupal\socialbase\Plugin\Preprocess\DropdownActions::preprocessLinks()
  2. 8.5 themes/socialbase/src/Plugin/Preprocess/DropdownActions.php \Drupal\socialbase\Plugin\Preprocess\DropdownActions::preprocessLinks()
  3. 8.7 themes/socialbase/src/Plugin/Preprocess/DropdownActions.php \Drupal\socialbase\Plugin\Preprocess\DropdownActions::preprocessLinks()
  4. 8.8 themes/socialbase/src/Plugin/Preprocess/DropdownActions.php \Drupal\socialbase\Plugin\Preprocess\DropdownActions::preprocessLinks()

Function to preprocess the links.

Overrides Dropdown::preprocessLinks

File

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

Class

DropdownActions
Pre-processes variables for "bootstrap_dropdown__operations__actions" hook.

Namespace

Drupal\socialbase\Plugin\Preprocess

Code

protected function preprocessLinks(Variables $variables) {
  parent::preprocessLinks($variables);
  $variables['btn_context'] = 'actions';
  $variables->toggle['#split_button_attributes']['class'][] = 'pull-right';
  unset($variables->toggle['#attributes']['class']);
}