forked from joomla/Component-Builder
Robot
0193ab735c
Add fallback option to ensure that all JCB tables and fields exist. Move the powers autoloader to its own file.
45 lines
1.5 KiB
PHP
45 lines
1.5 KiB
PHP
<?php
|
|
/**
|
|
* @package Joomla.Component.Builder
|
|
*
|
|
* @created 30th April, 2015
|
|
* @author Llewellyn van der Merwe <https://dev.vdm.io>
|
|
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
|
|
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
|
|
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
|
*/
|
|
|
|
// No direct access to this file
|
|
defined('_JEXEC') or die('Restricted access');
|
|
?>
|
|
###BOM###
|
|
|
|
// No direct access to this file
|
|
defined('_JEXEC') or die('Restricted access');
|
|
|
|
// The power autoloader for this project site area.
|
|
$power_autoloader = JPATH_SITE . '/components/com_###component###/helpers/powerloader.php';
|
|
if (file_exists($power_autoloader))
|
|
{
|
|
require_once $power_autoloader;
|
|
}
|
|
|
|
###SITE_COMPONENT_HEADER###
|
|
|
|
// Set the component css/js
|
|
Html::_('stylesheet', 'components/com_###component###/assets/css/site.css', ['version' => 'auto']);
|
|
Html::_('script', 'components/com_###component###/assets/js/site.js', ['version' => 'auto']);
|
|
|
|
// Require helper files
|
|
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###
|
|
$controller = BaseController::getInstance('###Component###');
|
|
|
|
// Perform the request task
|
|
$controller->execute(Factory::getApplication()->input->get('task'));
|
|
|
|
// Redirect if set by the controller
|
|
$controller->redirect();
|