/** * @throws MenuNotOpenException */ protected function assertMenuOpen() { if (!$this->parentMenu->isOpen()) { throw new MenuNotOpenException(); } }