/** * getLabel * * If it meets a group start like `{group1`, then it sets an sets a flag, * and later, till the end on the last open group, doesn't output * anything, but saves the XML element object to $GLOBALS['variablefield']. * Only when the last open group is closed, like `group1}`, then the class knows * the XML structure - which fields are inside the group. * After we have the whole picture of the group structure, we output * group once or several times - depending on the values in the * strating group field `{group1` value. * So we need to get the whole group structure and then to clone it * as many times as we need. * * This function determines either to store current field and sets some flags, * or Either outside the group OR at the stage of outputting it shows normal label. * * @author Gruz <*****@*****.**> * @param type $name Description * @return type Description */ function __construct($form = null) { parent::__construct($form); // Add CSS and JS once, define base global flag - runc only once $this->langShortCode = null; //is used for building joomfish links $this->default_lang = JComponentHelper::getParams('com_languages')->get('site'); $language = JFactory::getLanguage(); $language->load('lib_gjfields', __DIR__, 'en-GB', true); $language->load('lib_gjfields', __DIR__, $this->default_lang, true); }
function getInput() { $class = $this->def('class'); $html = ''; if (!empty($this->element['clean_name'])) { $comment = $this->element['clean_name']; } else { $comment = $this->element['name']; } if (version_compare(JVERSION, '3.0', 'ge') && $this->HTMLtype == 'div') { $html .= '</div><!-- controls !-->' . PHP_EOL; $html .= '</div><!-- control-group !--><!-- blockquote -->' . PHP_EOL; } else { $html .= "\n" . '</li></ul><br style="clear:both" /><!-- blockquote ' . $comment . ' -->'; } //$html .= '<div style="clear: both;"></div>'.PHP_EOL; $name = (string) $this->element['clean_name']; if (empty($name)) { $name = (string) $this->element['name']; } if (strpos($name, 'jform[params]') !== false) { $name = explode('][', $name); $name = $name[count($name) - 2]; } if (strpos($name, '{') === 0 || strpos($name, 'jform[params][{') === 0) { $html .= PHP_EOL . ' <div class="blockquote ' . $class . '">' . '<!-- { div blockquote !-->' . PHP_EOL; if (!empty($this->element['label'])) { //~ $html .= ' <div class="title">'.JText::_($this->element['label']).'</div>'; $html .= ' <div class="title">' . parent::getLabel() . '</div>'; } } else { $html .= PHP_EOL . ' </div><!-- div blockquote } !-->' . PHP_EOL; } if (version_compare(JVERSION, '3.0', 'ge') && $this->HTMLtype == 'div') { $html .= '<!-- blockquote --><div><div>'; } else { $html .= PHP_EOL . ' <ul><li><!-- blockquote ' . $name . ' -->' . PHP_EOL; } return $html; }