Archives category.
@param int $id
@return PodiumResponse
@throws ModelNotFoundException
13800
public function archive(int $id): PodiumResponse
    {
        $categoryArchiver = $this->getArchiver($id);

        if ($categoryArchiver === null) {
            throw new ModelNotFoundException('Category of given ID can not be found.');
        }

        return $categoryArchiver->archive();
    }
700043
public function remove(int $id): PodiumResponse
    {
        $postRemover = $this->getRemover($id);

        if ($postRemover === null) {
            throw new ModelNotFoundException('Post of given ID can not be found.');
        }

        return $postRemover->remove();
    }
408808
protected function getGallery($id)
    {
        $gallery = $this->getGalleryManager()->findOneBy(['id' => $id]);

        if (null === $gallery) {
            throw new NotFoundHttpException(sprintf('Gallery (%d) not found', $id));
        }

        return $gallery;
    }
217143
public function remove(int $id): PodiumResponse
    {
        $forumRemover = $this->getRemover($id);

        if ($forumRemover === null) {
            throw new ModelNotFoundException('Forum of given ID can not be found.');
        }

        return $forumRemover->remove();
    }
103821
public static function getByIdentifier($id)
    {
        $file = config('filer.hash_routes') ? static::whereHash($id)->first() : static::find($id);

        if (!$file) {
            throw (new ModelNotFoundException)->setModel(static::class);
        }

        return $file;
    }
338551
public function makePublic($id, Request $request)
    {
        $this->authorize('createCategories');

        $category = $this->model()->where('private', 1)->find($id);

        return $this->updateModel($category, ['private' => 0]);
    }
521470
private function find($id): ?Model
    {
        try {
            return $this->repository->findOrFail($id);
        } catch (ModelNotFoundException $exception) {
            return null;
        }
    }
509028
protected function findModel($id)
    {
        if (is_array($id)) {
            $model = TaxonomyVocabulary::findAll($id);
        } else {
            $model = TaxonomyVocabulary::findOne($id);
        }
        if ($model !== null) {
            return $model;
        } else {
            throw new HttpException(404);
        }
    }
1024040
public function load($id)
    {
        $rows = $this->sectionGateway->loadSectionData($id);

        if (empty($rows)) {
            throw new NotFound('Section', $id);
        }

        return $this->createSectionFromArray(reset($rows));
    }
751176
public function getOrFail($id)
    {
        if ($model = $this->get($id)) {
            return $model;
        }

        throw (new NotFoundException("No results for id $id"))->setModel(get_class($this->model));
    }
1090980
protected function findModel($id)
    {
        $model = $this->module->model('Content')->findOne($id);
        if ($model !== null) {
            return $model;
        } else {
            throw new NotFoundHttpException('The requested page does not exist.');
        }
    }
60949
public function showByIdAction($id)
    {
        $manager = $this->get('compo_news.manager.news');

        $article = $manager->find($id);

        if (!$article) {
            throw $this->createNotFoundException('compo_news.exception.not_found_news');
        }

        return $this->redirectToRoute('compo_news_show_by_slug', ['slug' => $article->getSlug()], 301);
    }
242376
public function remove(int $id): PodiumResponse
    {
        $categoryRemover = $this->getRemover($id);

        if ($categoryRemover === null) {
            throw new ModelNotFoundException('Category of given ID can not be found.');
        }

        return $categoryRemover->remove();
    }
818733
public function revive(int $id): PodiumResponse
    {
        $postArchiver = $this->getArchiver($id);

        if ($postArchiver === null) {
            throw new ModelNotFoundException('Post of given ID can not be found.');
        }

        return $postArchiver->revive();
    }
85440
public function lists($id = 0)
    {
        $response = $this->http->get(self::API_GET.'?id='.$id);

        return $response['department'];
    }
1003972
public function findModel($id)
    {
        if($this->_model === null) 
        {
            if($this->_model = $id ? Author::findOne($id) : null) 
            {
                return $this->_model;
            } else {
                throw new NotFoundHttpException(Module::t('core', 'The requested model does not exist.'));
            }
        }
    }
239342
protected function findModel($id)
    {
        $class = $this->modelClass;
        if (($model = $class::findOne($id)) !== null) {
            return $model;
        } else {
            throw new NotFoundHttpException('The requested page does not exist.');
        }
    }