Exemple #1
0
 /**
  * Returns filters value.
  *
  * @return mixed
  */
 public function getValue()
 {
     $from_input = $this->grid->getInputProcessor()->getFilterValue($this->config->getId());
     if ($from_input === null) {
         return $this->config->getDefaultValue();
     } else {
         return $from_input;
     }
 }
Exemple #2
0
 /**
  * Returns filters value.
  *
  * @return mixed
  */
 public function getValue()
 {
     $from_input = $this->grid->getInputProcessor()->getFilterValue($this->config->getId());
     $key = $this->grid->getInputProcessor()->getKey();
     $cookieName = $key . '-filters-' . $this->config->getId();
     if ($from_input === null) {
         if (isset($_COOKIE[$cookieName])) {
             return $_COOKIE[$cookieName];
         }
         return $this->config->getDefaultValue();
     } else {
         $this->config->setCookie($cookieName, $from_input);
         return $from_input;
     }
 }