/**
  * @param array $filter
  * @return bool
  */
 public function passThroughFilter(array $filter)
 {
     $this->loadTable();
     // If one field returns false, the whole record does not pass the filter #performance-improvements
     foreach ($this->table->getFilterableFields() as $field) {
         if (!isset($filter["filter_" . $field->getId()]) || !$filter["filter_" . $field->getId()]) {
             continue;
         }
         if (!ilDataCollectionDatatype::passThroughFilter($this, $field, $filter["filter_" . $field->getId()])) {
             return false;
         }
     }
     return true;
 }
 public function initFilter()
 {
     foreach ($this->table->getFilterableFields() as $field) {
         $input = ilDataCollectionDatatype::addFilterInputFieldToTable($field, $this);
         $input->readFromSession();
         $value = $input->getValue();
         if (is_array($value)) {
             if ($value['from'] || $value['to']) {
                 $this->filter["filter_" . $field->getId()] = $value;
             }
         } else {
             if ($value != '') {
                 $this->filter["filter_" . $field->getId()] = $value;
             }
         }
     }
 }