예제 #1
0
 /**
  * Set common attributes
  *
  * @param array $attrs Field attributes to prepare
  *
  * @return array
  */
 protected function setCommonAttributes(array $attrs)
 {
     $attrs = parent::setCommonAttributes($attrs);
     $attrs['data-value'] = $this->getValue();
     return $attrs;
 }
예제 #2
0
 /**
  * Set common attributes
  *
  * @param array $attrs Field attributes to prepare
  *
  * @return array
  */
 protected function setCommonAttributes(array $attrs)
 {
     return parent::setCommonAttributes($attrs) + array('size' => 1);
 }
예제 #3
0
파일: Rich.php 프로젝트: kirkbauer2/kirkxc
 /**
  * Set common attributes
  *
  * @param array $attrs Field attributes to prepare
  *
  * @return array
  */
 protected function setCommonAttributes(array $attrs)
 {
     return parent::setCommonAttributes($attrs) + array('data-placeholder' => static::t('Select options'), 'data-selected-text' => static::t('# selected'), 'data-disable-search' => $this->getParam(static::PARAM_DISABLE_SEARCH));
 }
예제 #4
0
파일: WeightUnit.php 프로젝트: kingsj/core
 /**
  * Set common attributes
  *
  * @param array $attrs Field attributes to prepare
  *
  * @return array
  */
 protected function setCommonAttributes(array $attrs)
 {
     $list = parent::setCommonAttributes($attrs);
     $list['onchange'] = 'javascript: if (this.form.weight_symbol) { this.form.weight_symbol.value = this.value; }';
     return $list;
 }