Added more header options and renamed the header method in the compiler.

This commit is contained in:
2020-12-26 22:28:36 +02:00
parent a28c5cf746
commit d36410281d
16 changed files with 132 additions and 102 deletions

View File

@ -17,10 +17,7 @@ defined('_JEXEC') or die('Restricted access');
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Language\Language;
use Joomla\Registry\Registry;
use Joomla\String\StringHelper;
use Joomla\Utilities\ArrayHelper;###ADMIN_HELPER_CLASS_HEADER###
###ADMIN_HELPER_CLASS_HEADER###
/**
* ###Component### component helper.

View File

@ -17,10 +17,7 @@ defined('_JEXEC') or die('Restricted access');
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Language\Language;
use Joomla\Registry\Registry;
use Joomla\String\StringHelper;
use Joomla\Utilities\ArrayHelper;###SITE_HELPER_CLASS_HEADER###
###SITE_HELPER_CLASS_HEADER###
/**
* ###Component### component helper

View File

@ -16,7 +16,8 @@ defined('_JEXEC') or die('Restricted access');
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
JHtml::_('behavior.tabstate');
###ADMIN_COMPONENT_HEADER###
// Access check.
if (!JFactory::getUser()->authorise('core.manage', 'com_###component###'))

View File

@ -16,7 +16,8 @@ defined('_JEXEC') or die('Restricted access');
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
JHtml::_('behavior.tabstate');
###SITE_COMPONENT_HEADER###
// Set the component css/js
$document = JFactory::getDocument();
@ -24,7 +25,7 @@ $document->addStyleSheet('components/com_###component###/assets/css/site.css');
$document->addScript('components/com_###component###/assets/js/site.js');
// Require helper files
JLoader::register('###Component###Helper', __DIR__ . '/helpers/###component###.php'); ###HELPER_EMAIL###
JLoader::register('###Component###Helper', __DIR__ . '/helpers/###component###.php');###HELPER_EMAIL###
JLoader::register('###Component###HelperRoute', __DIR__ . '/helpers/route.php');###LICENSE_LOCKED_INT### ###SITE_GLOBAL_EVENT###
// Get an instance of the controller prefixed by ###Component###