public function getItemHelper(array $item): ItemHelper
    {
        if ($this->level !== 1 && $item['type'] === 'folder') {
            return new HeaderItemHelper($item);
        } elseif ($this->level === 2 || ($this->level > 1 && $this->getPageType() === 'folder')) {
            return new DropdownItemHelper($item);
        } else {
            return new NavItemHelper($item);
        }
    }
public function getItemHelper(array $item): ItemHelper
    {
        if ($this->level !== 1 && $item['type'] === 'folder') {
            return new HeaderItemHelper($item);
        } elseif ($this->level === 2 || ($this->level > 1 && $this->getPageType() === 'folder')) {
            return new DropdownItemHelper($item);
        } else {
            return new NavItemHelper($item);
        }
    }
public function getItemHelper ( array $ item ) : ItemHelper { if ( $ this -> level !== 1 && $ item [ 'type' ] === 'folder' ) { return new HeaderItemHelper ( $ item ) ; } elseif ( $ this -> level === 2 || ( $ this -> level > 1 && $ this -> getPageType ( ) === 'folder' ) ) { return new DropdownItemHelper ( $ item ) ; } else { return new NavItemHelper ( $ item ) ; } }
Get an item helper for an item.

@param array $item Item data.

@return ItemHelper

@throws InvalidArgumentException If invalid data is given.
Get an item helper for an item .