/** * Used by radio and dropdown elements to get a dropdown list of their unique * unique values OR all options - based on filter_build_method * * @param bool $normal Do we render as a normal filter or as an advanced search filter * @param string $tableName Table name to use - defaults to element's current table * @param string $label Field to use, defaults to element name * @param string $id Field to use, defaults to element name * @param bool $incjoin Include join * * @return array text/value objects */ public function filterValueList($normal, $tableName = '', $label = '', $id = '', $incjoin = true) { $params = $this->getParams(); if ($params->get('textarea-tagify') == true) { return $this->getTags(); } else { return parent::filterValueList($normal, $tableName, $label, $id, $incjoin); } }
/** * Used by radio and dropdown elements to get a dropdown list of their unique * unique values OR all options - based on filter_build_method * * @param bool $normal Do we render as a normal filter or as an advanced search filter * @param string $tableName Table name to use - defaults to element's current table * @param string $label Field to use, defaults to element name * @param string $id Field to use, defaults to element name * @param bool $incjoin Include join * * @return array Text/value objects */ public function filterValueList($normal, $tableName = '', $label = '', $id = '', $incjoin = true) { $rows = parent::filterValueList($normal, $tableName, $label, $id, $incjoin); $this->unmergeFilterSplits($rows); $this->reapplyFilterLabels($rows); return $rows; }
/** * Used by radio and dropdown elements to get a dropdown list of their unique * unique values OR all options - based on filter_build_method * * @param bool $normal Do we render as a normal filter or as an advanced search filter * @param string $tableName Table name to use - defaults to element's current table * @param string $label Field to use, defaults to element name * @param string $id Field to use, defaults to element name * @param bool $incjoin Include join * * @return array text/value objects */ public function filterValueList($normal, $tableName = '', $label = '', $id = '', $incjoin = true) { $rows = parent::filterValueList($normal, $tableName, $label, $id, $incjoin); $return = array(); foreach ($rows as &$row) { $txt = $this->listFormat($row->text); if ($txt !== '') { $row->text = strip_tags($txt); } // Ensure unique values if (!array_key_exists($row->text, $return)) { $return[$row->text] = $row; } } $return = array_values($return); return $return; }