示例#1
0
 public function __construct($field = '', $message = 'Informe um valor válido.', $required = false, $parameter = '')
 {
     parent::__construct();
     $this->id = uniqid();
     $this->field = $field;
     $this->message = $message;
     $this->parameter = $parameter;
     $this->required = $required;
     $this->attributes = new MAttributes();
     $this->setActive();
     $this->getPage()->addDojoRequire('dijit.form.ValidationTextBox');
 }
示例#2
0
 public function __construct()
 {
     parent::__construct();
     // initialize properties
     $this->baseNode = new MAjaxNode();
     $this->baseNode->setName('ajaxResponse');
     $this->baseNode->setAttribute('id', '');
     $this->baseNode->setEncoding('UTF-8');
     $this->response = new stdClass();
     // determine response type
     $this->setResponseType($_REQUEST['ajaxResponseType'] ?: 'TEXT');
 }
示例#3
0
 public function __construct($form)
 {
     parent::__construct();
     $this->form = $form;
     $this->onsubmit = array();
     $this->onload = new MStringList(false);
     $this->onerror = new MStringList(false);
     $this->onunload = new MStringList();
     $this->onfocus = new MStringList();
     $this->jsCode = new MStringList(false);
     $this->scripts = new MStringList(false);
     $this->customScripts = new MStringList(false);
     $this->dojoRequire = array();
     $this->events = new MStringList(false);
 }
示例#4
0
 public function __construct($path = '')
 {
     parent::__construct();
     $this->path = $path;
     if (function_exists('mb_internal_charset')) {
         mb_internal_charset('UTF-8');
     }
     define('SMARTY_RESOURCE_CHAR_SET', 'UTF-8');
     $this->engine = new Smarty();
     $this->engine->setTemplateDir($path ? $path : Manager::getPublicPath() . '/templates');
     $this->engine->setCompileDir(Manager::getFrameworkPath() . '/var/templates');
     $this->engine->setCacheDir(Manager::getFrameworkPath() . '/var/cache');
     $this->engine->setConfigDir(Manager::getClassPath() . '/ui/smarty/configs');
     $this->engine->left_delimiter = '{{';
     $this->engine->right_delimiter = '}}';
     $this->context = array();
     $this->context('manager', Manager::getInstance());
 }
示例#5
0
 /**
  * Ciclo de vida
  *      - Conjunto de métodos executados durante o ciclo de vida do controle.
  *
  * - construct : instanciação do controle
  *      - create
  *          - onBeforeCreate
  *          - onCreate : inicializa principais propriedades
  *          - onInit
  *              - init : código de inicialização do controle
  *              - onAfterCreate :
  * - load
  *          - onBeforeLoad
  *          - onLoad : controle é carregado em um container (ex. createFields)
  *          - onAfterLoad (ex. setData)
  * - generate
  *          - onBeforeGenerate
  *          - onGenerate : gera o codigo para exibição do controle em $this->result
  *          - onAfterGenerate
  * - postBack
  *          - onBeforePostBack
  *          - onPostBack : executado quando o valor do controle é recebido via POST
  *          - onAfterPostBack
  */
 function __construct()
 {
     parent::__construct(func_get_args());
     call_user_func_array(array($this, 'create'), func_get_args());
 }
示例#6
0
 public function __construct()
 {
     parent::__construct('page' . uniqid());
     $this->scripts = new MScripts($this->name);
     $this->state = new MState($this->name);
     $this->action = Manager::getRequest()->getURL();
     $this->actionChanged = false;
     $this->layout = mrequest('__LAYOUT') ?: 'default';
     $this->fileUpload = mrequest('__ISFILEUPLOAD') == 'yes';
     $this->content = new MContainerControl();
     $template = mrequest('__TEMPLATE') ?: (Manager::getConf('theme.template') ?: 'index');
     $this->setTemplateName($template);
     $this->setTemplate();
     $this->theme = Manager::$conf['theme']['name'];
     $this->styleSheetCode = '';
     ob_start();
 }