/**
  * Get properties
  * 
  * @return \Zgrid\Schema\Field[]
  */
 protected function getFields()
 {
     if ($this->fields === null) {
         $this->fields = [];
         foreach ($this->schemaProvider->getSchema()->getFields() as $field) {
             $property = $field->getProperty() ?: $field->getName();
             $this->fields[$property] = $field;
         }
     }
     return $this->fields;
 }
 /**
  * Process global search
  * 
  * @param Criteria         $criteria
  * @param RequestInterface $request
  */
 protected function processGlobalSearch(Criteria $criteria, RequestInterface $request)
 {
     $query = $request->getGlobalSearch();
     if ($query === null) {
         return;
     }
     $condition = call_user_func_array([Criteria::expr(), 'orX'], array_map(function ($name) use($query) {
         return Criteria::expr()->contains($name, $query);
     }, $this->schemaProvider->getSchema()->getGloballySearchableNames()));
     $criteria->andWhere($condition);
 }