public static Html::getClass($class)
Prepares a string for use as a valid class name.
Do not pass one string containing multiple classes as they will be incorrectly concatenated with dashes, i.e. "one two" will become "one-two".
string $class: The class name to clean.
string The cleaned class name.
public static function getClass($class) { if (!isset(static::$classes[$class])) { static::$classes[$class] = static::cleanCssIdentifier(Unicode::strtolower($class)); } return static::$classes[$class]; }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Component!Utility!Html.php/function/Html::getClass/8.1.x