Exemplo n.º 1
0
Arquivo: Form.php Projeto: vanuatu/Zzz
 /**
  *
  *
  */
 public function __construct($formAction, $formFile, $formPath, $formInputsPath, $dataLoaded = [])
 {
     global $VNT;
     $formPath = "form:{$formPath}";
     $this->formPath = $formPath;
     $this->formInputsPath = !empty($formInputsPath) ? $formInputsPath : "";
     $this->config = Util::getYamlFile(Util::normalizePath($VNT->app->folder->forms, $formFile));
     $this->actionStr = Self::getFormActionToText($formAction);
     $this->action = $formAction;
     $this->formFile = $formFile;
     $this->formData = $this->config->{$formPath};
     $this->formInputsData = $this->getFormInputsData($formInputsPath);
     $this->formInputsObjects = $this->getFormInputsObjects();
     $this->dataLoaded = $dataLoaded;
 }
Exemplo n.º 2
0
 /**
  *
  *
  */
 public function __construct($formAction, $inputType, $title, $name, $params, $group, $database)
 {
     global $VNT;
     $formAction = Form::getFormActionToText($formAction);
     $this->id = $name . "__" . uniqid();
     $this->type = $inputType;
     $this->name = $name;
     $this->title = $title;
     $this->params = $params;
     $this->action = $formAction;
     $this->root = Util::normalizePath($VNT->app->folder->inputs, $inputType);
     $this->config = Util::getYamlFile(Util::normalizePath($this->root, "config.yaml"));
     $this->events = $this->loadEvents();
     //$this->html     = $this->loadHtml();
     //$this->jsInline = $this->loadJsInline();
     //$this->jsHead   = $this->loadJsHead();
     //$this->jsFoot   = $this->loadJsFoot();
     //$this->jsStyle  = $this->loadStyle();
     $this->group = $group;
     $this->database = $database;
 }