From bcae67f8b914340098f58b86bc599558fd85e4cd Mon Sep 17 00:00:00 2001 From: Seerus Date: Fri, 21 Aug 2015 09:26:25 +0600 Subject: [PATCH] deleted maxfiles listener --- EventListener/MaxFilesValidationListener.php | 42 -------------------- 1 file changed, 42 deletions(-) delete mode 100644 EventListener/MaxFilesValidationListener.php diff --git a/EventListener/MaxFilesValidationListener.php b/EventListener/MaxFilesValidationListener.php deleted file mode 100644 index bb92c56..0000000 --- a/EventListener/MaxFilesValidationListener.php +++ /dev/null @@ -1,42 +0,0 @@ -doctrine = $doctrine; - } - - public function onValidate(ValidationEvent $event) - { -// $config = $event->getConfig(); -// -// if (!isset($config['max_files'])) { -// return; -// } -// -// $request = $event->getRequest(); -// $requestId = $request->get('_glavweb_uploader_request_id'); -// $qb = $this->doctrine->getEntityManager()->createQueryBuilder(); -// $qb->select('COUNT(m.id)') -// ->from('GlavwebUploaderBundle:Media', 'm') -// ->where('m.requestId = :requestId') -// ->setParameter('requestId', $requestId); -// $result = $qb->getQuery()->getSingleScalarResult(); -// -// if ($result >= $config['max_files']) { -// throw new ValidationException('error.maxfiles'); -// } - } -}