Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Frontend controller for com_api #31

Open
wants to merge 3 commits into
base: release-2.6.0
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions code/site/controller.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<?php
/**
* @version CVS: 1.0.0
* @package Com_Api
* @author Parth Lawate <[email protected]>
* @copyright Copyright (C) 2014. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
// No direct access
defined('_JEXEC') or die;

jimport('joomla.application.component.controller');

/**
* Class ApiController
*
* @since 1.6
*/
class ApiFrontendController extends JControllerLegacy
{
/**
* Method to display a view.
*
* @param boolean $cachable If true, the view output will be cached
* @param mixed $urlparams An array of safe url parameters and their variable types, for valid values see {@link JFilterInput::clean()}.
*
* @return JController This object to support chaining.
*
* @since 1.5
*/
public function display($cachable = false, $urlparams = false)
{
$app = JFactory::getApplication();
$view = $app->input->getCmd('view', 'keys');
$app->input->set('view', $view);

parent::display($cachable, $urlparams);

return $this;
}
}