You are here

function _bootstrap_colorize_text in Express 8

Matches a Bootstrap class based on a string value.

// Before.
$class = _bootstrap_colorize_text($string, $default);

// After.
use Drupal\bootstrap\Bootstrap;
$class = Bootstrap::cssClassFromString($string, $default);

Parameters

string $string: The string to match classes against.

string $default: The default class to return if no match is found.

Return value

string The Bootstrap class matched against the value of $haystack or $default if no match could be made.

Deprecated

Will be removed in a future release.

See also

\Drupal\bootstrap\Bootstrap::cssClassFromString()

File

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

Code

function _bootstrap_colorize_text($string, $default = '') {
  Bootstrap::deprecated();
  return Bootstrap::cssClassFromString($string, $default);
}