protected function Dropdown::preprocessLinks in Open Social 8.3
Same name and namespace in other branches
- 8.9 themes/socialbase/src/Plugin/Preprocess/Dropdown.php \Drupal\socialbase\Plugin\Preprocess\Dropdown::preprocessLinks()
- 8 themes/socialbase/src/Plugin/Preprocess/Dropdown.php \Drupal\socialbase\Plugin\Preprocess\Dropdown::preprocessLinks()
- 8.2 themes/socialbase/src/Plugin/Preprocess/Dropdown.php \Drupal\socialbase\Plugin\Preprocess\Dropdown::preprocessLinks()
- 8.4 themes/socialbase/src/Plugin/Preprocess/Dropdown.php \Drupal\socialbase\Plugin\Preprocess\Dropdown::preprocessLinks()
- 8.5 themes/socialbase/src/Plugin/Preprocess/Dropdown.php \Drupal\socialbase\Plugin\Preprocess\Dropdown::preprocessLinks()
- 8.6 themes/socialbase/src/Plugin/Preprocess/Dropdown.php \Drupal\socialbase\Plugin\Preprocess\Dropdown::preprocessLinks()
- 8.7 themes/socialbase/src/Plugin/Preprocess/Dropdown.php \Drupal\socialbase\Plugin\Preprocess\Dropdown::preprocessLinks()
- 8.8 themes/socialbase/src/Plugin/Preprocess/Dropdown.php \Drupal\socialbase\Plugin\Preprocess\Dropdown::preprocessLinks()
Function to preprocess the links.
Overrides BootstrapDropdown::preprocessLinks
File
- themes/
socialbase/ src/ Plugin/ Preprocess/ Dropdown.php, line 40
Class
- Dropdown
- Pre-processes variables for the "bootstrap_dropdown" theme hook.
Namespace
Drupal\socialbase\Plugin\PreprocessCode
protected function preprocessLinks(Variables $variables) {
parent::preprocessLinks($variables);
$operations = !!Unicode::strpos($variables->theme_hook_original, 'operations');
// Make operations button small, not smaller ;).
// Bootstrap basetheme override.
if ($operations) {
$variables->toggle['#attributes']['class'] = [
'btn-sm',
];
$variables['btn_context'] = 'operations';
$variables['alignment'] = 'right';
}
}