- md5
- d8ee5a3f4827dbc3438f4e93bf3e5c66
- sha1
- 5ff41e1eac0bb2c61baae4fdf3eb21f14c98ccf6
- sha256
- 2419338a1259aa943ecd658cad4d4292050f4113a95374d8729a9a1728e6919f
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
<?php
/**
* @package Joomla.Administrator
* @subpackage com_privacy
*
* @copyright (C) 2018 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
/**
* Capabilities view class
*
* @since 3.9.0
*/
class PrivacyViewCapabilities extends JViewLegacy
{
/**
* The reported extension capabilities
*
* @var array
* @since 3.9.0
*/
protected $capabilities;
/**
* The HTML markup for the sidebar
*
* @var string
* @since 3.9.0
*/
protected $sidebar;
/**
* The state information
*
* @var JObject
* @since 3.9.0
*/
protected $state;
/**
* Execute and display a template script.
*
* @param string $tpl The name of the template file to parse; automatically searches through the template paths.
*
* @return mixed A string if successful, otherwise an Error object.
*
* @see JViewLegacy::loadTemplate()
* @since 3.9.0
* @throws Exception
*/
public function display($tpl = null)
{
// Initialise variables
$this->capabilities = $this->get('Capabilities');
$this->state = $this->get('State');
// Check for errors.
if (count($errors = $this->get('Errors')))
{
throw new Exception(implode("\n", $errors), 500);
}
$this->addToolbar();
$this->sidebar = JHtmlSidebar::render();
return parent::display($tpl);
}
/**
* Add the page title and toolbar.
*
* @return void
*
* @since 3.9.0
*/
protected function addToolbar()
{
JToolbarHelper::title(JText::_('COM_PRIVACY_VIEW_CAPABILITIES'), 'lock');
JToolbarHelper::preferences('com_privacy');
JToolbarHelper::help('JHELP_COMPONENTS_PRIVACY_CAPABILITIES');
}
}
The same content is in 25 releases, Joomla 3.10.0-alpha2 to 3.10.12. See them all, or every version of this file.