Source for file controller.php
Documentation is available at controller.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
* Typical view method for MVC based architecture
* This function is provide as a default implementation, in most cases
* you will need to override it in your own controllers.
* @param boolean If true, the view output will be cached
* @param array An array of safe url parameters and their variable types, for valid values see {@link JFilterInput::clean()}.
* @return JController This object to support chaining.
public function display($cachable =
false, $urlparams =
false)
// Special treatment is required for this component, as this view may be called
// after a session timeout. We must reset the view and layout prior to display
// otherwise an error will occur.
$this->input->set('view', 'login');
$this->input->set('layout', 'default');
* Method to log in a user.
// Check for request forgeries.
$credentials =
$model->getState('credentials');
$return =
$model->getState('return');
$result =
$app->login($credentials, array('action' =>
'core.login.admin'));
if (!($result instanceof
Exception))
* Method to log out a user.
$userid =
$this->input->getInt('uid', null);
'clientid' =>
($userid) ?
0 :
1
$result =
$app->logout($userid, $options);
if (!($result instanceof
Exception))
$return =
$model->getState('return');
Documentation generated on Tue, 19 Nov 2013 14:57:06 +0100 by phpDocumentor 1.4.3