<?php
 namespace App\Mvc; abstract class View_Utils_FormAbstract { protected $controller; protected $lang; protected $globalLang; protected $cfg; protected $globalCfg; protected $values; protected $submitButtonName = 'save'; public function __construct(\App\Mvc\ControllerAbstract $controller) { $this->controller=$controller; $this->loadModuleConfigs(); } protected function loadModuleConfigs() { $modulePath = getClassNamespace(get_called_class()); $modulePathLang = str_replace("\\", "/", getClassNamespace(get_called_class())); $this->globalLang = \App\Loader_Lang::getInstance()->getAll(); $this->lang = \App\Loader_Lang::getInstance()->getSection($modulePathLang); $this->globalCfg = \Engine\Loader_Cfg::getInstance()->getGlobal(); $this->cfg = \Engine\Loader_Cfg::getInstance()->getLocal($modulePath); } public function setValues($values) { $this->values=$values; } public function getValues() { return $this->values; } public function setSubmitButtonName($submitButtonName) { $this->submitButtonName = $submitButtonName; } public function setValue($var, $value) { $this->values[$var]=$value; } abstract public function getForm(); }