Exemple #1
0
 /**
  * Create an array of label/values which will be used to populate the elements filter dropdown
  * returns only data found in the table you are filtering on
  *
  * @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	filter value and labels
  */
 protected function filterValueList_Exact($normal, $tableName = '', $label = '', $id = '', $incjoin = true)
 {
     $app = JFactory::getApplication();
     if ($this->isJoin()) {
         $fbConfig = JComponentHelper::getParams('com_fabrik');
         $limit = $fbConfig->get('filter_list_max', 100);
         $rows = array_values($this->checkboxRows(null, null, null, null, 0, $limit));
     } else {
         // Autocomplete with concat label was not working if we called the parent method
         if ($app->input->get('method') === 'autocomplete_options') {
             $listModel = $this->getListModel();
             $db = $listModel->getDb();
             $data = array();
             $opts = array();
             $this->_autocomplete_where = $label . ' LIKE ' . $db->quote('%' . JRequest::getVar('value') . '%');
             $rows = $this->_getOptionVals($data, 0, true, $opts);
         } else {
             $rows = parent::filterValueList_Exact($normal, $tableName, $label, $id, $incjoin);
         }
     }
     return $rows;
 }
Exemple #2
0
 /**
  * create an array of label/values which will be used to populate the elements filter dropdown
  * returns only data found in the table you are filtering on
  * @param unknown_type $normal
  * @param string $tableName
  * @param string $label
  * @param mixed $id
  * @param bool $incjoin
  * @return array filter value and labels
  */
 protected function filterValueList_Exact($normal, $tableName = '', $label = '', $id = '', $incjoin = true)
 {
     if ($this->isJoin()) {
         $rows = array_values($this->checkboxRows());
     } else {
         $rows = parent::filterValueList_Exact($normal, $tableName, $label, $id, $incjoin);
     }
     return $rows;
 }