function _bootstrap_iconize_text
8.x-3.x deprecated.php | _bootstrap_iconize_text($string, $default = '') |
7.x-3.x common.inc | _bootstrap_iconize_text($string, $default = '') |
Matches a Bootstrap Glyphicon based on a string value.
// Before.
$icon = _bootstrap_iconize_text($string, $default);
// After.
use Drupal\bootstrap\Bootstrap;
$icon = Bootstrap::glyphiconFromString($string, ['#markup' => $default]);
Parameters
string $string: The string to match classes against.
string $default: The default icon to return if no match is found.
Return value
string The Bootstrap icon matched against the value of $haystack or $default if no match could be made.
Deprecated
Will be removed in a future release.
Source ./deprecated.php (line 534)
function _bootstrap_iconize_text($string, $default = '') {
Bootstrap::deprecated();
return Bootstrap::glyphiconFromString($string, ['#markup' => $default]);
}