/** * Find an attribute * * @param int $id * * @throws NotFoundHttpException * * @return AttributeInterface */ protected function findAttributeOr404($id) { $attribute = $this->attributeRepository->find($id); if (null === $attribute) { throw new NotFoundHttpException(sprintf('%s entity not found', $this->attributeManager->getAttributeClass())); } return $attribute; }
/** * Find an attribute * * @param integer $id * * @return AbstractAttribute * @throws \Symfony\Component\HttpKernel\Exception\NotFoundHttpException */ protected function findAttributeOr404($id) { return $this->findOr404($this->attributeManager->getAttributeClass(), $id); }
/** * Get the attribute FQCN. * * @return string */ public function getAttributeClass() { return $this->baseAttributeManager->getAttributeClass(); }