Exemple #1
0
 /**
  * Create a new form builder
  *
  * @param string $identifier Form identifier
  *
  * @return Symfony\Component\Form\FormBuilder
  */
 public static function create($identifier, $data = null, array $options = array())
 {
     $form = self::$app->form($data, $options);
     self::$forms[$identifier] = $form;
     EventDispatcher::dispatch('form.' . $identifier . '.create', new Event($form));
     return $form;
 }
Exemple #2
0
 /**
  * Remove session and logout user
  */
 public static function logout()
 {
     Session::remove('userId');
     EventDispatcher::dispatch('auth.logout', self::$user);
 }