/** * Return all filter columns with their optional label as key * * This will merge the results of self::getColumns(), self::getStaticFilterColumns() and * self::getDynamicFilterColumns() *once*. (i.e. subsequent calls of this function will * return the same result.) * * @return array */ public function getFilterColumns() { if ($this->filterColumns === null) { $columns = array_merge($this->getColumns(), $this->getStaticFilterColumns(), $this->getDynamicFilterColumns()); $this->filterColumns = array(); foreach ($columns as $label => $column) { if (is_int($label)) { $label = ucwords(str_replace('_', ' ', $column)); } if ($this->query->isCaseInsensitive($column)) { $label .= ' ' . t('(Case insensitive)'); } $this->filterColumns[$label] = $column; } } return $this->filterColumns; }