[ Index ] |
PHP Cross Reference of Joomla 4.2.2 documentation |
[Summary view] [Print] [Text view]
1 <?php 2 3 /** 4 * @package Joomla.Administrator 5 * @subpackage com_contact 6 * 7 * @copyright (C) 2008 Open Source Matters, Inc. <https://www.joomla.org> 8 * @license GNU General Public License version 2 or later; see LICENSE.txt 9 */ 10 11 namespace Joomla\Component\Contact\Administrator\Controller; 12 13 use Joomla\CMS\Language\Text; 14 use Joomla\CMS\MVC\Controller\BaseController; 15 use Joomla\CMS\Router\Route; 16 17 // phpcs:disable PSR1.Files.SideEffects 18 \defined('_JEXEC') or die; 19 // phpcs:enable PSR1.Files.SideEffects 20 21 /** 22 * Component Controller 23 * 24 * @since 1.5 25 */ 26 class DisplayController extends BaseController 27 { 28 /** 29 * The default view. 30 * 31 * @var string 32 * @since 1.6 33 */ 34 protected $default_view = 'contacts'; 35 36 /** 37 * Method to display a view. 38 * 39 * @param boolean $cachable If true, the view output will be cached 40 * @param array $urlparams An array of safe URL parameters and their variable types, for valid values see {@link \JFilterInput::clean()}. 41 * 42 * @return static |boolean This object to support chaining. False on failure. 43 * 44 * @since 1.5 45 */ 46 public function display($cachable = false, $urlparams = array()) 47 { 48 $view = $this->input->get('view', $this->default_view); 49 $layout = $this->input->get('layout', 'default'); 50 $id = $this->input->getInt('id'); 51 52 // Check for edit form. 53 if ($view == 'contact' && $layout == 'edit' && !$this->checkEditId('com_contact.edit.contact', $id)) { 54 // Somehow the person just went to the form - we don't allow that. 55 if (!\count($this->app->getMessageQueue())) { 56 $this->setMessage(Text::sprintf('JLIB_APPLICATION_ERROR_UNHELD_ID', $id), 'error'); 57 } 58 59 $this->setRedirect(Route::_('index.php?option=com_contact&view=contacts', false)); 60 61 return false; 62 } 63 64 return parent::display(); 65 } 66 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Wed Sep 7 05:41:13 2022 | Chilli.vc Blog - For Webmaster,Blog-Writer,System Admin and Domainer |