/** * Vraci jestli ma alespon jednoho potomka v menu * @return bool */ public function hasChildrenInMenu() { try { if (!parent::hasChildren()) { return false; } foreach ($this->getChildNodesIterator() as $child) { if ($child->in_menu) { return true; } } return false; } catch (Exception $e) { throw $e; } }