Component-Builder/admin/compiler/joomla_3/HtmlView_site.php
Robot d1e1a56671
Stable release of v3.2.0-beta1
Move beta to main repo. Fix #1053 so that the right and left tabs display correctly in Joomla 4&5.
2024-03-02 22:10:30 +02:00

86 lines
2.6 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');###LICENSE_LOCKED_DEFINED###
###SITE_VIEW_HTML_HEADER######SITE_GET_MODULE_JIMPORT###
/**
* ###Component### Html View class for the ###SView###
*/
class ###Component###View###SView### extends HtmlView
{
// Overwriting JView display method
function display($tpl = null)
{
// get combined params of both component and menu
$this->app = Factory::getApplication();
$this->params = $this->app->getParams();
$this->menu = $this->app->getMenu()->getActive();
// get the user object
$this->user = Factory::getUser();###SITE_DIPLAY_METHOD###
}###SITE_EXTRA_DIPLAY_METHODS###
/**
* Prepares the document
*/
protected function _prepareDocument()
{###SITE_LIBRARIES_LOADER######SITE_UIKIT_LOADER######SITE_GOOGLECHART_LOADER######SITE_FOOTABLE_LOADER######SITE_DOCUMENT_METADATA######SITE_DOCUMENT_CUSTOM_PHP###
// add the document default css file
Html::_('stylesheet', 'components/com_###component###/assets/css/###sview###.css', ['version' => 'auto']);###SITE_DOCUMENT_CUSTOM_CSS######SITE_DOCUMENT_CUSTOM_JS######SITE_JAVASCRIPT_FOR_BUTTONS###
}
/**
* Setting the toolbar
*/
protected function addToolBar()
{###SITE_CUSTOM_BUTTONS###
// set help url for this view if found
$this->help_url = ###Component###Helper::getHelpUrl('###sview###');
if (Super___1f28cb53_60d9_4db1_b517_3c7dc6b429ef___Power::check($this->help_url))
{
ToolbarHelper::help('COM_###COMPONENT###_HELP_MANAGER', false, $this->help_url);
}
// now initiate the toolbar
$this->toolbar = Toolbar::getInstance();
}###SITE_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, $sorten = false, $length = 40)
{
// use the helper htmlEscape method instead.
return Super___1f28cb53_60d9_4db1_b517_3c7dc6b429ef___Power::html($var, $this->_charset, $sorten, $length);
}
/**
* Get the Document (helper method toward Joomla 4 and 5)
*/
public function getDocument()
{
$this->document ??= JFactory::getDocument();
return $this->document;
}
}