public function setDefaultClass($class, $element = 'li'){
        if(in_array($element, ['a', 'li', 'ul']) && ((is_string($class) && !empty(trim($class))) || is_bool($class))) {
            $this->menuElements[strtolower($element).'_default'] = $class;
        }
        elseif(in_array($element, $this->allowedElements)){
            $this->menuElements[strtolower($element)] = $class;
        }
        return $this;
    }
public function setDefaultClass($class, $element = 'li'){
        if(in_array($element, ['a', 'li', 'ul']) && ((is_string($class) && !empty(trim($class))) || is_bool($class))) {
            $this->menuElements[strtolower($element).'_default'] = $class;
        }
        elseif(in_array($element, $this->allowedElements)){
            $this->menuElements[strtolower($element)] = $class;
        }
        return $this;
    }
public function setDefaultClass ( $ class , $ element = 'li' ) { if ( in_array ( $ element , [ 'a' , 'li' , 'ul' ] ) && ( ( is_string ( $ class ) && ! empty ( trim ( $ class ) ) ) || is_bool ( $ class ) ) ) { $ this -> menuElements [ strtolower ( $ element ) . '_default' ] = $ class ; } elseif ( in_array ( $ element , $ this -> allowedElements ) ) { $ this -> menuElements [ strtolower ( $ element ) ] = $ class ; } return $ this ; }
Change the default class assigned to all elements of a certain type in the menu
@param string|boolean $class This should be the class you want to assign to all elements or false for no default
@param string $element The element that you are changing the default for can be 'a', 'li' or 'ul'
@return $this
Change the default class assigned to all elements of a certain type in the menu