2016-01-30 20:28:43 +00:00
|
|
|
<?php
|
|
|
|
/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/
|
|
|
|
__ __ _ _____ _ _ __ __ _ _ _
|
|
|
|
\ \ / / | | | __ \ | | | | | \/ | | | | | | |
|
|
|
|
\ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| |
|
|
|
|
\ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` |
|
|
|
|
\ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| |
|
|
|
|
\/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_|
|
|
|
|
| |
|
|
|
|
|_|
|
|
|
|
/-------------------------------------------------------------------------------------------------------------------------------/
|
|
|
|
|
|
|
|
@package Component Builder
|
|
|
|
@subpackage componentbuilder.php
|
|
|
|
@author Llewellyn van der Merwe <https://www.vdm.io/joomla-component-builder>
|
|
|
|
@my wife Roline van der Merwe <http://www.vdm.io/>
|
|
|
|
@copyright Copyright (C) 2015. All Rights Reserved
|
|
|
|
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
|
|
|
|
|
|
|
Builds Complex Joomla Components
|
|
|
|
|
|
|
|
/-----------------------------------------------------------------------------------------------------------------------------*/
|
|
|
|
|
|
|
|
// 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');###LICENSE_LOCKED_DEFINED###
|
|
|
|
|
|
|
|
// import Joomla view library
|
|
|
|
jimport('joomla.application.component.view');###SITE_GET_MODULE_JIMPORT###
|
|
|
|
|
|
|
|
/**
|
|
|
|
* ###Component### View class for the ###SViews###
|
|
|
|
*/
|
|
|
|
class ###Component###View###SViews### extends JViewLegacy
|
|
|
|
{
|
|
|
|
// Overwriting JView display method
|
|
|
|
function display($tpl = null)
|
2017-10-14 17:18:29 +00:00
|
|
|
{
|
2016-01-30 20:28:43 +00:00
|
|
|
// get combined params of both component and menu
|
|
|
|
$this->app = JFactory::getApplication();
|
|
|
|
$this->params = $this->app->getParams();
|
|
|
|
$this->menu = $this->app->getMenu()->getActive();
|
|
|
|
// get the user object
|
|
|
|
$this->user = JFactory::getUser();###SITE_DIPLAY_METHOD###
|
|
|
|
}###SITE_EXTRA_DIPLAY_METHODS###
|
|
|
|
|
2017-12-14 23:10:47 +00:00
|
|
|
/**
|
2016-01-30 20:28:43 +00:00
|
|
|
* Prepares the document
|
|
|
|
*/
|
|
|
|
protected function _prepareDocument()
|
2017-12-10 19:17:26 +00:00
|
|
|
{###SITE_LIBRARIES_LOADER### ###SITE_UIKIT_LOADER### ###SITE_GOOGLECHART_LOADER### ###SITE_FOOTABLE_LOADER### ###SITE_DOCUMENT_METADATA### ###SITE_DOCUMENT_CUSTOM_PHP###
|
2016-01-30 20:28:43 +00:00
|
|
|
// add the document default css file
|
2017-12-22 19:46:03 +00:00
|
|
|
$this->document->addStyleSheet(JURI::root(true) .'/components/com_###component###/assets/css/###sview###.css', array('version' => 'auto'));###SITE_DOCUMENT_CUSTOM_CSS### ###SITE_DOCUMENT_CUSTOM_JS###
|
2017-12-14 23:10:47 +00:00
|
|
|
}
|
2016-01-30 20:28:43 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Setting the toolbar
|
|
|
|
*/
|
|
|
|
protected function addToolBar()
|
|
|
|
{
|
|
|
|
// adding the joomla toolbar to the front
|
|
|
|
JLoader::register('JToolbarHelper', JPATH_ADMINISTRATOR.'/includes/toolbar.php');###SITE_CUSTOM_BUTTONS###
|
|
|
|
|
|
|
|
// set help url for this view if found
|
|
|
|
$help_url = ###Component###Helper::getHelpUrl('###sviews###');
|
|
|
|
if (###Component###Helper::checkString($help_url))
|
|
|
|
{
|
|
|
|
JToolbarHelper::help('COM_###COMPONENT###_HELP_MANAGER', false, $help_url);
|
|
|
|
}
|
|
|
|
// now initiate the toolbar
|
|
|
|
$this->toolbar = JToolbar::getInstance();
|
|
|
|
}###SITE_GET_MODULE###
|
|
|
|
|
2017-12-14 23:10:47 +00:00
|
|
|
/**
|
2016-01-30 20:28:43 +00:00
|
|
|
* Escapes a value for output in a view script.
|
|
|
|
*
|
|
|
|
* @param mixed $var The output to escape.
|
|
|
|
*
|
|
|
|
* @return mixed The escaped value.
|
|
|
|
*/
|
|
|
|
public function escape($var, $sorten = false, $length = 40)
|
|
|
|
{
|
2017-12-14 23:10:47 +00:00
|
|
|
// use the helper htmlEscape method instead.
|
2016-01-30 20:28:43 +00:00
|
|
|
return ###Component###Helper::htmlEscape($var, $this->_charset, $sorten, $length);
|
|
|
|
}
|
|
|
|
}
|