Source for file view.html.php
Documentation is available at view.html.php
* @package Joomla.Administrator
* @subpackage com_contact
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
* View to edit a contact.
* @package Joomla.Administrator
* @subpackage com_contact
public function display($tpl =
null)
if (count($errors =
$this->get('Errors')))
$this->form->setFieldAttribute('language', 'readonly', 'true');
$this->form->setFieldAttribute('catid', 'readonly', 'true');
* Add the page title and toolbar.
$userId =
$user->get('id');
$isNew =
($this->item->id ==
0);
$checkedOut =
!($this->item->checked_out ==
0 ||
$this->item->checked_out ==
$userId);
// Since we don't track these assets at the item level, use the category id.
// Build the actions for new and existing records.
// For new records, check the create permission.
if ($isNew &&
(count($user->getAuthorisedCategories('com_contact', 'core.create')) >
0))
// Can't save the record if it's checked out.
// Since it's an existing record, check the edit permission, or fall back to edit own if the owner.
if ($canDo->get('core.edit') ||
($canDo->get('core.edit.own') &&
$this->item->created_by ==
$userId))
// We can save this record, but check the create permission to see if we can return to make a new one.
if ($canDo->get('core.create'))
// If checked out, we can still save
if ($canDo->get('core.create'))
if ($this->state->params->get('save_history', 0) &&
$user->authorise('core.edit'))
Documentation generated on Tue, 19 Nov 2013 15:16:57 +0100 by phpDocumentor 1.4.3