protected function attached($presenter) { parent::attached($presenter); if ($this->root && !$this->key) { $this->key = $this->root->getId(); } if (!$this->checkCurrentDir()) { throw new BadRequestException(); } }