function __construct($instance, $format = '%Y-%m-%d') { parent::__construct($instance); $this->data = array_merge($this->data, $instance->getDateArray()); $this->setFormat($format); $this->setDojoType('wtk.form.control.Date'); }
function __construct(Wtk_Form_Model_Instance $instance, $button = null) { parent::__construct($instance); if (!$button) { $button = new Wtk_Form_Button("Téléverser"); $button->addFlags('label'); } $this->button = $button; $this->tooltip = "Taille maximale : " . ini_get('upload_max_filesize'); }
/** * @compact = NULL => auto */ function __construct($instance, $compact = NULL) { parent::__construct($instance); if (!$instance instanceof Wtk_Form_Model_Instance_Enum) { throw new Exception(__CLASS__ . ' needs an Enum instance'); } $this->setItems($this->instance->getItems()); $this->setCompact($compact); $this->multiple = $instance->getMultiple(); if ($this->multiple) { $this->addFlags('multiple'); } $this->select($this->instance->get()); }
function __construct($instance, $width = 12, $height = 1, $suffix = '') { parent::__construct($instance); $this->setSize($width, $height); $this->useSuffix($suffix); /* Calcule le type HTML depuis le nom de la classe. */ $klass = get_called_class(); if ($klass == get_class()) { $this->type = 'text'; } else { $parts = explode('_', $klass); $this->type = strtolower(end($parts)); } $this->placeholder = null; $this->pattern = null; }
function __construct($instance, $model) { parent::__construct($instance); // récupération des colonnes $row = $instance->rewind(); $columns = array(); if ($row) { foreach ($row as $cell) { $columns[$cell->id] = $cell->label; } } // création du model du tableau $this->tm = new Wtk_Table_Model($columns); foreach ($instance as $row) { $args = array(); foreach ($row as $cell) { $args[] = $cell; } call_user_func_array(array($this->tm, 'append'), $args); } // création de la vue $this->table = new Wtk_Table($this->tm); $this->table->addFlags('form', 'control'); $this->table->setDojoType("wtk.form.control.Table"); $this->table->setRowDojoType("wtk.form.control.TableRow"); if ($instance->reorderable) { $this->table->addFlags('reorderable'); } if ($instance->extensible) { $this->table->addFlags('extensible'); } if ($row) { foreach ($model as $name => $conf) { $class = $conf[0]; $args = array_slice($conf, 1); $this->table->addColumn(new Wtk_Table_Column($columns[$name], new Wtk_Table_CellRenderer_Control($class, $args, $name))); } } }
function __construct(Wtk_Form_Model_Instance $instance) { parent::__construct($instance); $this->value = $instance->getHex(); }
function __construct($instance) { parent::__construct($instance); }
function __construct($instance) { parent::__construct($instance); $this->caption = null; }