/** * When the element is a repeatble join (e.g. db join checkbox) then figure out how many * records have been selected * * @param array $data data * @param object $oJoin join model * * @since 3.0rc1 * * @return int number of records selected */ public function getJoinRepeatCount($data, $oJoin) { $displayType = $this->getParams()->get('database_join_display_type', 'dropdown'); if ($displayType === 'multilist') { $join = $this->getJoinModel()->getJoin(); $repeatName = $join->table_join . '___' . $this->getElement()->name; return count(JArrayHelper::getValue($data, $repeatName, array())); } else { return parent::getJoinRepeatCount($data, $oJoin); } }