-
Notifications
You must be signed in to change notification settings - Fork 1
Classable
Mistralys edited this page Apr 29, 2021
·
1 revision
The classable trait and matching interface can be used to add HTML element class related methods like addClass()
, addClasses()
and the like.
Trait: Traits_Classable
Interface: Interface_Classable
use AppUtils;
class HTMLElement implements Interface_Classable
{
use Traits_Classable;
}
addClass()
addClasses()
-
classesToAttribute()
- Returns a string likeclass="foo bar"
-
classesToString()
- Returns a string likefoo bar
getClasses()
hasClass()
removeClass()
New here?
Have a look at the overview for a list of all helper classes available in the package.
Table of contents
Find the current page in the collapsible "Pages" list above, and expand the page, to view a table of contents.