2017-11-16 04:37:32 +00:00
|
|
|
<?php
|
2021-03-05 03:08:47 +00:00
|
|
|
/**
|
|
|
|
* @package Joomla.Component.Builder
|
|
|
|
*
|
|
|
|
* @created 30th April, 2015
|
2022-07-09 15:45:08 +00:00
|
|
|
* @author Llewellyn van der Merwe <https://dev.vdm.io>
|
|
|
|
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
|
2021-03-05 03:08:47 +00:00
|
|
|
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
|
|
|
|
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
|
|
|
*/
|
|
|
|
|
|
|
|
// No direct access to this file
|
|
|
|
defined('_JEXEC') or die('Restricted access');
|
|
|
|
|
2022-05-25 08:30:55 +00:00
|
|
|
use Joomla\CMS\MVC\Controller\AdminController;
|
2021-03-05 03:08:47 +00:00
|
|
|
use Joomla\Utilities\ArrayHelper;
|
|
|
|
|
|
|
|
/**
|
2022-05-25 08:30:55 +00:00
|
|
|
* Get_snippets Admin Controller
|
2021-03-05 03:08:47 +00:00
|
|
|
*/
|
2022-05-25 08:30:55 +00:00
|
|
|
class ComponentbuilderControllerGet_snippets extends AdminController
|
2021-03-05 03:08:47 +00:00
|
|
|
{
|
2022-05-25 08:30:55 +00:00
|
|
|
/**
|
|
|
|
* The prefix to use with controller messages.
|
|
|
|
*
|
|
|
|
* @var string
|
|
|
|
* @since 1.6
|
|
|
|
*/
|
2021-03-05 03:08:47 +00:00
|
|
|
protected $text_prefix = 'COM_COMPONENTBUILDER_GET_SNIPPETS';
|
2022-05-25 08:30:55 +00:00
|
|
|
|
2021-03-05 03:08:47 +00:00
|
|
|
/**
|
|
|
|
* Proxy for getModel.
|
|
|
|
* @since 2.5
|
|
|
|
*/
|
|
|
|
public function getModel($name = 'Get_snippets', $prefix = 'ComponentbuilderModel', $config = array())
|
|
|
|
{
|
|
|
|
$model = parent::getModel($name, $prefix, array('ignore_request' => true));
|
|
|
|
|
|
|
|
return $model;
|
|
|
|
}
|
|
|
|
|
2022-05-25 08:30:55 +00:00
|
|
|
public function dashboard()
|
2021-03-05 03:08:47 +00:00
|
|
|
{
|
|
|
|
$this->setRedirect(JRoute::_('index.php?option=com_componentbuilder', false));
|
|
|
|
return;
|
2017-11-16 04:37:32 +00:00
|
|
|
}
|
|
|
|
|
2017-12-03 18:09:04 +00:00
|
|
|
public function openLibraries()
|
|
|
|
{
|
|
|
|
// Check for request forgeries
|
|
|
|
JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
|
|
|
|
// redirect to the libraries
|
|
|
|
$this->setRedirect(JRoute::_('index.php?option=com_componentbuilder&view=libraries', false));
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2017-11-16 04:37:32 +00:00
|
|
|
public function openSnippets()
|
|
|
|
{
|
|
|
|
// Check for request forgeries
|
|
|
|
JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
|
2017-12-03 18:09:04 +00:00
|
|
|
// redirect to the snippets
|
2017-11-16 04:37:32 +00:00
|
|
|
$this->setRedirect(JRoute::_('index.php?option=com_componentbuilder&view=snippets', false));
|
|
|
|
return;
|
|
|
|
}
|
2017-11-20 12:35:30 +00:00
|
|
|
|
|
|
|
public function openSiteViews()
|
|
|
|
{
|
|
|
|
// Check for request forgeries
|
|
|
|
JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
|
2017-12-03 18:09:04 +00:00
|
|
|
// redirect to the site views
|
2017-11-20 12:35:30 +00:00
|
|
|
$this->setRedirect(JRoute::_('index.php?option=com_componentbuilder&view=site_views', false));
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function openCustomAdminViews()
|
|
|
|
{
|
|
|
|
// Check for request forgeries
|
|
|
|
JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
|
2017-12-03 18:09:04 +00:00
|
|
|
// redirect to the custom admin views
|
2017-11-20 12:35:30 +00:00
|
|
|
$this->setRedirect(JRoute::_('index.php?option=com_componentbuilder&view=custom_admin_views', false));
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function openTemplates()
|
|
|
|
{
|
|
|
|
// Check for request forgeries
|
|
|
|
JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
|
2017-12-03 18:09:04 +00:00
|
|
|
// redirect to the templates
|
2017-11-20 12:35:30 +00:00
|
|
|
$this->setRedirect(JRoute::_('index.php?option=com_componentbuilder&view=templates', false));
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function openLayouts()
|
|
|
|
{
|
|
|
|
// Check for request forgeries
|
|
|
|
JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
|
2017-12-03 18:09:04 +00:00
|
|
|
// redirect to the layouts
|
2017-11-20 12:35:30 +00:00
|
|
|
$this->setRedirect(JRoute::_('index.php?option=com_componentbuilder&view=layouts', false));
|
|
|
|
return;
|
2021-03-05 03:08:47 +00:00
|
|
|
}
|
|
|
|
}
|