public function __construct($disabled = false) { parent::__contruct(); if ($disabled) { parent::setAttribute((new Attribute('disabled'))->append('disabled')); } }
public function __construct($multiple = false) { parent::__contruct(); if ($multiple) { parent::setAttribute((new Attribute('multiple'))->append('')); } }
public function __construct($href, $rel, $type = null) { parent::__construct(); parent::setAttribute((new Attribute('href'))->append($href)); parent::setAttribute((new Attribute('rel'))->append($rel)); if (isset($type)) { parent: setAttribute((new Attribute('type'))->append($type)); } }
public function __construct($placeholder = null, $rows = null) { parent::__construct(); if (isset($placeholder)) { parent::setAttribute((new Attribute('placeholder'))->append($placeholder)); } if (isset($rows)) { parent::setAttribute((new Attribute('rows'))->append($rows)); } }
public function setAttribute($name, $value) { parent::setAttribute($name, $value); if ($name !== 'id') { foreach ($this->radioElements as $element) { $element->setAttribute($name, $value); } } return $this; }
public function __construct($type, $name, $readonly = false, $disabled = false) { parent::__construct(); parent::setAttribute('type', $type); parent::setAttribute('name', $name); if ($readonly) { parent::setAttribute((new Attribute('readonly'))->append('readonly')); } if ($disabled) { parent::setAttribute((new Attribute('disabled'))->append('disabled')); } }
public function __construct($src = null, $type = null, $defer = false, $async = false) { parent::__construct(); if (isset($src)) { parent::setAttribute((new Attribute('src'))->append($src)); } if (isset($type)) { parent::setAttribute((new Attribute('type'))->append($type)); } if ($defer) { parent::setAttribute((new Attribute('defer'))->append($defer)); } if ($async) { parent::setAttribute((new Attribute('async'))->append($async)); } }
public function __construct($title) { parent::construct(); parent::setAttribute((new Attribute('title'))->append($title)); }
public function __construct($src) { parent::__construct(); parent::setAttribute((new Attribute('src'))->append($src)); }
public function __construct($datetime) { parent::__construct(); parent::setAttribute((new Attribute('datetime'))->append($datetime)); }