joomla-component/site/controller.php
Robot 88104fd483
Stable release of v3.0.0
Move all JText to use the namespaced class Text directly. Move all JHtml to use the namespaced class Html directly. Move all JFactory to use the namespaced class Factory directly. Move all JRoute to use the namespaced class Route directly. Move all JFormHelper to use the namespaced class FormHelper directly. Move all JLayout to use the namespaced class FileLayout directly. Move all JLanguageMultilang to use the namespaced class Multilanguage directly. Move all JComponentHelper to use the namespaced class ComponentHelper directly. Move all JCategoryNode to use the namespaced class CategoryNode directly. Move all JComponentHelper to use the namespaced class ComponentHelper directly. Move all JToolbar to use the namespaced class Toolbar directly. Move all JToolbarHelper to use the namespaced class ToolbarHelper directly. Convert all addStyleSheet to make use of Html class instead. Convert all addScript to make use of Html class instead.
2024-01-22 10:48:28 +02:00

99 lines
2.7 KiB
PHP

<?php
/*----------------------------------------------------------------------------------| io.vdm.dev |----/
Vast Development Method
/-------------------------------------------------------------------------------------------------------/
@package getBible.net
@created 3rd December, 2015
@author Llewellyn van der Merwe <https://getbible.net>
@git Get Bible <https://git.vdm.dev/getBible>
@github Get Bible <https://github.com/getBible>
@support Get Bible <https://git.vdm.dev/getBible/support>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
/------------------------------------------------------------------------------------------------------*/
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Factory;
use Joomla\CMS\MVC\Controller\BaseController;
use Joomla\CMS\Router\Route;
use Joomla\Utilities\ArrayHelper;
use Joomla\CMS\Language\Text;
use VDM\Joomla\Utilities\StringHelper;
use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper;
/**
* Getbible Component Base Controller
*/
class GetbibleController extends BaseController
{
/**
* Method to display a view.
*
* @param boolean $cachable If true, the view output will be cached.
* @param boolean $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.
*
*/
function display($cachable = false, $urlparams = false)
{
// we may need to make this more dynamic in the future. (TODO)
$safeurlparams = array(
'ref' => 'STRING',
't' => 'STRING',
'version' => 'STRING',
'translation' => 'STRING',
'b' => 'INT',
'book' => 'INT',
'target_book' => 'INT',
'c' => 'INT',
'chapter' => 'INT',
'verse' => 'STRING',
'v' => 'STRING',
'criteria' => 'STRING',
'words' => 'STRING',
'match' => 'STRING',
'case' => 'STRING',
'target' => 'STRING',
'guid' => 'STRING',
'tag' => 'STRING',
'linker' => 'STRING',
'return' => 'BASE64',
'bibleurl' => 'BASE64',
'layout' => 'STRING',
'format' => 'STRING',
'Itemid' => 'INT'
);
// should these not merge?
if (UtilitiesArrayHelper::check($urlparams))
{
$safeurlparams = UtilitiesArrayHelper::merge(array($urlparams, $safeurlparams));
}
return parent::display($cachable, $safeurlparams);
}
protected function checkEditView($view)
{
if (StringHelper::check($view))
{
$views = array(
);
// check if this is a edit view
if (in_array($view,$views))
{
return true;
}
}
return false;
}
}