public function Table::preprocessVariables in Open Social 8.5
Same name and namespace in other branches
- 8.9 themes/socialbase/src/Plugin/Preprocess/Table.php \Drupal\socialbase\Plugin\Preprocess\Table::preprocessVariables()
- 8 themes/socialbase/src/Plugin/Preprocess/Table.php \Drupal\socialbase\Plugin\Preprocess\Table::preprocessVariables()
- 8.2 themes/socialbase/src/Plugin/Preprocess/Table.php \Drupal\socialbase\Plugin\Preprocess\Table::preprocessVariables()
- 8.3 themes/socialbase/src/Plugin/Preprocess/Table.php \Drupal\socialbase\Plugin\Preprocess\Table::preprocessVariables()
- 8.4 themes/socialbase/src/Plugin/Preprocess/Table.php \Drupal\socialbase\Plugin\Preprocess\Table::preprocessVariables()
- 8.6 themes/socialbase/src/Plugin/Preprocess/Table.php \Drupal\socialbase\Plugin\Preprocess\Table::preprocessVariables()
- 8.7 themes/socialbase/src/Plugin/Preprocess/Table.php \Drupal\socialbase\Plugin\Preprocess\Table::preprocessVariables()
- 8.8 themes/socialbase/src/Plugin/Preprocess/Table.php \Drupal\socialbase\Plugin\Preprocess\Table::preprocessVariables()
Preprocess the variables array.
Parameters
\Drupal\bootstrap\Utility\Variables $variables: The Variables object.
Overrides Table::preprocessVariables
File
- themes/
socialbase/ src/ Plugin/ Preprocess/ Table.php, line 20
Class
- Table
- Pre-processes variables for the "table" theme hook.
Namespace
Drupal\socialbase\Plugin\PreprocessCode
public function preprocessVariables(Variables $variables) {
if (isset($variables['attributes']['id']) && strpos($variables['attributes']['id'], 'edit-field-files') !== FALSE) {
$variables['attributes']['class'][] = 'tablesaw';
$variables['attributes']['data-tablesaw-mode'] = 'stack';
}
parent::preprocessVariables($variables);
}