/** * List all available menu items * * @param integer $parentId * @param integer $leftId * @param integer $rightId * * @return array */ public function menuItemsList($parentId = 0, $leftId = 0, $rightId = 0) { // Menüpunkte einbinden if (empty($this->menuItems)) { $this->menuItems = $this->menusCache->getMenusCache(); } $output = []; if (count($this->menuItems) > 0) { foreach ($this->menuItems as $row) { if (!($row['left_id'] >= $leftId && $row['right_id'] <= $rightId)) { $row['selected'] = $this->formsHelper->selectEntry('parent_id', $row['id'], $parentId); $row['spaces'] = str_repeat(' ', $row['level']); // Titel für den aktuellen Block setzen $output[$row['block_name']]['title'] = $row['block_title']; $output[$row['block_name']]['menu_id'] = $row['block_id']; $output[$row['block_name']]['items'][] = $row; } } } return $output; }