Example #1
0
 /**
  *
  */
 private function reset()
 {
     Session::remove('mongulartemplate');
 }
Example #2
0
 /**
  * Method to build and register a form to be returned to AngularJS by the original controller.
  *
  * @param $fields
  * @param $data
  * @param $controller
  * @return array
  * @throws \Exception
  */
 public function buildForm(array $fields, array $data, $controller)
 {
     // Validate Form to be sure it is implementing FormInterface.
     if (!FormClasses::validateForm($controller)) {
         $error = 'Mongular Invalid form controller.';
         throw new \Exception($error);
     }
     $form_id = md5(Session::get('secure_key') . '-' . $controller);
     $values = array('form_id' => $form_id, 'controller' => $controller);
     $values['required_fields'] = array();
     foreach ($fields as $field) {
         if (isset($field['required']) and $field['required'] === TRUE) {
             $values['required_fields'][$field['key']] = $field['label'];
         }
     }
     $this->form_query->setForm($values);
     $options = array('uniqueFormId' => $form_id);
     $form = array('formFields' => $fields, 'formData' => $data, 'formOptions' => $options);
     return $form;
 }
Example #3
0
 /**
  *
  */
 private function reset()
 {
     Session::remove('mongular_messages');
 }
Example #4
0
 private static function reset()
 {
     Session::remove('mongular_dynamics');
 }
Example #5
0
 /**
  *
  */
 private function reset()
 {
     Session::remove('mongular_redirect');
 }
Example #6
0
 /**
  *
  */
 private function reset()
 {
     Session::set('mongular_reload', FALSE);
 }