/** * show * * @param string $url url * @param string $id id * @return \Xpressengine\Presenter\RendererInterface */ public function show($url, $id) { if ($this->permissionHandler->hasRead($this->boardId) === false) { throw new AccessDeniedHttpException(); } /** @var \Xpressengine\Plugins\Board\Controllers\DataImporter $dataImporter */ $dataImporter = app('xe.board.dataImporter')->init($this); // check short id generator /** @var \Xpressengine\Plugins\ShortIdGenerator\Plugin $shortIdGenerator */ $shortIdGenerator = app('xe.plugin.shortIdGenerator'); $shortIdEntity = $shortIdGenerator->get($id); if ($shortIdEntity !== null) { $id = $shortIdEntity->getOriginId(); } return Presenter::make('show', array_merge($dataImporter->show($id), $dataImporter->index())); }