示例#1
0
 /**
  * {@inheritdoc}
  */
 public function getMetadata()
 {
     $metadata = parent::getMetadata();
     if ($metadata[FilterUtility::TYPE_KEY] === 'multichoice') {
         $metadata[FilterUtility::TYPE_KEY] = 'dictionary';
     }
     return $metadata;
 }
示例#2
0
 /**
  * {@inheritDoc}
  */
 public function init($name, array $params)
 {
     $params[FilterUtility::FRONTEND_TYPE_KEY] = 'choice';
     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);
 }