= 4) $this->hiddenLabel = true; } protected function getInput() { if (Version::MAJOR_VERSION >= 4) { return $this->getHtml(); } return ''; } protected function getLabel() { if (Version::MAJOR_VERSION < 4) { // Joomla 3 hack inspired by Note field return '
' . Text::_('PLG_SYSTEM_N3TCOOKIECONSENT_CFG_USAGE_ENABLE_PLUGIN_FIRST') . '
'; else { $plugin = PluginHelper::getPlugin('system', 'n3tcookieconsent'); $params = new Registry($plugin->params); $hasDefinition = false; $blocks = (array)$params->get('blocks', []); foreach ($blocks as $block) { if (isset($block->cookies) && !empty($block->cookies)) { $hasDefinition = true; break; } } if (!$hasDefinition) $html.= '' . Text::_('PLG_SYSTEM_N3TCOOKIECONSENT_CFG_USAGE_SETUP_COOKIES_FIRST') . '
'; } return $html; } }