示例#1
0
 /**
  * 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;
 }
示例#2
0
文件: String.php 项目: kingsj/core
 /**
  * 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;
 }
示例#3
0
 /**
  * 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;
 }
示例#4
0
 /**
  * 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;
 }