Example #1
0
 /**
  * {@inheritdoc}
  */
 public function init($name, array $params)
 {
     $params[FilterUtility::FRONTEND_TYPE_KEY] = 'dictionary';
     if (isset($params['class'])) {
         $params[FilterUtility::FORM_OPTIONS_KEY]['class'] = $params['class'];
         unset($params['class']);
     }
     if (isset($params['enum_code'])) {
         $params[FilterUtility::FORM_OPTIONS_KEY]['enum_code'] = $params['enum_code'];
         unset($params['enum_code']);
     }
     parent::init($name, $params);
 }
Example #2
0
 /**
  * {@inheritdoc}
  */
 public function init($name, array $params)
 {
     $params[FilterUtility::FRONTEND_TYPE_KEY] = 'dictionary';
     if (isset($params['class'])) {
         $params[FilterUtility::FORM_OPTIONS_KEY]['class'] = $params['class'];
         unset($params['class']);
     }
     if (isset($params['enum_code'])) {
         $params[FilterUtility::FORM_OPTIONS_KEY] = ['enum_code' => $params['enum_code'], 'class' => ExtendHelper::buildEnumValueClassName($params['enum_code'])];
         $params['class'] = ExtendHelper::buildEnumValueClassName($params['enum_code']);
         unset($params['enum_code']);
     }
     parent::init($name, $params);
 }