- md5
- c92d5d3d61f72301e9f8619182d373ad
- sha1
- fd20e124b2721b37e3ace42c4c1b63ea30a8ea67
- sha256
- 36ebc6a2adc42b9f037dc1c7d1a441c50c7095985f655ac4e40ff4b5f4a38c67
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
<?php
/**
* @package Joomla.Administrator
* @subpackage com_languages
* @copyright Copyright (C) 2005 - 2012 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
// Check to ensure this file is included in Joomla!
defined('_JEXEC') or die;
jimport('joomla.application.component.view');
/**
* View for language overrides list
*
* @package Joomla.Administrator
* @subpackage com_languages
* @since 2.5
*/
class LanguagesViewOverrides extends JView
{
/**
* The items to list
*
* @var array
* @since 2.5
*/
protected $items;
/**
* The pagination object
*
* @var object
* @since 2.5
*/
protected $pagination;
/**
* The model state
*
* @var object
* @since 2.5
*/
protected $state;
/**
* Displays the view
*
* @param string $tpl The name of the template file to parse
*
* @return void
*
* @since 2.5
*/
function display($tpl = null)
{
jimport('joomla.language.helper');
// Get data from the model
$this->state = $this->get('State');
$this->items = $this->get('Overrides');
$this->languages = $this->get('Languages');
$this->pagination = $this->get('Pagination');
// Check for errors
if (count($errors = $this->get('Errors')))
{
throw new Exception(implode("\n", $errors));
return;
}
$this->addToolbar();
parent::display($tpl);
}
/**
* Adds the page title and toolbar
*
* @return void
*
* @since 2.5
*/
protected function addToolbar()
{
// Get the results for each action
$canDo = LanguagesHelper::getActions();
JToolBarHelper::title(JText::_('COM_LANGUAGES_VIEW_OVERRIDES_TITLE'), 'langmanager');
if ($canDo->get('core.create'))
{
JToolbarHelper::addNew('override.add');
}
if ($canDo->get('core.edit') && $this->pagination->total)
{
JToolbarHelper::editList('override.edit');
}
if ($canDo->get('core.delete') && $this->pagination->total)
{
JToolbarHelper::deleteList('', 'overrides.delete');
}
if ($canDo->get('core.admin'))
{
JToolBarHelper::preferences('com_languages');
}
JToolBarHelper::divider();
JToolBarHelper::help('JHELP_EXTENSIONS_LANGUAGE_MANAGER_OVERRIDES');
}
}
The same content is in 5 releases, Joomla 2.5.0 to 2.5.4. See them all, or every version of this file.