public function __construct($name = null, $attributes = null, array $data = array()) { parent::__construct($name, $attributes, $data); if (!$this->getAttribute('value')) { $this->setAttribute('value', 1); } }