/** * Class Constructor * @param $name Name of the widget */ public function __construct($name) { parent::__construct($name); $this->id = 'tdate_' . mt_rand(1000000000, 1999999999); $this->mask = 'yyyy-mm-dd'; $newmask = $this->mask; $newmask = str_replace('dd', '99', $newmask); $newmask = str_replace('mm', '99', $newmask); $newmask = str_replace('yyyy', '9999', $newmask); parent::setMask($newmask); }
/** * Class Constructor * @param $name name of the field */ public function __construct($name) { parent::__construct($name); $this->useOutEvent = TRUE; $this->setProperty('class', 'tfield tseekentry', TRUE); // classe CSS $image = new TImage('lib/adianti/images/ico_find.png'); $this->button = new TElement('button'); $this->button->{'class'} = 'btn btn-default tseekbutton'; $this->button->{'type'} = 'button'; $this->button->{'onmouseover'} = 'style.cursor = \'pointer\''; $this->button->{'name'} = '_' . $this->name . '_link'; $this->button->{'onmouseout'} = 'style.cursor = \'default\''; $this->button->add($image); }
/** * Class Constructor * @param $name name of the field */ public function __construct($name) { parent::__construct($name); $this->useOutEvent = TRUE; $this->setProperty('class', 'tfield tseekentry', TRUE); // classe CSS //retira o espaco a direta de um edit, para o botao de busca ficar colado $this->setProperty('style', 'margin-right: 0px;', false); $image = new TImage('lib/adianti/images/ico_find.png'); $this->button = new TElement('button'); $this->button->{'class'} = 'btn btn-default tseekbutton'; $this->button->{'type'} = 'button'; $this->button->{'onmouseover'} = 'style.cursor = \'pointer\''; $this->button->{'name'} = '_' . $this->name . '_link'; $this->button->{'onmouseout'} = 'style.cursor = \'default\''; $this->button->add($image); }
/** * Class Constructor * @param $name widget's name * @param $database database name * @param $model model class name * @param $value table field to be listed in the combo * @param $ordercolumn column to order the fields (optional) * @param $criteria criteria (TCriteria object) to filter the model (optional) */ public function __construct($name, $database, $model, $value, $orderColumn = NULL, TCriteria $criteria = NULL) { // executes the parent class constructor parent::__construct($name); if (empty($database)) { throw new Exception(AdiantiCoreTranslator::translate('The parameter (^1) of ^2 is required', 'database', __CLASS__)); } if (empty($model)) { throw new Exception(AdiantiCoreTranslator::translate('The parameter (^1) of ^2 is required', 'model', __CLASS__)); } if (empty($value)) { throw new Exception(AdiantiCoreTranslator::translate('The parameter (^1) of ^2 is required', 'value', __CLASS__)); } $this->minLength = 1; $this->database = $database; $this->model = $model; $this->column = $value; $this->operator = 'like'; $this->orderColumn = isset($orderColumn) ? $orderColumn : NULL; $this->criteria = $criteria; }
/** * Class Constructor * @param $name Name of the widget */ public function __construct($name) { parent::__construct($name); $this->id = 'tcolor_' . uniqid(); }
/** * Class Constructor * @param $name Name of the widget */ public function __construct($name) { parent::__construct($name); $this->id = 'tcolor_' . mt_rand(1000000000, 1999999999); }