예제 #1
0
파일: ModuleForm.php 프로젝트: c15k0/psfs
 /**
  * @throws \PSFS\base\exception\FormException
  * @throws \PSFS\base\exception\RouterException
  */
 public function __construct()
 {
     $this->init();
     $this->setAction($this->router->getRoute('admin-module'))->setAttrs(array());
     $this->add('module', array('label' => _('Nombre del Módulo')))->add('force', array('label' => _('Sobreescribir ficheros'), 'type' => 'select', 'data' => array(_('No'), _('Sí')), 'required' => false))->add('is_module', array('label' => _('Es un módulo de PSFS'), 'type' => 'select', 'data' => array(_('No'), _('Sí')), 'required' => false))->add('controllerType', array('label' => _('Tipo de controlador'), 'type' => 'select', 'data' => array("" => _("Normal"), "Auth" => _("Requiere autenticación de usuario"), "AuthAdmin" => _("Requiere autenticación de administrador")), 'required' => false));
     $data = Security::getInstance()->getAdmins();
     //Aplicamos estilo al formulario
     $this->setAttrs(array('class' => 'col-md-6'));
     //Hidratamos el formulario
     $this->setData($data);
     //Añadimos las acciones del formulario
     $this->addButton('submit', 'Generar');
 }
예제 #2
0
파일: Dispatcher.php 프로젝트: psfs/Core
 private function redirectToHome()
 {
     Request::getInstance()->redirect($this->router->getRoute($this->config->get('home_action')));
 }