public static function PrerenderManager::preRender in Express 8
Pre-render render array element callback.
Parameters
array $element: The render array element.
Return value
array The modified render array element.
File
- themes/
contrib/ bootstrap/ src/ Plugin/ PrerenderManager.php, line 39 - Contains \Drupal\bootstrap\Plugin\PrerenderManager.
Class
- PrerenderManager
- Manages discovery and instantiation of Bootstrap pre-render callbacks.
Namespace
Drupal\bootstrap\PluginCode
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;
}