public function Html::preprocess in Open Social 8.6
Same name in this branch
- 8.6 themes/socialblue/src/Plugin/Preprocess/Html.php \Drupal\socialblue\Plugin\Preprocess\Html::preprocess()
- 8.6 themes/socialbase/src/Plugin/Preprocess/Html.php \Drupal\socialbase\Plugin\Preprocess\Html::preprocess()
Same name and namespace in other branches
- 8.9 themes/socialblue/src/Plugin/Preprocess/Html.php \Drupal\socialblue\Plugin\Preprocess\Html::preprocess()
- 8 themes/socialblue/src/Plugin/Preprocess/Html.php \Drupal\socialblue\Plugin\Preprocess\Html::preprocess()
- 8.2 themes/socialblue/src/Plugin/Preprocess/Html.php \Drupal\socialblue\Plugin\Preprocess\Html::preprocess()
- 8.3 themes/socialblue/src/Plugin/Preprocess/Html.php \Drupal\socialblue\Plugin\Preprocess\Html::preprocess()
- 8.4 themes/socialblue/src/Plugin/Preprocess/Html.php \Drupal\socialblue\Plugin\Preprocess\Html::preprocess()
- 8.5 themes/socialblue/src/Plugin/Preprocess/Html.php \Drupal\socialblue\Plugin\Preprocess\Html::preprocess()
- 8.7 themes/socialblue/src/Plugin/Preprocess/Html.php \Drupal\socialblue\Plugin\Preprocess\Html::preprocess()
- 8.8 themes/socialblue/src/Plugin/Preprocess/Html.php \Drupal\socialblue\Plugin\Preprocess\Html::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 Html::preprocess
File
- themes/
socialblue/ src/ Plugin/ Preprocess/ Html.php, line 19
Class
- Html
- Pre-processes variables for the "html" theme hook.
Namespace
Drupal\socialblue\Plugin\PreprocessCode
public function preprocess(array &$variables, $hook, array $info) {
parent::preprocess($variables, $hook, $info);
$variables['colors'] = [];
foreach (color_get_palette($variables['theme']['name']) as $key => $value) {
$key = str_replace('-', '_', $key);
$variables['colors'][$key] = $value;
}
}