/** * Get common attributes * * @return array */ protected function getCommonAttributes() { $list = parent::getCommonAttributes(); // We encorage to upload the image files only. HTML5 support $list['accept'] = 'image/*'; return $list; }
/** * getCommonAttributes * * @return array */ protected function getCommonAttributes() { $list = parent::getCommonAttributes(); if ($this->getParam(static::PARAM_MAX_LENGTH)) { $list['maxlength'] = $this->getParam(static::PARAM_MAX_LENGTH); } return $list; }
/** * Get common attributes * * @return array */ protected function getCommonAttributes() { $list = parent::getCommonAttributes(); $list['autocomplete'] = $this->isUseAutocomplete() ? 'on' : 'off'; if ($this->getParam(static::PARAM_MAX_LENGTH)) { $list['maxlength'] = $this->getParam(static::PARAM_MAX_LENGTH); } return $list; }
/** * getCommonAttributes * * @return array */ protected function getCommonAttributes() { $attributes = parent::getCommonAttributes() + array(static::PARAM_ROWS => $this->getRows(), static::PARAM_COLS => $this->getCols()); if (isset($attributes['type'])) { unset($attributes['type']); } return $attributes; }