Manual
API
hasClass ( string $class ) : bool
class
Returns true if the current node has the specified class name.
Examples
$node->hasClass('article');