/**
  * {@inheritdoc}
  */
 protected function getUnsetUrlParameters($key, ViewData $data)
 {
     $parameters = $data->getUrlParameters();
     if (isset($parameters[$this->getRequestField()]) && count($parameters[$this->getRequestField()]) > 1) {
         $parameters[$this->getRequestField()] = array_values(array_diff($parameters[$this->getRequestField()], [$key]));
     } else {
         $parameters = $data->getResetUrlParameters();
     }
     return $parameters;
 }
示例#2
0
 /**
  * @param string   $key
  * @param ViewData $data
  *
  * @return array
  */
 protected function getOptionUrlParameters($key, ViewData $data)
 {
     $parameters = $data->getResetUrlParameters();
     $parameters[$this->getRequestField()] = $key;
     return $parameters;
 }
 /**
  * Returns url with selected term disabled.
  *
  * @param string   $key
  * @param ViewData $data
  *
  * @return array
  */
 protected function getUnsetUrlParameters($key, ViewData $data)
 {
     return $data->getResetUrlParameters();
 }