/**
  * Check $_GET for value
  *
  * @param string  $valueName
  * @param Request $request
  * @param bool    $strict
  *
  * @return bool
  */
 protected function requestHasValue($valueName, Request $request, $strict = true)
 {
     if ($request->query->has($valueName)) {
         if ($strict) {
             $value = $request->query->get($valueName);
             if (is_array($value)) {
                 return ArrayHelper::isArrayNotEmpty($value);
             } else {
                 return 0 < strlen($value);
             }
         } else {
             return true;
         }
     }
     return false;
 }
 /**
  * @return array|mixed
  */
 protected function getCriteriaFromForm()
 {
     $criteria = [];
     if (null === $this->form) {
         return $criteria;
     }
     $this->form->handleRequest($this->request);
     if ($this->form->isSubmitted() && $this->form->isValid() || !$this->form->isSubmitted()) {
         $criteria = ArrayHelper::arrayForce($this->form->getData());
     }
     return $criteria;
 }