You are here

function _bootstrap_colorize_button in Express 8

Adds a specific Bootstrap class to color a button based on its text value.

// Before.
_bootstrap_colorize_button($element);

// After.
use Drupal\bootstrap\Utility\Element;
Element::create($element)
  ->colorize();

Parameters

array $element: The form element, passed by reference.

Deprecated

Will be removed in a future release.

See also

\Drupal\bootstrap\Utility\Element::colorize()

File

themes/contrib/bootstrap/deprecated.php, line 158
This contains deprecated functions that will be removed in a future release.

Code

function _bootstrap_colorize_button(array &$element) {
  Bootstrap::deprecated();
  Element::create($element)
    ->colorize();
}