コード例 #1
0
ファイル: Permissions.php プロジェクト: kingsj/core
 /**
  * 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
ファイル: Shipping.php プロジェクト: kirkbauer2/kirkxc
 /**
  * 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;
 }