2016-01-30 20:28:43 +00:00
|
|
|
<?php
|
2018-08-07 13:27:08 +00:00
|
|
|
/**
|
|
|
|
* @package Joomla.Component.Builder
|
|
|
|
*
|
|
|
|
* @created 30th April, 2015
|
|
|
|
* @author Llewellyn van der Merwe <http://www.joomlacomponentbuilder.com>
|
|
|
|
* @github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder>
|
|
|
|
* @copyright Copyright (C) 2015 - 2018 Vast Development Method. All rights reserved.
|
|
|
|
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
|
|
|
*/
|
2016-01-30 20:28:43 +00:00
|
|
|
|
|
|
|
// No direct access to this file
|
|
|
|
defined('_JEXEC') or die('Restricted access');
|
|
|
|
?>
|
|
|
|
###BOM###
|
|
|
|
|
|
|
|
// No direct access to this file
|
2018-08-07 12:25:26 +00:00
|
|
|
defined('_JEXEC') or die('Restricted access'); ###LICENSE_LOCKED_DEFINED######CUSTOM_ADMIN_GET_MODULE_JIMPORT###
|
2016-01-30 20:28:43 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* ###Component### View class for the ###SView###
|
|
|
|
*/
|
|
|
|
class ###Component###View###SView### extends JViewLegacy
|
|
|
|
{
|
|
|
|
// Overwriting JView display method
|
|
|
|
function display($tpl = null)
|
|
|
|
{
|
2017-12-14 23:10:47 +00:00
|
|
|
// get component params
|
2017-12-15 01:10:10 +00:00
|
|
|
$this->params = JComponentHelper::getParams('com_###component###');
|
2016-01-30 20:28:43 +00:00
|
|
|
// get the application
|
2017-12-15 01:10:10 +00:00
|
|
|
$this->app = JFactory::getApplication();
|
2016-01-30 20:28:43 +00:00
|
|
|
// get the user object
|
2017-12-15 01:10:10 +00:00
|
|
|
$this->user = JFactory::getUser();
|
2017-12-14 23:10:47 +00:00
|
|
|
// get global action permissions
|
2017-12-15 01:10:10 +00:00
|
|
|
$this->canDo = ###Component###Helper::getActions('###sview###');###CUSTOM_ADMIN_DIPLAY_METHOD###
|
2016-01-30 20:28:43 +00:00
|
|
|
}###CUSTOM_ADMIN_EXTRA_DIPLAY_METHODS###
|
|
|
|
|
2017-12-14 23:10:47 +00:00
|
|
|
/**
|
2016-01-30 20:28:43 +00:00
|
|
|
* Prepares the document
|
|
|
|
*/
|
|
|
|
protected function setDocument()
|
2018-09-11 20:28:17 +00:00
|
|
|
{###CUSTOM_ADMIN_LIBRARIES_LOADER######CUSTOM_ADMIN_DOCUMENT_METADATA######CUSTOM_ADMIN_UIKIT_LOADER######CUSTOM_ADMIN_GOOGLECHART_LOADER######CUSTOM_ADMIN_FOOTABLE_LOADER######CUSTOM_ADMIN_DOCUMENT_CUSTOM_PHP###
|
2017-12-14 23:10:47 +00:00
|
|
|
// add the document default css file
|
2018-09-11 20:28:17 +00:00
|
|
|
$this->document->addStyleSheet(JURI::root(true) .'/administrator/components/com_###component###/assets/css/###sview###.css', (###Component###Helper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css');###CUSTOM_ADMIN_DOCUMENT_CUSTOM_CSS######CUSTOM_ADMIN_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()
|
2020-04-23 21:15:07 +00:00
|
|
|
{###HIDEMAINMENU###
|
2016-01-30 20:28:43 +00:00
|
|
|
// set the title
|
2016-04-22 12:03:43 +00:00
|
|
|
if (isset($this->item->name) && $this->item->name)
|
2016-01-30 20:28:43 +00:00
|
|
|
{
|
|
|
|
$title = $this->item->name;
|
|
|
|
}
|
|
|
|
// Check for empty title and add view name if param is set
|
|
|
|
if (empty($title))
|
|
|
|
{
|
|
|
|
$title = JText::_('COM_###COMPONENT###_###SVIEW###');
|
|
|
|
}
|
|
|
|
// add title to the page
|
2020-04-23 21:15:07 +00:00
|
|
|
JToolbarHelper::title($title,'###ICOMOON###');###CUSTOM_ADMIN_CUSTOM_BUTTONS###
|
2016-01-30 20:28:43 +00:00
|
|
|
|
|
|
|
// set help url for this view if found
|
2017-12-14 23:10:47 +00:00
|
|
|
$help_url = ###Component###Helper::getHelpUrl('###sviews###');
|
|
|
|
if (###Component###Helper::checkString($help_url))
|
|
|
|
{
|
2016-01-30 20:28:43 +00:00
|
|
|
JToolbarHelper::help('COM_###COMPONENT###_HELP_MANAGER', false, $help_url);
|
2017-12-14 23:10:47 +00:00
|
|
|
}
|
2016-01-30 20:28:43 +00:00
|
|
|
|
2017-12-14 23:10:47 +00:00
|
|
|
// add the options comp button
|
|
|
|
if ($this->canDo->get('core.admin') || $this->canDo->get('core.options'))
|
2016-01-30 20:28:43 +00:00
|
|
|
{
|
|
|
|
JToolBarHelper::preferences('com_###component###');
|
|
|
|
}
|
|
|
|
}###CUSTOM_ADMIN_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)
|
|
|
|
{
|
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);
|
|
|
|
}
|
|
|
|
}
|
2017-12-14 23:10:47 +00:00
|
|
|
?>
|