/** * Constructor ColorPicker * @param Page|Form $page_or_form_object * @param string $name * @param string $id * @param string $value * @param string $width * @param double $length [default value: 0] */ function __construct($page_or_form_object, $name = '', $id = '', $value = '', $width = '', $length = 0) { parent::__construct($page_or_form_object, $name, $id, $value, $width, $length); $this->isButton(false); $this->setClass("color {}"); $this->addJavaScript(BASE_URL . "wsp/js/jscolor.js", "", true); }
public function __construct($name, $value = '', array $attributes = array()) { parent::__construct($name, $value); if (is_object($value)) { $value = \System\Std\Object::getPropertyValue($value, $name); } $attributes['value'] = $value; $attributes['name'] = !array_key_exists('name', $attributes) ? $name : $attributes['name']; $attributes['id'] = !array_key_exists('id', $attributes) ? $name : $attributes['id']; $this->attributes = array_merge($this->attributes, $attributes); }
/** * Constructor Calendar * @param mixed $page_or_form_object * @param string $name * @param string $id * @param string $value * @param string $width */ function __construct($page_or_form_object, $name = '', $id = '', $value = '', $width = '') { parent::__construct($page_or_form_object, $name, $id, $value, $width); $this->type = "calendar"; if ($this->getPage()->getLanguage() == "fr") { $this->setDateFormat(Calendar::DATE_FORMAT_FRENCH); } else { if ($this->getPage()->getLanguage() == "de") { $this->setDateFormat(Calendar::DATE_FORMAT_GERMAN); } } }
/** * Constructor Password * @param mixed $page_or_form_object * @param string $name * @param string $id * @param string $value * @param string $width * @param double $length [default value: 0] */ function __construct($page_or_form_object, $name = '', $id = '', $value = '', $width = '', $length = 0) { parent::__construct($page_or_form_object, $name, $id, $value, $width, $length); $this->type = "password"; }
public function __construct($name, array $attributes = array()) { parent::__construct($name, $attributes); $this->setName($name); $this->setAttribute('type', 'password'); }