/** * Creates a new text form element. * * @param array $attributes The attributes that should be assigned to the text element. */ public function __construct(array $attributes) { parent::__construct($attributes); $this->type = 'image'; if (array_key_exists('value', $this->attributes) && !array_key_exists('src', $this->attributes)) { $this->attributes['src'] = $this->attributes['value']; unset($this->attributes['value']); } }
/** * Creates a new text form element. * * @param array $attributes The attributes that should be assigned to the text element. */ public function __construct(array $attributes) { parent::__construct($attributes); $this->type = 'text'; }