Пример #1
0
 /**
  * Método estático de login de administrador
  * @param string $route
  * @return string HTML
  * @throws \PSFS\base\exception\FormException
  */
 public static function staticAdminLogon($route = null)
 {
     if ('login' !== Config::getInstance()->get('admin_login')) {
         return AdminServices::getInstance()->setAdminHeaders();
     } else {
         $form = new LoginForm();
         $form->setData(array("route" => $route));
         $form->build();
         $tpl = Template::getInstance();
         $tpl->setPublicZone(true);
         return $tpl->render("login.html.twig", array('form' => $form));
     }
 }
Пример #2
0
 /**
  * Método que manda las cabeceras de autenticación
  * @return string HTML
  */
 protected function sentAuthHeader()
 {
     return AdminServices::getInstance()->setAdminHeaders();
 }