2021-03-05 03:08:47 +00:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* @package Joomla.Component.Builder
|
|
|
|
*
|
|
|
|
* @created 30th April, 2015
|
2024-03-09 19:52:51 +00:00
|
|
|
* @author Llewellyn van der Merwe <https://dev.vdm.io>
|
|
|
|
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
|
2021-03-05 03:08:47 +00:00
|
|
|
* @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
|
2024-03-09 19:52:51 +00:00
|
|
|
defined('_JEXEC') or die('Restricted access'); ###LICENSE_LOCKED_DEFINED###
|
2022-05-25 08:30:55 +00:00
|
|
|
|
2024-03-09 19:52:51 +00:00
|
|
|
###CUSTOM_ADMIN_VIEW_HTML_HEADER######CUSTOM_ADMIN_GET_MODULE_JIMPORT###
|
2022-05-25 08:30:55 +00:00
|
|
|
|
2021-03-05 03:08:47 +00:00
|
|
|
/**
|
2022-05-25 08:30:55 +00:00
|
|
|
* ###Component### Html View class for the ###SView###
|
2021-03-05 03:08:47 +00:00
|
|
|
*/
|
2022-05-25 08:30:55 +00:00
|
|
|
class ###Component###View###SView### extends HtmlView
|
2021-03-05 03:08:47 +00:00
|
|
|
{
|
|
|
|
// Overwriting JView display method
|
|
|
|
function display($tpl = null)
|
|
|
|
{
|
|
|
|
// get component params
|
2024-03-09 19:52:51 +00:00
|
|
|
$this->params = ComponentHelper::getParams('com_###component###');
|
2021-03-05 03:08:47 +00:00
|
|
|
// get the application
|
2024-03-09 19:52:51 +00:00
|
|
|
$this->app = Factory::getApplication();
|
2021-03-05 03:08:47 +00:00
|
|
|
// get the user object
|
2024-03-09 19:52:51 +00:00
|
|
|
$this->user = Factory::getUser();
|
2021-03-05 03:08:47 +00:00
|
|
|
// get global action permissions
|
|
|
|
$this->canDo = ###Component###Helper::getActions('###sview###');###CUSTOM_ADMIN_DIPLAY_METHOD###
|
2024-09-29 23:55:59 +00:00
|
|
|
|
|
|
|
// Display the template
|
|
|
|
parent::display($tpl);
|
2021-03-05 03:08:47 +00:00
|
|
|
}###CUSTOM_ADMIN_EXTRA_DIPLAY_METHODS###
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Prepares the document
|
|
|
|
*/
|
|
|
|
protected function setDocument()
|
|
|
|
{###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###
|
|
|
|
// add the document default css file
|
2024-03-09 19:52:51 +00:00
|
|
|
Html::_('stylesheet', 'administrator/components/com_###component###/assets/css/###sview###.css', ['version' => 'auto']);###CUSTOM_ADMIN_DOCUMENT_CUSTOM_CSS######CUSTOM_ADMIN_DOCUMENT_CUSTOM_JS###
|
2021-03-05 03:08:47 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Setting the toolbar
|
|
|
|
*/
|
|
|
|
protected function addToolBar()
|
|
|
|
{###HIDEMAINMENU###
|
|
|
|
// set the title
|
|
|
|
if (isset($this->item->name) && $this->item->name)
|
|
|
|
{
|
|
|
|
$title = $this->item->name;
|
|
|
|
}
|
|
|
|
// Check for empty title and add view name if param is set
|
|
|
|
if (empty($title))
|
|
|
|
{
|
2024-03-09 19:52:51 +00:00
|
|
|
$title = Text::_('COM_###COMPONENT###_###SVIEW###');
|
2021-03-05 03:08:47 +00:00
|
|
|
}
|
|
|
|
// add title to the page
|
2024-03-09 19:52:51 +00:00
|
|
|
ToolbarHelper::title($title,'###ICOMOON###');###CUSTOM_ADMIN_CUSTOM_BUTTONS###
|
2021-03-05 03:08:47 +00:00
|
|
|
|
|
|
|
// set help url for this view if found
|
2022-02-12 22:28:17 +00:00
|
|
|
$this->help_url = ###Component###Helper::getHelpUrl('###sviews###');
|
2024-03-09 19:52:51 +00:00
|
|
|
if (Super___1f28cb53_60d9_4db1_b517_3c7dc6b429ef___Power::check($this->help_url))
|
2021-03-05 03:08:47 +00:00
|
|
|
{
|
2024-03-09 19:52:51 +00:00
|
|
|
ToolbarHelper::help('COM_###COMPONENT###_HELP_MANAGER', false, $this->help_url);
|
2021-03-05 03:08:47 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// add the options comp button
|
|
|
|
if ($this->canDo->get('core.admin') || $this->canDo->get('core.options'))
|
|
|
|
{
|
2024-03-09 19:52:51 +00:00
|
|
|
ToolbarHelper::preferences('com_###component###');
|
2021-03-05 03:08:47 +00:00
|
|
|
}
|
|
|
|
}###CUSTOM_ADMIN_GET_MODULE###
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 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)
|
|
|
|
{
|
|
|
|
// use the helper htmlEscape method instead.
|
2024-03-09 19:52:51 +00:00
|
|
|
return Super___1f28cb53_60d9_4db1_b517_3c7dc6b429ef___Power::html($var, $this->_charset);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Get the Document (helper method toward Joomla 4 and 5)
|
|
|
|
*/
|
|
|
|
public function getDocument()
|
|
|
|
{
|
|
|
|
$this->document ??= JFactory::getDocument();
|
|
|
|
|
|
|
|
return $this->document;
|
2021-03-05 03:08:47 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
?>
|