- md5
- 85a0f430e1c0274198d4cfab0c488bdf
- sha1
- a46c44547c4465f208c4948227f41dfb05c3b065
- sha256
- 8530e2544a89a34d3c640fbe0dd15284afafb387526a14fa9ad11b8df94f7834
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
<?php
/**
* @package Joomla.Administrator
* @subpackage com_actionlogs
*
* @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
use Joomla\CMS\Component\ComponentHelper;
use Joomla\Registry\Registry;
use Joomla\CMS\Plugin\PluginHelper;
/**
* View class for a list of logs.
*
* @since 3.9.0
*/
class ActionlogsViewActionlogs extends JViewLegacy
{
/**
* An array of items.
*
* @var array
* @since 3.9.0
*/
protected $items;
/**
* The model state
*
* @var array
* @since 3.9.0
*/
protected $state;
/**
* The pagination object
*
* @var JPagination
* @since 3.9.0
*/
protected $pagination;
/**
* The active search filters
*
* @var array
* @since 3.9.0
*/
public $activeFilters;
/**
* Method to display the view.
*
* @param string $tpl A template file to load. [optional]
*
* @return mixed A string if successful, otherwise an Error object.
*
* @since 3.9.0
*/
public function display($tpl = null)
{
$params = ComponentHelper::getParams('com_actionlogs');
$this->items = $this->get('Items');
$this->state = $this->get('State');
$this->filterForm = $this->get('FilterForm');
$this->activeFilters = $this->get('ActiveFilters');
$this->pagination = $this->get('Pagination');
$this->showIpColumn = (bool) $params->get('ip_logging', 0);
if (count($errors = $this->get('Errors')))
{
JError::raiseError(500, implode("\n", $errors));
return false;
}
$this->addToolBar();
// Load all actionlog plugins language files
ActionlogsHelper::loadActionLogPluginsLanguage();
return parent::display($tpl);
}
/**
* Add the page title and toolbar.
*
* @return void
*
* @since 3.9.0
*/
protected function addToolbar()
{
JToolbarHelper::title(JText::_('COM_ACTIONLOGS_MANAGER_USERLOGS'), 'list-2');
JToolbarHelper::deleteList('JGLOBAL_CONFIRM_DELETE', 'actionlogs.delete');
$bar = JToolbar::getInstance('toolbar');
$bar->appendButton('Confirm', 'COM_ACTIONLOGS_PURGE_CONFIRM', 'delete', 'COM_ACTIONLOGS_TOOLBAR_PURGE', 'actionlogs.purge', false);
JToolbarHelper::preferences('com_actionlogs');
JToolbarHelper::help('JHELP_COMPONENTS_ACTIONLOGS');
JToolBarHelper::custom('actionlogs.exportSelectedLogs', 'download', '', 'COM_ACTIONLOGS_EXPORT_CSV', true);
JToolBarHelper::custom('actionlogs.exportLogs', 'download', '', 'COM_ACTIONLOGS_EXPORT_ALL_CSV', false);
}
}
The same content is in 7 releases, Joomla 3.9.0-alpha to 3.9.0-rc2. See them all, or every version of this file.