3 namespace Drupal\environment_indicator\Element;
5 use Drupal\Core\Render\Element\Container;
8 * Provides a render element to add the environment indicator to the page.
12 * $page_top['indicator'] = [
13 * '#type' => 'environment_indicator',
14 * '#title' => t('Acceptance'),
15 * '#description' => t('Sprint 9'),
16 * '#attributes' => ['class' => 'custom-class'],
17 * '#fg_color' => '#123412',
18 * '#bg_color' => 'FEDCBA9',
22 * @RenderElement("environment_indicator")
24 class EnvironmentIndicator extends Container {
29 public function getInfo() {
30 $info = parent::getInfo();
31 $info['#theme_wrappers'][] = 'environment_indicator';