getAttribute('listKey', 'id'); $labelKey = $this->getAttribute('labelKey', 'text'); $nullLabel = $this->getAttribute('nullLabel'); $options = array(); if ($nullLabel) $options[''] = JText::_($nullLabel); $model = CkJModel::getInstance('Choices', 'TestModel'); $model->addJoin("#__test_choicestranslations cr on cr.choice = a.id"); $model->addSelect('cr.translation as translation'); $model->addWhere("lcase(cr.language) = '".strtolower(JFactory::getLanguage()->getTag())."'"); $items = $model->getItems(); if (!empty($items)) foreach ($items as $item) $options[$item->$listKey] = TestHelper::parseValue($item, $labelKey); return $options; } } // Load the fork TestHelper::loadFork(__FILE__); // Fallback if no fork has been found if (!class_exists('JFormFieldChoiceTranslation')){ class JFormFieldChoiceTranslation extends TestCkFormFieldChoiceTranslation{} }