Example #1
0
 public function init()
 {
     parent::init();
     if (!$this->isAdmin()) {
         Admin::staticAdminLogon();
     }
 }
Example #2
0
 /**
  * Constructor por defecto
  * @throws AccessDeniedException
  */
 public function init()
 {
     parent::init();
     if (!$this->isLogged()) {
         throw new UserAuthException(_("User not logged in"));
     }
 }
Example #3
0
File: Api.php Project: c15k0/psfs
 /**
  * Wrapper for json parent method with close transactions and close connectios tasks
  *
  * @param \PSFS\base\dto\JsonResponse $response
  * @param int $status
  *
  * @return string
  */
 public function json($response, $status = 200)
 {
     $this->closeTransaction($status);
     Propel::closeConnections();
     return parent::json($response, $status);
 }