/**
  * Displays a form to edit an existing entity.
  *
  * @param Request $request
  * @param array $criteria
  *
  * @return Response
  */
 public function renderEdit(Request $request, array $criteria)
 {
     $entity = $this->entityManager->getRepository($this->entityClass)->findOneBy($criteria);
     $this->denyAccessUnlessGranted(EasyAdminVoterInterface::EDIT, $entity);
     if ($entity->getStatus() != 'open') {
         return $this->redirectToRoute('madrakio_streamperk_giveaway_managegiveaway_show', ['id' => $entity->getId()]);
     }
     return parent::renderEdit($request, $criteria);
 }
 public function __construct(AbstractType $entityFormType, AbstractListType $entityList, AbstractShowType $entityShow, $entityClass)
 {
     parent::__construct($entityFormType, $entityList, $entityShow, $entityClass);
     @trigger_error('The AbstractCRUDController class is deprecated. You should extend the AbstractSimpleCRUDController instead.', E_USER_DEPRECATED);
 }