protected function setDefaultConfig()
    {
        if ($this->data['config']) {
            $this->config = $this->data['config'];
        }
        if (in_array($this->data['type'], ['cat', 'category'])) {
            $this->config = ['hierarchical' => true];
        }
        if ($this->data['links']) {
            $this->links = $this->data['links'];
        }

        return $this;
    }
protected function setDefaultConfig()
    {
        if ($this->data['config']) {
            $this->config = $this->data['config'];
        }
        if (in_array($this->data['type'], ['cat', 'category'])) {
            $this->config = ['hierarchical' => true];
        }
        if ($this->data['links']) {
            $this->links = $this->data['links'];
        }

        return $this;
    }
protected function setDefaultConfig ( ) { if ( $ this -> data [ 'config' ] ) { $ this -> config = $ this -> data [ 'config' ] ; } if ( in_array ( $ this -> data [ 'type' ] , [ 'cat' , 'category' ] ) ) { $ this -> config = [ 'hierarchical' => true ] ; } if ( $ this -> data [ 'links' ] ) { $ this -> links = $ this -> data [ 'links' ] ; } return $ this ; }
Set config defaults

Make public and change menu position
@return $this
Set config defaults