Component-Builder/admin/controllers/joomla_modules.php

53 lines
1.6 KiB
PHP
Raw Normal View History

2019-12-03 02:17:35 +00:00
<?php
/**
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <http://www.joomlacomponentbuilder.com>
* @github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder>
* @copyright Copyright (C) 2015 - 2020 Vast Development Method. All rights reserved.
2019-12-03 02:17:35 +00:00
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
/**
* Joomla_modules Controller
*/
class ComponentbuilderControllerJoomla_modules extends JControllerAdmin
{
/**
* The prefix to use with controller messages.
*
* @var string
* @since 1.6
*/
protected $text_prefix = 'COM_COMPONENTBUILDER_JOOMLA_MODULES';
/**
* Method to get a model object, loading it if required.
*
* @param string $name The model name. Optional.
* @param string $prefix The class prefix. Optional.
* @param array $config Configuration array for model. Optional.
*
* @return JModelLegacy The model.
*
* @since 1.6
*/
public function getModel($name = 'Joomla_module', $prefix = 'ComponentbuilderModel', $config = array('ignore_request' => true))
{
return parent::getModel($name, $prefix, $config);
}
public function getSnippets()
{
// Check for request forgeries
JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
// redirect to the import snippets custom admin view
$this->setRedirect(JRoute::_('index.php?option=com_componentbuilder&view=get_snippets', false));
return;
}
}