Source for file view.html.php
Documentation is available at view.html.php
* @package Joomla.Administrator
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
* @package Joomla.Administrator
* Override the display method for the view.
* @param string $tpl The name of the template file to parse; automatically searches through the template paths.
* @return mixed A string if successful, otherwise a JError object.
public function display($tpl =
null)
// Initialise view variables.
if (count($errors =
$this->get('Errors')))
throw
new Exception(implode("\n", $errors), 500);
// Get the component HTML helpers
JHtml::addIncludePath(JPATH_COMPONENT.
'/helpers/html');
$input->set('hidemainmenu', 1);
$isNew =
($this->item->id ==
0);
$checkedOut =
!($this->item->checked_out ==
0 ||
$this->item->checked_out ==
$user->get('id'));
// If not checked out, can save the item.
if (!$checkedOut &&
($canDo->get('core.edit') ||
(count($user->getAuthorisedCategories('com_users', 'core.create')))))
if (!$checkedOut &&
(count($user->getAuthorisedCategories('com_users', 'core.create'))))
// If an existing item, can save to a copy.
if (!$isNew &&
(count($user->getAuthorisedCategories('com_users', 'core.create')) >
0))
if (empty($this->item->id))
if ($this->state->params->get('save_history', 0) &&
$user->authorise('core.edit'))
Documentation generated on Tue, 19 Nov 2013 15:18:10 +0100 by phpDocumentor 1.4.3