Пример #1
0
 /**
  * Get option attributes
  *
  * @param mixed $value Value
  *
  * @return array
  */
 protected function getOptionAttributes($value)
 {
     $list = parent::getOptionAttributes($value);
     if ($value == $this->getRootPermission()->getId()) {
         $list['data-isRoot'] = '1';
     }
     return $list;
 }
Пример #2
0
 /**
  * Set common attributes
  *
  * @param array $attrs Field attributes to prepare
  *
  * @return array
  */
 protected function setCommonAttributes(array $attrs)
 {
     $list = parent::setCommonAttributes($attrs);
     $list['data-placeholder'] = static::t('All shipping statuses');
     return $list;
 }