/**
  * @param int $id
  *
  * @return AttributeGroupInterface
  */
 protected function findAttributeGroupOr404($id)
 {
     $result = $this->attributeGroupRepo->find($id);
     if (!$result) {
         throw $this->createNotFoundException(sprintf('Attribute group not found'));
     }
     return $result;
 }
 /**
  * @param int $id
  *
  * @return AttributeGroupInterface
  */
 protected function findAttributeGroupOr404($id)
 {
     $result = $this->attributeGroupRepo->find($id);
     if (null === $result) {
         throw new NotFoundHttpException('Attribute group not found');
     }
     return $result;
 }