Lines Matching refs:column
59 * Returns the full qualified name for a given column
61 * @param string|Column $column
64 protected function resolveColumn($column)
66 if (!is_a($column, Column::class)) {
67 $column = $this->searchConfig->findColumn($column);
68 if (!$column) return false;
70 /** @var Column $column */
71 return $column->getFullQualifiedLabel();
75 * Sets the sorting column
77 * @param string|Column $column
80 public function setSort($column, $asc = true)
82 $column = $this->resolveColumn($column);
83 if (!$column) return;
84 $this->sort = [$column, $asc];
88 * Remove the sorting column
116 * When there is a filter for that column already, the new filter overwrites it. Setting a
119 * @param string|Column $column
123 public function addFilter($column, $comp, $value)
125 $column = $this->resolveColumn($column);
126 if (!$column) return;
129 $this->removeFilter($column);
131 $this->filters[$column] = [$comp, $value];
136 * Removes the filter for the given column
138 * @param $column
140 public function removeFilter($column)
142 $column = $this->resolveColumn($column);
143 if (!$column) return;
144 if (isset($this->filters[$column])) unset($this->filters[$column]);
180 [$column, $asc] = $this->sort;
181 if (!$asc) $column = "^$column";
182 $params[self::$PARAM_SORT] = $column;
186 foreach ($this->filters as $column => $filter) {
188 $key = self::$PARAM_FILTER . '[' . $column . $comp . ']';