Example #1
0
 /**
  * Is it possible to include the element in the  Search all query?
  * true if basic search
  * true/false if advanced search
  *
  * @param   bool  $advancedMode  Is the list using advanced search
  *
  * @since   3.1b
  *
  * @return boolean
  */
 public function canIncludeInSearchAll($advancedMode)
 {
     if ($advancedMode) {
         $join = $this->getJoinModel();
         $fields = $join->getJoin()->getFields();
         $field = JArrayHelper::fromObject(JArrayHelper::getValue($fields, $this->getLabelParamVal(), array()));
         $type = JArrayHelper::getValue($field, 'Type', '');
         $notAllowed = array('int', 'double', 'decimal', 'date', 'serial', 'bit', 'boolean', 'real');
         foreach ($notAllowed as $test) {
             if (stristr($type, $test)) {
                 return false;
             }
         }
     }
     return parent::canIncludeInSearchAll($advancedMode);
 }