RainLab\Pages\Classes\Menu::getItemsAttribute PHP Method

getItemsAttribute() public method

Items are objects of the \RainLab\Pages\Classes\MenuItem class.
public getItemsAttribute ( ) : array
return array
    public function getItemsAttribute()
    {
        if (array_key_exists('items', $this->attributes)) {
            return $this->attributes['items'];
        }
        if ($items = array_get($this->parseContent(), 'items')) {
            $itemObjects = MenuItem::initFromArray($items);
        } else {
            $itemObjects = [];
        }
        return $this->attributes['items'] = $itemObjects;
    }