Example #1
0
 /**
  * List stocks
  *
  * @Route("/")
  * @Route("/list/{access}", defaults={"access" = "owned"})
  * @Route("/list/{access}/sort/{sort}/{order}", defaults={"access" = "mtnt", "sort" = "name", "order" = "asc"})
  * @Template()
  * @SatisfiesParentSecurityPolicy
  *
  * @return \Symfony\Component\HttpFoundation\Response
  */
 public function listAction()
 {
     return parent::listAction();
 }
Example #2
0
 /**
  * List vials
  *
  * @Route("/")
  * @Route("/list/{access}/{filter}", defaults={"access" = "private", "filter" = "living"})
  * @Route("/list/{access}/{filter}/sort/{sort}/{order}", defaults={"access" = "private", "filter" = "living", "sort" = "setup", "order" = "asc"})
  * @Template()
  * @SatisfiesParentSecurityPolicy
  *
  * @return \Symfony\Component\HttpFoundation\Response
  */
 public function listAction()
 {
     $response = parent::listAction();
     $this->setBatchActionRedirect();
     $formResponse = $this->handleSelectForm(new SelectType($this->getEntityClass()));
     if ($response instanceof Response) {
         return $response;
     }
     if ($formResponse instanceof Response) {
         return $formResponse;
     }
     return is_array($response) && is_array($formResponse) ? array_merge($response, $formResponse) : $response;
 }