Html.php in Open Social 8.4
Same filename in this branch
Same filename and directory in other branches
- 8.9 themes/socialblue/src/Plugin/Preprocess/Html.php
- 8 themes/socialblue/src/Plugin/Preprocess/Html.php
- 8.2 themes/socialblue/src/Plugin/Preprocess/Html.php
- 8.3 themes/socialblue/src/Plugin/Preprocess/Html.php
- 8.5 themes/socialblue/src/Plugin/Preprocess/Html.php
- 8.6 themes/socialblue/src/Plugin/Preprocess/Html.php
- 8.7 themes/socialblue/src/Plugin/Preprocess/Html.php
- 8.8 themes/socialblue/src/Plugin/Preprocess/Html.php
Namespace
Drupal\socialblue\Plugin\PreprocessFile
themes/socialblue/src/Plugin/Preprocess/Html.phpView source
<?php
namespace Drupal\socialblue\Plugin\Preprocess;
use Drupal\socialbase\Plugin\Preprocess\Html as HtmlBase;
/**
* Pre-processes variables for the "html" theme hook.
*
* @ingroup plugins_preprocess
*
* @BootstrapPreprocess("html")
*/
class Html extends HtmlBase {
/**
* {@inheritdoc}
*/
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;
}
}
}