setCacheBackend(\Drupal::cache('discovery'), 'theme:' . $theme->getName() . ':prerender', $this->getCacheTags()); } /** * Pre-render render array element callback. * * @param array $element * The render array element. * * @return array * The modified render array element. */ public static function preRender(array $element) { if (!empty($element['#bootstrap_ignore_pre_render'])) { return $element; } $e = Element::create($element); if ($e->isType('machine_name')) { $e->addClass('form-inline', 'wrapper_attributes'); } // Add smart descriptions to the element, if necessary. $e->smartDescription(); return $element; } }