Simple utility for working with html classes as with set.
More...
|
static | parseClassString (string $classAttr) |
| Parse html class string into set (array of string=>bool) where key is class name and values is always true.
|
|
static | formClassString (array $classes) |
| Forms raw html class string from set of classes.
|
|
static | filterAllowedClasses (array $classes, array $allowedClasses, array $additional) |
| Filters set of classes by list of allowed classes.
|
|
Simple utility for working with html classes as with set.
◆ filterAllowedClasses()
static MobileFrontend\Transforms\Utils\HtmlClassUtils::filterAllowedClasses |
( |
array | $classes, |
|
|
array | $allowedClasses, |
|
|
array | $additional ) |
|
static |
Filters set of classes by list of allowed classes.
- Parameters
-
array | $classes | key-value array of html classes |
string[] | $allowedClasses | list of allowed classes |
string[] | $additional | list of additional styles should be added in front of list |
- Returns
- array
◆ formClassString()
static MobileFrontend\Transforms\Utils\HtmlClassUtils::formClassString |
( |
array | $classes | ) |
|
|
static |
Forms raw html class
string from set of classes.
Set is a key-value array where key is class name and value is boolean that determines wheather this class should be included to string or not.
- Parameters
-
array | $classes | set of classes that should be formed into string |
- Returns
- string
◆ parseClassString()
static MobileFrontend\Transforms\Utils\HtmlClassUtils::parseClassString |
( |
string | $classAttr | ) |
|
|
static |
Parse html class string into set (array of string=>bool) where key is class name and values is always true.
- Parameters
-
string | $classAttr | raw class attribute's string retrieved from html |
- Returns
- array
The documentation for this class was generated from the following file:
- includes/Transforms/Utils/HtmlClassUtils.php