Major upgrade, with new filter system, and many bug fixes. #618
33
README.md
33
README.md
@ -10,9 +10,9 @@ This is a [Joomla 3.x](https://extensions.joomla.org/extension/component-builder
|
||||
|
||||
The Component Builder for [Joomla](https://extensions.joomla.org/extension/component-builder/) is highly advanced tool that is truly able to build extremely complex components in a fraction of the time.
|
||||
|
||||
Whether you're a seasoned [Joomla](https://extensions.joomla.org/extension/component-builder/) developer, or have just started, Component Builder will safe you lots of time and money. A real must have!
|
||||
Whether you're a seasoned [Joomla](https://extensions.joomla.org/extension/component-builder/) developer, or have just started, Component Builder will save you lots of time and money. A real must have!
|
||||
|
||||
You can install it quite easily and with no limitations. On [github](https://github.com/vdm-io/Joomla-Component-Builder/releases) is the latest release (2.11.7) with **ALL** its features and **ALL** concepts totally open-source and free!
|
||||
You can install it quite easily and with no limitations. On [github](https://github.com/vdm-io/Joomla-Component-Builder/releases) is the latest release (2.12.2) with **ALL** its features and **ALL** concepts totally open-source and free!
|
||||
|
||||
> Watch Quick Build of a Hello World component in [JCB on Youtube](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=45)
|
||||
|
||||
@ -133,7 +133,6 @@ Get involved on the forums, and the GitHub issues, and you can even help us deve
|
||||
TODO
|
||||
======
|
||||
|
||||
- Add automatic (REST) API ability for all components build with [JCB](http://joomlacomponentbuilder.com). So we can link any component build with JCB to an Android/Apple APP.
|
||||
- Add automatic unit testing. To nurture pipeline integration for all components build with [JCB](http://joomlacomponentbuilder.com).
|
||||
- Team collaborative development across [JCB](http://joomlacomponentbuilder.com) installations offline and online.
|
||||
- Documentation (maintained by the community) for [JCB](http://joomlacomponentbuilder.com). (help us select the best system for this)
|
||||
@ -144,20 +143,21 @@ TODO
|
||||
+ *Author*: [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com)
|
||||
+ *Name*: [Component Builder](https://github.com/vdm-io/Joomla-Component-Builder)
|
||||
+ *First Build*: 30th April, 2015
|
||||
+ *Last Build*: 29th October, 2020
|
||||
+ *Version*: 2.11.7
|
||||
+ *Last Build*: 12th December, 2020
|
||||
+ *Version*: 2.12.2
|
||||
+ *Copyright*: Copyright (C) 2015 - 2020 Vast Development Method. All rights reserved.
|
||||
+ *License*: GNU General Public License version 2 or later; see LICENSE.txt
|
||||
+ *Line count*: **283847**
|
||||
+ *Field count*: **1536**
|
||||
+ *File count*: **1799**
|
||||
+ *Folder count*: **304**
|
||||
+ *Line count*: **290479**
|
||||
+ *Field count*: **1555**
|
||||
+ *File count*: **1923**
|
||||
+ *Folder count*: **316**
|
||||
|
||||
> This **component** was build with a [Joomla](https://extensions.joomla.org/extension/component-builder/) [Automated Component Builder](http://joomlacomponentbuilder.com).
|
||||
> Developed by [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com)
|
||||
|
||||
|
||||
## Contributors
|
||||
This project exists thanks to all the people who contribute.
|
||||
This project exists thanks to all the people who contribute to the [Joomla Component Builder Project](https://github.com/vdm-io/Joomla-Component-Builder).
|
||||
|
||||
[![Contributors](https://opencollective.com/Joomla-Component-Builder/contributors.svg?width=890&button=false)](https://github.com/vdm-io/Joomla-Component-Builder/graphs/contributors)
|
||||
|
||||
@ -178,4 +178,15 @@ Support this project by becoming a sponsor. Your logo will show up here with a l
|
||||
[![Sponsor](https://opencollective.com/Joomla-Component-Builder/sponsor/6/avatar.svg)](https://opencollective.com/Joomla-Component-Builder/sponsor/6/website)
|
||||
[![Sponsor](https://opencollective.com/Joomla-Component-Builder/sponsor/7/avatar.svg)](https://opencollective.com/Joomla-Component-Builder/sponsor/7/website)
|
||||
[![Sponsor](https://opencollective.com/Joomla-Component-Builder/sponsor/8/avatar.svg)](https://opencollective.com/Joomla-Component-Builder/sponsor/8/website)
|
||||
[![Sponsor](https://opencollective.com/Joomla-Component-Builder/sponsor/9/avatar.svg)](https://opencollective.com/Joomla-Component-Builder/sponsor/9/website)
|
||||
[![Sponsor](https://opencollective.com/Joomla-Component-Builder/sponsor/9/avatar.svg)](https://opencollective.com/Joomla-Component-Builder/sponsor/9/website)
|
||||
[![Sponsor](https://opencollective.com/Joomla-Component-Builder/sponsor/10/avatar.svg)](https://opencollective.com/Joomla-Component-Builder/sponsor/10/website)
|
||||
[![Sponsor](https://opencollective.com/Joomla-Component-Builder/sponsor/11/avatar.svg)](https://opencollective.com/Joomla-Component-Builder/sponsor/11/website)
|
||||
[![Sponsor](https://opencollective.com/Joomla-Component-Builder/sponsor/12/avatar.svg)](https://opencollective.com/Joomla-Component-Builder/sponsor/12/website)
|
||||
[![Sponsor](https://opencollective.com/Joomla-Component-Builder/sponsor/13/avatar.svg)](https://opencollective.com/Joomla-Component-Builder/sponsor/13/website)
|
||||
[![Sponsor](https://opencollective.com/Joomla-Component-Builder/sponsor/14/avatar.svg)](https://opencollective.com/Joomla-Component-Builder/sponsor/14/website)
|
||||
[![Sponsor](https://opencollective.com/Joomla-Component-Builder/sponsor/15/avatar.svg)](https://opencollective.com/Joomla-Component-Builder/sponsor/15/website)
|
||||
[![Sponsor](https://opencollective.com/Joomla-Component-Builder/sponsor/16/avatar.svg)](https://opencollective.com/Joomla-Component-Builder/sponsor/16/website)
|
||||
[![Sponsor](https://opencollective.com/Joomla-Component-Builder/sponsor/17/avatar.svg)](https://opencollective.com/Joomla-Component-Builder/sponsor/17/website)
|
||||
[![Sponsor](https://opencollective.com/Joomla-Component-Builder/sponsor/18/avatar.svg)](https://opencollective.com/Joomla-Component-Builder/sponsor/18/website)
|
||||
[![Sponsor](https://opencollective.com/Joomla-Component-Builder/sponsor/19/avatar.svg)](https://opencollective.com/Joomla-Component-Builder/sponsor/19/website)
|
||||
[![Sponsor](https://opencollective.com/Joomla-Component-Builder/sponsor/20/avatar.svg)](https://opencollective.com/Joomla-Component-Builder/sponsor/20/website)
|
@ -10,9 +10,9 @@ This is a [Joomla 3.x](https://extensions.joomla.org/extension/component-builder
|
||||
|
||||
The Component Builder for [Joomla](https://extensions.joomla.org/extension/component-builder/) is highly advanced tool that is truly able to build extremely complex components in a fraction of the time.
|
||||
|
||||
Whether you're a seasoned [Joomla](https://extensions.joomla.org/extension/component-builder/) developer, or have just started, Component Builder will safe you lots of time and money. A real must have!
|
||||
Whether you're a seasoned [Joomla](https://extensions.joomla.org/extension/component-builder/) developer, or have just started, Component Builder will save you lots of time and money. A real must have!
|
||||
|
||||
You can install it quite easily and with no limitations. On [github](https://github.com/vdm-io/Joomla-Component-Builder/releases) is the latest release (2.11.7) with **ALL** its features and **ALL** concepts totally open-source and free!
|
||||
You can install it quite easily and with no limitations. On [github](https://github.com/vdm-io/Joomla-Component-Builder/releases) is the latest release (2.12.2) with **ALL** its features and **ALL** concepts totally open-source and free!
|
||||
|
||||
> Watch Quick Build of a Hello World component in [JCB on Youtube](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=45)
|
||||
|
||||
@ -133,7 +133,6 @@ Get involved on the forums, and the GitHub issues, and you can even help us deve
|
||||
TODO
|
||||
======
|
||||
|
||||
- Add automatic (REST) API ability for all components build with [JCB](http://joomlacomponentbuilder.com). So we can link any component build with JCB to an Android/Apple APP.
|
||||
- Add automatic unit testing. To nurture pipeline integration for all components build with [JCB](http://joomlacomponentbuilder.com).
|
||||
- Team collaborative development across [JCB](http://joomlacomponentbuilder.com) installations offline and online.
|
||||
- Documentation (maintained by the community) for [JCB](http://joomlacomponentbuilder.com). (help us select the best system for this)
|
||||
@ -144,20 +143,21 @@ TODO
|
||||
+ *Author*: [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com)
|
||||
+ *Name*: [Component Builder](https://github.com/vdm-io/Joomla-Component-Builder)
|
||||
+ *First Build*: 30th April, 2015
|
||||
+ *Last Build*: 29th October, 2020
|
||||
+ *Version*: 2.11.7
|
||||
+ *Last Build*: 12th December, 2020
|
||||
+ *Version*: 2.12.2
|
||||
+ *Copyright*: Copyright (C) 2015 - 2020 Vast Development Method. All rights reserved.
|
||||
+ *License*: GNU General Public License version 2 or later; see LICENSE.txt
|
||||
+ *Line count*: **283847**
|
||||
+ *Field count*: **1536**
|
||||
+ *File count*: **1799**
|
||||
+ *Folder count*: **304**
|
||||
+ *Line count*: **290479**
|
||||
+ *Field count*: **1555**
|
||||
+ *File count*: **1923**
|
||||
+ *Folder count*: **316**
|
||||
|
||||
> This **component** was build with a [Joomla](https://extensions.joomla.org/extension/component-builder/) [Automated Component Builder](http://joomlacomponentbuilder.com).
|
||||
> Developed by [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com)
|
||||
|
||||
|
||||
## Contributors
|
||||
This project exists thanks to all the people who contribute.
|
||||
This project exists thanks to all the people who contribute to the [Joomla Component Builder Project](https://github.com/vdm-io/Joomla-Component-Builder).
|
||||
|
||||
[![Contributors](https://opencollective.com/Joomla-Component-Builder/contributors.svg?width=890&button=false)](https://github.com/vdm-io/Joomla-Component-Builder/graphs/contributors)
|
||||
|
||||
@ -178,4 +178,15 @@ Support this project by becoming a sponsor. Your logo will show up here with a l
|
||||
[![Sponsor](https://opencollective.com/Joomla-Component-Builder/sponsor/6/avatar.svg)](https://opencollective.com/Joomla-Component-Builder/sponsor/6/website)
|
||||
[![Sponsor](https://opencollective.com/Joomla-Component-Builder/sponsor/7/avatar.svg)](https://opencollective.com/Joomla-Component-Builder/sponsor/7/website)
|
||||
[![Sponsor](https://opencollective.com/Joomla-Component-Builder/sponsor/8/avatar.svg)](https://opencollective.com/Joomla-Component-Builder/sponsor/8/website)
|
||||
[![Sponsor](https://opencollective.com/Joomla-Component-Builder/sponsor/9/avatar.svg)](https://opencollective.com/Joomla-Component-Builder/sponsor/9/website)
|
||||
[![Sponsor](https://opencollective.com/Joomla-Component-Builder/sponsor/9/avatar.svg)](https://opencollective.com/Joomla-Component-Builder/sponsor/9/website)
|
||||
[![Sponsor](https://opencollective.com/Joomla-Component-Builder/sponsor/10/avatar.svg)](https://opencollective.com/Joomla-Component-Builder/sponsor/10/website)
|
||||
[![Sponsor](https://opencollective.com/Joomla-Component-Builder/sponsor/11/avatar.svg)](https://opencollective.com/Joomla-Component-Builder/sponsor/11/website)
|
||||
[![Sponsor](https://opencollective.com/Joomla-Component-Builder/sponsor/12/avatar.svg)](https://opencollective.com/Joomla-Component-Builder/sponsor/12/website)
|
||||
[![Sponsor](https://opencollective.com/Joomla-Component-Builder/sponsor/13/avatar.svg)](https://opencollective.com/Joomla-Component-Builder/sponsor/13/website)
|
||||
[![Sponsor](https://opencollective.com/Joomla-Component-Builder/sponsor/14/avatar.svg)](https://opencollective.com/Joomla-Component-Builder/sponsor/14/website)
|
||||
[![Sponsor](https://opencollective.com/Joomla-Component-Builder/sponsor/15/avatar.svg)](https://opencollective.com/Joomla-Component-Builder/sponsor/15/website)
|
||||
[![Sponsor](https://opencollective.com/Joomla-Component-Builder/sponsor/16/avatar.svg)](https://opencollective.com/Joomla-Component-Builder/sponsor/16/website)
|
||||
[![Sponsor](https://opencollective.com/Joomla-Component-Builder/sponsor/17/avatar.svg)](https://opencollective.com/Joomla-Component-Builder/sponsor/17/website)
|
||||
[![Sponsor](https://opencollective.com/Joomla-Component-Builder/sponsor/18/avatar.svg)](https://opencollective.com/Joomla-Component-Builder/sponsor/18/website)
|
||||
[![Sponsor](https://opencollective.com/Joomla-Component-Builder/sponsor/19/avatar.svg)](https://opencollective.com/Joomla-Component-Builder/sponsor/19/website)
|
||||
[![Sponsor](https://opencollective.com/Joomla-Component-Builder/sponsor/20/avatar.svg)](https://opencollective.com/Joomla-Component-Builder/sponsor/20/website)
|
@ -16,7 +16,7 @@
|
||||
@author ###AUTHOR### <###AUTHORWEBSITE###>###CONTRIBUTORS###
|
||||
@copyright ###COPYRIGHT###
|
||||
@license ###LICENSE###
|
||||
|
||||
|
||||
###SHORT_DESCRIPTION###
|
||||
|
||||
|
||||
/----------------------------------------------------------------------------------------------------------------------------------*/
|
@ -35,11 +35,17 @@ class ###Component###Model###Views### extends JModelList
|
||||
|
||||
parent::__construct($config);
|
||||
}###ADMIN_CUSTOM_BUTTONS_METHOD_LIST###
|
||||
|
||||
|
||||
/**
|
||||
* Method to auto-populate the model state.
|
||||
*
|
||||
* Note. Calling getState in this method will result in recursion.
|
||||
*
|
||||
* @param string $ordering An optional ordering field.
|
||||
* @param string $direction An optional direction (asc|desc).
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
*/
|
||||
protected function populateState($ordering = null, $direction = null)
|
||||
{
|
||||
@ -49,26 +55,7 @@ class ###Component###Model###Views### extends JModelList
|
||||
if ($layout = $app->input->get('layout'))
|
||||
{
|
||||
$this->context .= '.' . $layout;
|
||||
}
|
||||
###POPULATESTATE###
|
||||
|
||||
$sorting = $this->getUserStateFromRequest($this->context . '.filter.sorting', 'filter_sorting', 0, 'int');
|
||||
$this->setState('filter.sorting', $sorting);
|
||||
|
||||
$access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int');
|
||||
$this->setState('filter.access', $access);
|
||||
|
||||
$search = $this->getUserStateFromRequest($this->context . '.filter.search', 'filter_search');
|
||||
$this->setState('filter.search', $search);
|
||||
|
||||
$published = $this->getUserStateFromRequest($this->context . '.filter.published', 'filter_published', '');
|
||||
$this->setState('filter.published', $published);
|
||||
|
||||
$created_by = $this->getUserStateFromRequest($this->context . '.filter.created_by', 'filter_created_by', '');
|
||||
$this->setState('filter.created_by', $created_by);
|
||||
|
||||
$created = $this->getUserStateFromRequest($this->context . '.filter.created', 'filter_created');
|
||||
$this->setState('filter.created', $created);
|
||||
}###POPULATESTATE###
|
||||
|
||||
// List state information.
|
||||
parent::populateState($ordering, $direction);
|
||||
|
@ -82,10 +82,7 @@ class ###Component###View###View### extends JViewLegacy
|
||||
* Setting the toolbar
|
||||
*/
|
||||
protected function addToolBar()
|
||||
{
|
||||
// adding the joomla edit toolbar to the front
|
||||
JLoader::register('JToolbarHelper', JPATH_ADMINISTRATOR.'/includes/toolbar.php');
|
||||
###ADDTOOLBAR###
|
||||
{###ADDTOOLBAR###
|
||||
// now initiate the toolbar
|
||||
$this->toolbar = JToolbar::getInstance();
|
||||
}
|
||||
|
@ -39,7 +39,7 @@ class ###Component###View###Views### extends JViewLegacy
|
||||
$this->pagination = $this->get('Pagination');
|
||||
$this->state = $this->get('State');
|
||||
$this->user = JFactory::getUser();###ADMIN_DIPLAY_METHOD###
|
||||
$this->saveOrder = $this->listOrder == 'ordering';
|
||||
$this->saveOrder = $this->listOrder == 'a.ordering';
|
||||
// set the return here value
|
||||
$this->return_here = urlencode(base64_encode((string) JUri::getInstance()));
|
||||
// get global action permissions
|
||||
@ -139,40 +139,7 @@ class ###Component###View###Views### extends JViewLegacy
|
||||
if ($this->canDo->get('core.admin') || $this->canDo->get('core.options'))
|
||||
{
|
||||
JToolBarHelper::preferences('com_###component###');
|
||||
}
|
||||
|
||||
if ($this->canState)
|
||||
{
|
||||
JHtmlSidebar::addFilter(
|
||||
JText::_('JOPTION_SELECT_PUBLISHED'),
|
||||
'filter_published',
|
||||
JHtml::_('select.options', JHtml::_('jgrid.publishedOptions'), 'value', 'text', $this->state->get('filter.published'), true)
|
||||
);
|
||||
// only load if batch allowed
|
||||
if ($this->canBatch)
|
||||
{
|
||||
JHtmlBatch_::addListSelection(
|
||||
JText::_('COM_###COMPONENT###_KEEP_ORIGINAL_STATE'),
|
||||
'batch[published]',
|
||||
JHtml::_('select.options', JHtml::_('jgrid.publishedOptions', array('all' => false)), 'value', 'text', '', true)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
JHtmlSidebar::addFilter(
|
||||
JText::_('JOPTION_SELECT_ACCESS'),
|
||||
'filter_access',
|
||||
JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text', $this->state->get('filter.access'))
|
||||
);
|
||||
|
||||
if ($this->canBatch && $this->canCreate && $this->canEdit)
|
||||
{
|
||||
JHtmlBatch_::addListSelection(
|
||||
JText::_('COM_###COMPONENT###_KEEP_ORIGINAL_ACCESS'),
|
||||
'batch[access]',
|
||||
JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text')
|
||||
);
|
||||
}###CATEGORYFILTER######OTHERFILTERS###
|
||||
}###FILTERFIELDDISPLAYHELPER######BATCHDISPLAYHELPER###
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -46,9 +46,7 @@ class ###Component###View###SViews### extends JViewLegacy
|
||||
* Setting the toolbar
|
||||
*/
|
||||
protected function addToolBar()
|
||||
{
|
||||
// adding the joomla toolbar to the front
|
||||
JLoader::register('JToolbarHelper', JPATH_ADMINISTRATOR.'/includes/toolbar.php');###SITE_CUSTOM_BUTTONS###
|
||||
{###SITE_CUSTOM_BUTTONS###
|
||||
|
||||
// set help url for this view if found
|
||||
$help_url = ###Component###Helper::getHelpUrl('###sviews###');
|
||||
|
@ -46,9 +46,7 @@ class ###Component###View###SView### extends JViewLegacy
|
||||
* Setting the toolbar
|
||||
*/
|
||||
protected function addToolBar()
|
||||
{
|
||||
// adding the joomla toolbar to the front
|
||||
JLoader::register('JToolbarHelper', JPATH_ADMINISTRATOR.'/includes/toolbar.php');###SITE_CUSTOM_BUTTONS###
|
||||
{###SITE_CUSTOM_BUTTONS###
|
||||
|
||||
// set help url for this view if found
|
||||
$help_url = ###Component###Helper::getHelpUrl('###sview###');
|
||||
|
@ -17,74 +17,11 @@ defined('_JEXEC') or die('Restricted access');
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access'); ###LICENSE_LOCKED_DEFINED###
|
||||
|
||||
// load tooltip behavior
|
||||
JHtml::_('behavior.tooltip');
|
||||
JHtml::_('behavior.multiselect');
|
||||
JHtml::_('dropdown.init');
|
||||
JHtml::_('formbehavior.chosen', 'select');
|
||||
|
||||
###ADMIN_VIEWS_HEADER###
|
||||
if ($this->saveOrder)
|
||||
{
|
||||
$saveOrderingUrl = 'index.php?option=com_###component###&task=###views###.saveOrderAjax&tmpl=component';
|
||||
JHtml::_('sortablelist.sortable', '###view###List', 'adminForm', strtolower($this->listDirn), $saveOrderingUrl);
|
||||
}
|
||||
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
Joomla.orderTable = function()
|
||||
{
|
||||
table = document.getElementById("sortTable");
|
||||
direction = document.getElementById("directionTable");
|
||||
order = table.options[table.selectedIndex].value;
|
||||
if (order != '<?php echo $this->listOrder; ?>')
|
||||
{
|
||||
dirn = 'asc';
|
||||
}
|
||||
else
|
||||
{
|
||||
dirn = direction.options[direction.selectedIndex].value;
|
||||
}
|
||||
Joomla.tableOrdering(order, dirn, '');
|
||||
}
|
||||
</script>
|
||||
<form action="<?php echo JRoute::_('index.php?option=com_###component###&view=###views###'); ?>" method="post" name="adminForm" id="adminForm">
|
||||
<?php if(!empty( $this->sidebar)): ?>
|
||||
<div id="j-sidebar-container" class="span2">
|
||||
<?php echo $this->sidebar; ?>
|
||||
</div>
|
||||
<div id="j-main-container" class="span10">
|
||||
<?php else : ?>
|
||||
<div id="j-main-container">
|
||||
<?php endif; ?>
|
||||
<?php if (empty($this->items)): ?>
|
||||
<?php echo $this->loadTemplate('toolbar');?>
|
||||
<div class="alert alert-no-items">
|
||||
<?php echo JText::_('JGLOBAL_NO_MATCHING_RESULTS'); ?>
|
||||
</div>
|
||||
<?php else : ?>
|
||||
<?php echo $this->loadTemplate('toolbar');?>
|
||||
<table class="table table-striped" id="###view###List">
|
||||
<thead><?php echo $this->loadTemplate('head');?></thead>
|
||||
<tfoot><?php echo $this->loadTemplate('foot');?></tfoot>
|
||||
<tbody><?php echo $this->loadTemplate('body');?></tbody>
|
||||
</table>
|
||||
<?php //Load the batch processing form. ?>
|
||||
<?php if ($this->canCreate && $this->canEdit) : ?>
|
||||
<?php echo JHtml::_(
|
||||
'bootstrap.renderModal',
|
||||
'collapseModal',
|
||||
array(
|
||||
'title' => JText::_('COM_###COMPONENT###_###VIEWS###_BATCH_OPTIONS'),
|
||||
'footer' => $this->loadTemplate('batch_footer')
|
||||
),
|
||||
$this->loadTemplate('batch_body')
|
||||
); ?>
|
||||
<?php endif; ?>
|
||||
<input type="hidden" name="filter_order" value="<?php echo $this->listOrder; ?>" />
|
||||
<input type="hidden" name="filter_order_Dir" value="<?php echo $this->listDirn; ?>" />
|
||||
<input type="hidden" name="boxchecked" value="0" />
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<input type="hidden" name="task" value="" />
|
||||
<?php echo JHtml::_('form.token'); ?>
|
||||
</form>###VIEWS_FOOTER_SCRIPT###
|
||||
###VIEWS_DEFAULT_BODY######VIEWS_FOOTER_SCRIPT###
|
||||
|
@ -15,13 +15,9 @@ defined('_JEXEC') or die('Restricted access');
|
||||
###BOM###
|
||||
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');###LICENSE_LOCKED_DEFINED######CUSTOM_ADMIN_CODE_BODY###
|
||||
defined('_JEXEC') or die('Restricted access');###LICENSE_LOCKED_DEFINED###
|
||||
|
||||
JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html');
|
||||
JHtml::_('behavior.tooltip');
|
||||
JHtml::_('behavior.formvalidation');
|
||||
JHtml::_('formbehavior.chosen', 'select');
|
||||
JHtml::_('behavior.keepalive');
|
||||
###CUSTOM_ADMIN_VIEW_HEADER######CUSTOM_ADMIN_CODE_BODY###
|
||||
?>
|
||||
<?php if ($this->canDo->get('###sview###.access')): ?>###CUSTOM_ADMIN_SUBMITBUTTON_SCRIPT###
|
||||
<?php $urlId = (isset($this->item->id)) ? '&id='. (int) $this->item->id : ''; ?>
|
||||
|
@ -15,13 +15,9 @@ defined('_JEXEC') or die('Restricted access');
|
||||
###BOM###
|
||||
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');###LICENSE_LOCKED_DEFINED######CUSTOM_ADMIN_CODE_BODY###
|
||||
defined('_JEXEC') or die('Restricted access');###LICENSE_LOCKED_DEFINED###
|
||||
|
||||
JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html');
|
||||
JHtml::_('behavior.tooltip');
|
||||
JHtml::_('behavior.formvalidation');
|
||||
JHtml::_('formbehavior.chosen', 'select');
|
||||
JHtml::_('behavior.keepalive');
|
||||
###CUSTOM_ADMIN_VIEWS_HEADER######CUSTOM_ADMIN_CODE_BODY###
|
||||
?>
|
||||
<?php if ($this->canDo->get('###sview###.access')): ?>###CUSTOM_ADMIN_SUBMITBUTTON_SCRIPT###
|
||||
###CUSTOM_ADMIN_TOP_FORM######CUSTOM_ADMIN_BODY######CUSTOM_ADMIN_BOTTOM_FORM###
|
||||
|
@ -15,7 +15,8 @@ defined('_JEXEC') or die('Restricted access');
|
||||
###BOM###
|
||||
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');###LICENSE_LOCKED_DEFINED######SITE_CODE_BODY###
|
||||
defined('_JEXEC') or die('Restricted access');###LICENSE_LOCKED_DEFINED###
|
||||
|
||||
###SITE_VIEWS_HEADER######SITE_CODE_BODY###
|
||||
?>
|
||||
###SITE_TOP_FORM######SITE_TOP_BUTTON######SITE_BODY######SITE_BOTTOM_BUTTON######SITE_BOTTOM_FORM###
|
||||
|
@ -15,7 +15,8 @@ defined('_JEXEC') or die('Restricted access');
|
||||
###BOM###
|
||||
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');###LICENSE_LOCKED_DEFINED######SITE_CODE_BODY###
|
||||
defined('_JEXEC') or die('Restricted access');###LICENSE_LOCKED_DEFINED###
|
||||
|
||||
###SITE_VIEW_HEADER######SITE_CODE_BODY###
|
||||
?>
|
||||
###SITE_TOP_FORM######SITE_TOP_BUTTON######SITE_BODY######SITE_BOTTOM_BUTTON######SITE_BOTTOM_FORM###
|
||||
|
@ -17,11 +17,7 @@ defined('_JEXEC') or die('Restricted access');
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html');
|
||||
JHtml::_('behavior.tooltip');
|
||||
JHtml::_('behavior.formvalidation');
|
||||
JHtml::_('formbehavior.chosen', 'select');
|
||||
JHtml::_('behavior.keepalive');
|
||||
###ADMIN_VIEW_HEADER###
|
||||
$componentParams = $this->params; // will be removed just use $this->params instead
|
||||
?>
|
||||
###EDITBODYFADEIN###
|
||||
|
@ -17,13 +17,7 @@ defined('_JEXEC') or die('Restricted access');
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html');
|
||||
JHtml::_('behavior.tooltip');
|
||||
JHtml::_('behavior.formvalidation');
|
||||
JHtml::_('formbehavior.chosen', 'select');
|
||||
JHtml::_('behavior.keepalive');
|
||||
JHtml::_('behavior.tabstate');
|
||||
JHtml::_('behavior.calendar');
|
||||
###SITE_ADMIN__VIEW_HEADER###
|
||||
?>
|
||||
<div class="###component###-###view###">
|
||||
<?php echo $this->toolbar->render(); ?>
|
||||
|
9
admin/compiler/joomla_3/filter_forms.xml
Normal file
9
admin/compiler/joomla_3/filter_forms.xml
Normal file
@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<form
|
||||
addrulepath="/administrator/components/com_###component###/models/rules"
|
||||
addfieldpath="/administrator/components/com_###component###/models/fields"
|
||||
>
|
||||
###FIELDFILTERSETS###
|
||||
|
||||
###FIELDLISTSETS###
|
||||
</form>
|
@ -1,11 +1 @@
|
||||
###INSTALL###
|
||||
|
||||
--
|
||||
-- Always insure this column rules is large enough for all the access control values.
|
||||
--
|
||||
ALTER TABLE `#__assets` CHANGE `rules` `rules` MEDIUMTEXT NOT NULL COMMENT 'JSON encoded access control.';
|
||||
|
||||
--
|
||||
-- Always insure this column name is large enough for long component and view names.
|
||||
--
|
||||
ALTER TABLE `#__assets` CHANGE `name` `name` VARCHAR(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'The unique name for the asset.';
|
||||
|
@ -269,6 +269,11 @@
|
||||
"rename": false,
|
||||
"type": "dashboard"
|
||||
},
|
||||
"filter_forms.xml": {
|
||||
"path": "c0mp0n3nt/admin/models/forms",
|
||||
"rename": "filter_forms",
|
||||
"type": "filter"
|
||||
},
|
||||
"module_forms.xml": {
|
||||
"path": "c0mp0n3nt/admin/models/forms",
|
||||
"rename": "module_forms",
|
||||
|
@ -1 +1 @@
|
||||
###UNINSTALL###
|
||||
###UNINSTALL###
|
||||
|
322
admin/config.xml
322
admin/config.xml
@ -122,16 +122,6 @@
|
||||
folder="editors"
|
||||
filter="cmd"
|
||||
/>
|
||||
<!-- Compiler_plugin Field. Type: Plugins. (joomla) -->
|
||||
<field
|
||||
type="plugins"
|
||||
name="compiler_plugin"
|
||||
label="COM_COMPONENTBUILDER_CONFIG_COMPILER_PLUGIN_LABEL"
|
||||
description="COM_COMPONENTBUILDER_CONFIG_COMPILER_PLUGIN_DESCRIPTION"
|
||||
multiple="true"
|
||||
folder="extension"
|
||||
filter="cmd"
|
||||
/>
|
||||
<!-- Github_access_token Field. Type: Text. (joomla) -->
|
||||
<field
|
||||
type="text"
|
||||
@ -184,54 +174,6 @@
|
||||
</field>
|
||||
<!-- Spacer_hr_two Field. Type: Spacer. A None Database Field. (joomla) -->
|
||||
<field type="spacer" name="spacer_hr_two" hr="true" class="spacer_hr_two" />
|
||||
<!-- Add_menu_prefix Field. Type: Radio. (joomla) -->
|
||||
<field
|
||||
type="radio"
|
||||
name="add_menu_prefix"
|
||||
label="COM_COMPONENTBUILDER_CONFIG_ADD_MENU_PREFIX_LABEL"
|
||||
description="COM_COMPONENTBUILDER_CONFIG_ADD_MENU_PREFIX_DESCRIPTION"
|
||||
class="btn-group btn-group-yesno"
|
||||
default="1">
|
||||
<!-- Option Set. -->
|
||||
<option value="1">
|
||||
COM_COMPONENTBUILDER_CONFIG_YES</option>
|
||||
<option value="0">
|
||||
COM_COMPONENTBUILDER_CONFIG_NO</option>
|
||||
</field>
|
||||
<!-- Menu_prefix Field. Type: Text. (joomla) -->
|
||||
<field
|
||||
type="text"
|
||||
name="menu_prefix"
|
||||
label="COM_COMPONENTBUILDER_CONFIG_MENU_PREFIX_LABEL"
|
||||
size="30"
|
||||
maxlength="30"
|
||||
default=""
|
||||
description="COM_COMPONENTBUILDER_CONFIG_MENU_PREFIX_DESCRIPTION"
|
||||
class="text_area"
|
||||
filter="SAFEHTML"
|
||||
message="COM_COMPONENTBUILDER_CONFIG_MENU_PREFIX_MESSAGE"
|
||||
hint="COM_COMPONENTBUILDER_CONFIG_MENU_PREFIX_HINT"
|
||||
autocomplete="on"
|
||||
showon="add_menu_prefix:1"
|
||||
/>
|
||||
<!-- Spacer_hr_three Field. Type: Spacer. A None Database Field. (joomla) -->
|
||||
<field type="spacer" name="spacer_hr_three" hr="true" class="spacer_hr_three" />
|
||||
<!-- Minify Field. Type: Radio. (joomla) -->
|
||||
<field
|
||||
type="radio"
|
||||
name="minify"
|
||||
label="COM_COMPONENTBUILDER_CONFIG_MINIFY_LABEL"
|
||||
description="COM_COMPONENTBUILDER_CONFIG_MINIFY_DESCRIPTION"
|
||||
class="btn-group btn-group-yesno"
|
||||
default="0">
|
||||
<!-- Option Set. -->
|
||||
<option value="1">
|
||||
COM_COMPONENTBUILDER_CONFIG_YES</option>
|
||||
<option value="0">
|
||||
COM_COMPONENTBUILDER_CONFIG_NO</option>
|
||||
</field>
|
||||
<!-- Spacer_hr_four Field. Type: Spacer. A None Database Field. (joomla) -->
|
||||
<field type="spacer" name="spacer_hr_four" hr="true" class="spacer_hr_four" />
|
||||
<!-- Set_browser_storage Field. Type: Radio. (joomla) -->
|
||||
<field
|
||||
type="radio"
|
||||
@ -283,96 +225,8 @@
|
||||
<option value="0">
|
||||
COM_COMPONENTBUILDER_CONFIG_NEVER_UPDATE</option>
|
||||
</field>
|
||||
<!-- Spacer_hr_five Field. Type: Spacer. A None Database Field. (joomla) -->
|
||||
<field type="spacer" name="spacer_hr_five" hr="true" class="spacer_hr_five" />
|
||||
<!-- Note_language_global Field. Type: Note. A None Database Field. (joomla) -->
|
||||
<field type="note" name="note_language_global" label="COM_COMPONENTBUILDER_CONFIG_NOTE_LANGUAGE_GLOBAL_LABEL" description="COM_COMPONENTBUILDER_CONFIG_NOTE_LANGUAGE_GLOBAL_DESCRIPTION" heading="h4" class="alert alert-info note_language_global" />
|
||||
<!-- Language Field. Type: Lang. (custom) -->
|
||||
<field
|
||||
type="lang"
|
||||
name="language"
|
||||
label="COM_COMPONENTBUILDER_CONFIG_LANGUAGE_LABEL"
|
||||
class="list_class"
|
||||
multiple="false"
|
||||
default="en-GB"
|
||||
required="true"
|
||||
button="true"
|
||||
/>
|
||||
<!-- Percentagelanguageadd Field. Type: Number. (joomla) -->
|
||||
<field
|
||||
type="number"
|
||||
name="percentagelanguageadd"
|
||||
label="COM_COMPONENTBUILDER_CONFIG_PERCENTAGELANGUAGEADD_LABEL"
|
||||
default="50"
|
||||
description="COM_COMPONENTBUILDER_CONFIG_PERCENTAGELANGUAGEADD_DESCRIPTION"
|
||||
class="text_area"
|
||||
required="true"
|
||||
min="10"
|
||||
max="100"
|
||||
step="10"
|
||||
/>
|
||||
<!-- Export_language_strings Field. Type: Radio. (joomla) -->
|
||||
<field
|
||||
type="radio"
|
||||
name="export_language_strings"
|
||||
label="COM_COMPONENTBUILDER_CONFIG_EXPORT_LANGUAGE_STRINGS_LABEL"
|
||||
description="COM_COMPONENTBUILDER_CONFIG_EXPORT_LANGUAGE_STRINGS_DESCRIPTION"
|
||||
class="btn-group btn-group-yesno"
|
||||
default="1">
|
||||
<!-- Option Set. -->
|
||||
<option value="1">
|
||||
COM_COMPONENTBUILDER_CONFIG_YES</option>
|
||||
<option value="0">
|
||||
COM_COMPONENTBUILDER_CONFIG_NO</option>
|
||||
</field>
|
||||
<!-- Spacer_hr_six Field. Type: Spacer. A None Database Field. (joomla) -->
|
||||
<field type="spacer" name="spacer_hr_six" hr="true" class="spacer_hr_six" />
|
||||
<!-- Compiler_field_builder_type Field. Type: List. (joomla) -->
|
||||
<field
|
||||
type="list"
|
||||
name="compiler_field_builder_type"
|
||||
label="COM_COMPONENTBUILDER_CONFIG_COMPILER_FIELD_BUILDER_TYPE_LABEL"
|
||||
description="COM_COMPONENTBUILDER_CONFIG_COMPILER_FIELD_BUILDER_TYPE_DESCRIPTION"
|
||||
class="list_class"
|
||||
filter="INT"
|
||||
required="true"
|
||||
default="2">
|
||||
<!-- Option Set. -->
|
||||
<option value="1">
|
||||
COM_COMPONENTBUILDER_CONFIG_STRING_MANIPULATION</option>
|
||||
<option value="2">
|
||||
COM_COMPONENTBUILDER_CONFIG_SIMPLEXMLELEMENT_CLASS</option>
|
||||
</field>
|
||||
<!-- Field_name_builder Field. Type: Radio. (joomla) -->
|
||||
<field
|
||||
type="radio"
|
||||
name="field_name_builder"
|
||||
label="COM_COMPONENTBUILDER_CONFIG_FIELD_NAME_BUILDER_LABEL"
|
||||
description="COM_COMPONENTBUILDER_CONFIG_FIELD_NAME_BUILDER_DESCRIPTION"
|
||||
class="btn-group btn-group-yesno"
|
||||
default="1">
|
||||
<!-- Option Set. -->
|
||||
<option value="1">
|
||||
COM_COMPONENTBUILDER_CONFIG_DEFAULT</option>
|
||||
<option value="2">
|
||||
COM_COMPONENTBUILDER_CONFIG_ALPHANUMERIC</option>
|
||||
</field>
|
||||
<!-- Type_name_builder Field. Type: Radio. (joomla) -->
|
||||
<field
|
||||
type="radio"
|
||||
name="type_name_builder"
|
||||
label="COM_COMPONENTBUILDER_CONFIG_TYPE_NAME_BUILDER_LABEL"
|
||||
description="COM_COMPONENTBUILDER_CONFIG_TYPE_NAME_BUILDER_DESCRIPTION"
|
||||
class="btn-group btn-group-yesno"
|
||||
default="1">
|
||||
<!-- Option Set. -->
|
||||
<option value="1">
|
||||
COM_COMPONENTBUILDER_CONFIG_DEFAULT</option>
|
||||
<option value="2">
|
||||
COM_COMPONENTBUILDER_CONFIG_ALPHANUMERICDOT</option>
|
||||
</field>
|
||||
<!-- Spacer_hr_seven Field. Type: Spacer. A None Database Field. (joomla) -->
|
||||
<field type="spacer" name="spacer_hr_seven" hr="true" class="spacer_hr_seven" />
|
||||
<!-- Spacer_hr_three Field. Type: Spacer. A None Database Field. (joomla) -->
|
||||
<field type="spacer" name="spacer_hr_three" hr="true" class="spacer_hr_three" />
|
||||
<!-- Api Field. Type: User. (joomla) -->
|
||||
<field
|
||||
type="user"
|
||||
@ -380,8 +234,8 @@
|
||||
label="COM_COMPONENTBUILDER_CONFIG_API_LABEL"
|
||||
description="COM_COMPONENTBUILDER_CONFIG_API_DESCRIPTION"
|
||||
/>
|
||||
<!-- Spacer_hr_eight Field. Type: Spacer. A None Database Field. (joomla) -->
|
||||
<field type="spacer" name="spacer_hr_eight" hr="true" class="spacer_hr_eight" />
|
||||
<!-- Spacer_hr_four Field. Type: Spacer. A None Database Field. (joomla) -->
|
||||
<field type="spacer" name="spacer_hr_four" hr="true" class="spacer_hr_four" />
|
||||
<field name="autorTitle"
|
||||
type="spacer"
|
||||
label="COM_COMPONENTBUILDER_CONFIG_AUTHOR"
|
||||
@ -799,6 +653,174 @@
|
||||
default=""
|
||||
/>
|
||||
</fieldset>
|
||||
<fieldset
|
||||
name="compiler_custom_config"
|
||||
label="COM_COMPONENTBUILDER_CONFIG_COMPILER">
|
||||
|
||||
<!-- Compiler_plugin Field. Type: Plugins. (joomla) -->
|
||||
<field
|
||||
type="plugins"
|
||||
name="compiler_plugin"
|
||||
label="COM_COMPONENTBUILDER_CONFIG_COMPILER_PLUGIN_LABEL"
|
||||
description="COM_COMPONENTBUILDER_CONFIG_COMPILER_PLUGIN_DESCRIPTION"
|
||||
multiple="true"
|
||||
folder="extension"
|
||||
filter="cmd"
|
||||
/>
|
||||
<!-- Spacer_hr_five Field. Type: Spacer. A None Database Field. (joomla) -->
|
||||
<field type="spacer" name="spacer_hr_five" hr="true" class="spacer_hr_five" />
|
||||
<!-- Add_menu_prefix Field. Type: Radio. (joomla) -->
|
||||
<field
|
||||
type="radio"
|
||||
name="add_menu_prefix"
|
||||
label="COM_COMPONENTBUILDER_CONFIG_ADD_MENU_PREFIX_LABEL"
|
||||
description="COM_COMPONENTBUILDER_CONFIG_ADD_MENU_PREFIX_DESCRIPTION"
|
||||
class="btn-group btn-group-yesno"
|
||||
default="1">
|
||||
<!-- Option Set. -->
|
||||
<option value="1">
|
||||
COM_COMPONENTBUILDER_CONFIG_YES</option>
|
||||
<option value="0">
|
||||
COM_COMPONENTBUILDER_CONFIG_NO</option>
|
||||
</field>
|
||||
<!-- Menu_prefix Field. Type: Text. (joomla) -->
|
||||
<field
|
||||
type="text"
|
||||
name="menu_prefix"
|
||||
label="COM_COMPONENTBUILDER_CONFIG_MENU_PREFIX_LABEL"
|
||||
size="30"
|
||||
maxlength="30"
|
||||
default=""
|
||||
description="COM_COMPONENTBUILDER_CONFIG_MENU_PREFIX_DESCRIPTION"
|
||||
class="text_area"
|
||||
filter="SAFEHTML"
|
||||
message="COM_COMPONENTBUILDER_CONFIG_MENU_PREFIX_MESSAGE"
|
||||
hint="COM_COMPONENTBUILDER_CONFIG_MENU_PREFIX_HINT"
|
||||
autocomplete="on"
|
||||
showon="add_menu_prefix:1"
|
||||
/>
|
||||
<!-- Spacer_hr_six Field. Type: Spacer. A None Database Field. (joomla) -->
|
||||
<field type="spacer" name="spacer_hr_six" hr="true" class="spacer_hr_six" />
|
||||
<!-- Minify Field. Type: Radio. (joomla) -->
|
||||
<field
|
||||
type="radio"
|
||||
name="minify"
|
||||
label="COM_COMPONENTBUILDER_CONFIG_MINIFY_LABEL"
|
||||
description="COM_COMPONENTBUILDER_CONFIG_MINIFY_DESCRIPTION"
|
||||
class="btn-group btn-group-yesno"
|
||||
default="0">
|
||||
<!-- Option Set. -->
|
||||
<option value="1">
|
||||
COM_COMPONENTBUILDER_CONFIG_YES</option>
|
||||
<option value="0">
|
||||
COM_COMPONENTBUILDER_CONFIG_NO</option>
|
||||
</field>
|
||||
<!-- Spacer_hr_seven Field. Type: Spacer. A None Database Field. (joomla) -->
|
||||
<field type="spacer" name="spacer_hr_seven" hr="true" class="spacer_hr_seven" />
|
||||
<!-- Note_language_global Field. Type: Note. A None Database Field. (joomla) -->
|
||||
<field type="note" name="note_language_global" label="COM_COMPONENTBUILDER_CONFIG_NOTE_LANGUAGE_GLOBAL_LABEL" description="COM_COMPONENTBUILDER_CONFIG_NOTE_LANGUAGE_GLOBAL_DESCRIPTION" heading="h4" class="alert alert-info note_language_global" />
|
||||
<!-- Language Field. Type: Lang. (custom) -->
|
||||
<field
|
||||
type="lang"
|
||||
name="language"
|
||||
label="COM_COMPONENTBUILDER_CONFIG_LANGUAGE_LABEL"
|
||||
class="list_class"
|
||||
multiple="false"
|
||||
default="en-GB"
|
||||
required="true"
|
||||
button="true"
|
||||
/>
|
||||
<!-- Percentagelanguageadd Field. Type: Number. (joomla) -->
|
||||
<field
|
||||
type="number"
|
||||
name="percentagelanguageadd"
|
||||
label="COM_COMPONENTBUILDER_CONFIG_PERCENTAGELANGUAGEADD_LABEL"
|
||||
default="50"
|
||||
description="COM_COMPONENTBUILDER_CONFIG_PERCENTAGELANGUAGEADD_DESCRIPTION"
|
||||
class="text_area"
|
||||
required="true"
|
||||
min="10"
|
||||
max="100"
|
||||
step="10"
|
||||
/>
|
||||
<!-- Export_language_strings Field. Type: Radio. (joomla) -->
|
||||
<field
|
||||
type="radio"
|
||||
name="export_language_strings"
|
||||
label="COM_COMPONENTBUILDER_CONFIG_EXPORT_LANGUAGE_STRINGS_LABEL"
|
||||
description="COM_COMPONENTBUILDER_CONFIG_EXPORT_LANGUAGE_STRINGS_DESCRIPTION"
|
||||
class="btn-group btn-group-yesno"
|
||||
default="1">
|
||||
<!-- Option Set. -->
|
||||
<option value="1">
|
||||
COM_COMPONENTBUILDER_CONFIG_YES</option>
|
||||
<option value="0">
|
||||
COM_COMPONENTBUILDER_CONFIG_NO</option>
|
||||
</field>
|
||||
<!-- Spacer_hr_eight Field. Type: Spacer. A None Database Field. (joomla) -->
|
||||
<field type="spacer" name="spacer_hr_eight" hr="true" class="spacer_hr_eight" />
|
||||
<!-- Assets_table_fix Field. Type: List. (joomla) -->
|
||||
<field
|
||||
type="list"
|
||||
name="assets_table_fix"
|
||||
label="COM_COMPONENTBUILDER_CONFIG_ASSETS_TABLE_FIX_LABEL"
|
||||
description="COM_COMPONENTBUILDER_CONFIG_ASSETS_TABLE_FIX_DESCRIPTION"
|
||||
class="list_class"
|
||||
multiple="false"
|
||||
default="2">
|
||||
<!-- Option Set. -->
|
||||
<option value="0">
|
||||
COM_COMPONENTBUILDER_CONFIG_DO_NOT_ADD_FIX_EVER</option>
|
||||
<option value="1">
|
||||
COM_COMPONENTBUILDER_CONFIG_SQL_ADDREMOVE</option>
|
||||
<option value="2">
|
||||
COM_COMPONENTBUILDER_CONFIG_INTELLIGENT_ADDREMOVEIF</option>
|
||||
</field>
|
||||
<!-- Compiler_field_builder_type Field. Type: List. (joomla) -->
|
||||
<field
|
||||
type="list"
|
||||
name="compiler_field_builder_type"
|
||||
label="COM_COMPONENTBUILDER_CONFIG_COMPILER_FIELD_BUILDER_TYPE_LABEL"
|
||||
description="COM_COMPONENTBUILDER_CONFIG_COMPILER_FIELD_BUILDER_TYPE_DESCRIPTION"
|
||||
class="list_class"
|
||||
filter="INT"
|
||||
required="true"
|
||||
default="2">
|
||||
<!-- Option Set. -->
|
||||
<option value="1">
|
||||
COM_COMPONENTBUILDER_CONFIG_STRING_MANIPULATION</option>
|
||||
<option value="2">
|
||||
COM_COMPONENTBUILDER_CONFIG_SIMPLEXMLELEMENT_CLASS</option>
|
||||
</field>
|
||||
<!-- Field_name_builder Field. Type: Radio. (joomla) -->
|
||||
<field
|
||||
type="radio"
|
||||
name="field_name_builder"
|
||||
label="COM_COMPONENTBUILDER_CONFIG_FIELD_NAME_BUILDER_LABEL"
|
||||
description="COM_COMPONENTBUILDER_CONFIG_FIELD_NAME_BUILDER_DESCRIPTION"
|
||||
class="btn-group btn-group-yesno"
|
||||
default="1">
|
||||
<!-- Option Set. -->
|
||||
<option value="1">
|
||||
COM_COMPONENTBUILDER_CONFIG_DEFAULT</option>
|
||||
<option value="2">
|
||||
COM_COMPONENTBUILDER_CONFIG_ALPHANUMERIC</option>
|
||||
</field>
|
||||
<!-- Type_name_builder Field. Type: Radio. (joomla) -->
|
||||
<field
|
||||
type="radio"
|
||||
name="type_name_builder"
|
||||
label="COM_COMPONENTBUILDER_CONFIG_TYPE_NAME_BUILDER_LABEL"
|
||||
description="COM_COMPONENTBUILDER_CONFIG_TYPE_NAME_BUILDER_DESCRIPTION"
|
||||
class="btn-group btn-group-yesno"
|
||||
default="1">
|
||||
<!-- Option Set. -->
|
||||
<option value="1">
|
||||
COM_COMPONENTBUILDER_CONFIG_DEFAULT</option>
|
||||
<option value="2">
|
||||
COM_COMPONENTBUILDER_CONFIG_ALPHANUMERICDOT</option>
|
||||
</field>
|
||||
</fieldset>
|
||||
<fieldset
|
||||
name="development_method_custom_config"
|
||||
label="COM_COMPONENTBUILDER_CONFIG_DEVELOPMENT_METHOD">
|
||||
|
@ -55,7 +55,7 @@ class ComponentbuilderControllerAdmin_views extends JControllerAdmin
|
||||
$input = JFactory::getApplication()->input;
|
||||
$pks = $input->post->get('cid', array(), 'array');
|
||||
// Sanitize the input
|
||||
ArrayHelper::toInteger($pks);
|
||||
$pks = ArrayHelper::toInteger($pks);
|
||||
// Get the model
|
||||
$model = $this->getModel('Admin_views');
|
||||
// get the data to export
|
||||
|
@ -55,7 +55,7 @@ class ComponentbuilderControllerClass_methods extends JControllerAdmin
|
||||
$input = JFactory::getApplication()->input;
|
||||
$pks = $input->post->get('cid', array(), 'array');
|
||||
// Sanitize the input
|
||||
ArrayHelper::toInteger($pks);
|
||||
$pks = ArrayHelper::toInteger($pks);
|
||||
// Get the model
|
||||
$model = $this->getModel('Class_methods');
|
||||
// get the data to export
|
||||
|
@ -55,7 +55,7 @@ class ComponentbuilderControllerClass_properties extends JControllerAdmin
|
||||
$input = JFactory::getApplication()->input;
|
||||
$pks = $input->post->get('cid', array(), 'array');
|
||||
// Sanitize the input
|
||||
ArrayHelper::toInteger($pks);
|
||||
$pks = ArrayHelper::toInteger($pks);
|
||||
// Get the model
|
||||
$model = $this->getModel('Class_properties');
|
||||
// get the data to export
|
||||
|
@ -55,7 +55,7 @@ class ComponentbuilderControllerCustom_admin_views extends JControllerAdmin
|
||||
$input = JFactory::getApplication()->input;
|
||||
$pks = $input->post->get('cid', array(), 'array');
|
||||
// Sanitize the input
|
||||
ArrayHelper::toInteger($pks);
|
||||
$pks = ArrayHelper::toInteger($pks);
|
||||
// Get the model
|
||||
$model = $this->getModel('Custom_admin_views');
|
||||
// get the data to export
|
||||
|
@ -55,7 +55,7 @@ class ComponentbuilderControllerCustom_codes extends JControllerAdmin
|
||||
$input = JFactory::getApplication()->input;
|
||||
$pks = $input->post->get('cid', array(), 'array');
|
||||
// Sanitize the input
|
||||
ArrayHelper::toInteger($pks);
|
||||
$pks = ArrayHelper::toInteger($pks);
|
||||
// Get the model
|
||||
$model = $this->getModel('Custom_codes');
|
||||
// get the data to export
|
||||
|
@ -55,7 +55,7 @@ class ComponentbuilderControllerDynamic_gets extends JControllerAdmin
|
||||
$input = JFactory::getApplication()->input;
|
||||
$pks = $input->post->get('cid', array(), 'array');
|
||||
// Sanitize the input
|
||||
ArrayHelper::toInteger($pks);
|
||||
$pks = ArrayHelper::toInteger($pks);
|
||||
// Get the model
|
||||
$model = $this->getModel('Dynamic_gets');
|
||||
// get the data to export
|
||||
|
@ -55,7 +55,7 @@ class ComponentbuilderControllerFields extends JControllerAdmin
|
||||
$input = JFactory::getApplication()->input;
|
||||
$pks = $input->post->get('cid', array(), 'array');
|
||||
// Sanitize the input
|
||||
ArrayHelper::toInteger($pks);
|
||||
$pks = ArrayHelper::toInteger($pks);
|
||||
// Get the model
|
||||
$model = $this->getModel('Fields');
|
||||
// get the data to export
|
||||
|
@ -55,7 +55,7 @@ class ComponentbuilderControllerFieldtypes extends JControllerAdmin
|
||||
$input = JFactory::getApplication()->input;
|
||||
$pks = $input->post->get('cid', array(), 'array');
|
||||
// Sanitize the input
|
||||
ArrayHelper::toInteger($pks);
|
||||
$pks = ArrayHelper::toInteger($pks);
|
||||
// Get the model
|
||||
$model = $this->getModel('Fieldtypes');
|
||||
// get the data to export
|
||||
|
@ -55,7 +55,7 @@ class ComponentbuilderControllerHelp_documents extends JControllerAdmin
|
||||
$input = JFactory::getApplication()->input;
|
||||
$pks = $input->post->get('cid', array(), 'array');
|
||||
// Sanitize the input
|
||||
ArrayHelper::toInteger($pks);
|
||||
$pks = ArrayHelper::toInteger($pks);
|
||||
// Get the model
|
||||
$model = $this->getModel('Help_documents');
|
||||
// get the data to export
|
||||
|
@ -55,7 +55,7 @@ class ComponentbuilderControllerJoomla_components extends JControllerAdmin
|
||||
$input = JFactory::getApplication()->input;
|
||||
$pks = $input->post->get('cid', array(), 'array');
|
||||
// Sanitize the input
|
||||
ArrayHelper::toInteger($pks);
|
||||
$pks = ArrayHelper::toInteger($pks);
|
||||
// Get the model
|
||||
$model = $this->getModel('Joomla_components');
|
||||
// get the data to export
|
||||
@ -391,7 +391,7 @@ class ComponentbuilderControllerJoomla_components extends JControllerAdmin
|
||||
$subject = JText::_('COM_COMPONENTBUILDER_JOOMLA_COMPONENT_BUILDER_BACKUP_KEY');
|
||||
// email the message
|
||||
componentbuilderEmail::send($email, $subject, componentbuilderEmail::setTableBody($message, $subject), $plainText, 1);
|
||||
$backupNotice[] = JText::_('COM_COMPONENTBUILDER_EMAIL_WITH_THE_NEW_KEY_WAS_SEND');
|
||||
$backupNotice[] = JText::_('COM_COMPONENTBUILDER_EMAIL_WITH_THE_NEW_KEY_WAS_SENT');
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -55,7 +55,7 @@ class ComponentbuilderControllerLanguage_translations extends JControllerAdmin
|
||||
$input = JFactory::getApplication()->input;
|
||||
$pks = $input->post->get('cid', array(), 'array');
|
||||
// Sanitize the input
|
||||
ArrayHelper::toInteger($pks);
|
||||
$pks = ArrayHelper::toInteger($pks);
|
||||
// Get the model
|
||||
$model = $this->getModel('Language_translations');
|
||||
// get the data to export
|
||||
|
@ -55,7 +55,7 @@ class ComponentbuilderControllerLanguages extends JControllerAdmin
|
||||
$input = JFactory::getApplication()->input;
|
||||
$pks = $input->post->get('cid', array(), 'array');
|
||||
// Sanitize the input
|
||||
ArrayHelper::toInteger($pks);
|
||||
$pks = ArrayHelper::toInteger($pks);
|
||||
// Get the model
|
||||
$model = $this->getModel('Languages');
|
||||
// get the data to export
|
||||
|
@ -55,7 +55,7 @@ class ComponentbuilderControllerLayouts extends JControllerAdmin
|
||||
$input = JFactory::getApplication()->input;
|
||||
$pks = $input->post->get('cid', array(), 'array');
|
||||
// Sanitize the input
|
||||
ArrayHelper::toInteger($pks);
|
||||
$pks = ArrayHelper::toInteger($pks);
|
||||
// Get the model
|
||||
$model = $this->getModel('Layouts');
|
||||
// get the data to export
|
||||
|
@ -55,7 +55,7 @@ class ComponentbuilderControllerPlaceholders extends JControllerAdmin
|
||||
$input = JFactory::getApplication()->input;
|
||||
$pks = $input->post->get('cid', array(), 'array');
|
||||
// Sanitize the input
|
||||
ArrayHelper::toInteger($pks);
|
||||
$pks = ArrayHelper::toInteger($pks);
|
||||
// Get the model
|
||||
$model = $this->getModel('Placeholders');
|
||||
// get the data to export
|
||||
|
@ -55,7 +55,7 @@ class ComponentbuilderControllerServers extends JControllerAdmin
|
||||
$input = JFactory::getApplication()->input;
|
||||
$pks = $input->post->get('cid', array(), 'array');
|
||||
// Sanitize the input
|
||||
ArrayHelper::toInteger($pks);
|
||||
$pks = ArrayHelper::toInteger($pks);
|
||||
// Get the model
|
||||
$model = $this->getModel('Servers');
|
||||
// get the data to export
|
||||
|
@ -55,7 +55,7 @@ class ComponentbuilderControllerSite_views extends JControllerAdmin
|
||||
$input = JFactory::getApplication()->input;
|
||||
$pks = $input->post->get('cid', array(), 'array');
|
||||
// Sanitize the input
|
||||
ArrayHelper::toInteger($pks);
|
||||
$pks = ArrayHelper::toInteger($pks);
|
||||
// Get the model
|
||||
$model = $this->getModel('Site_views');
|
||||
// get the data to export
|
||||
|
@ -55,7 +55,7 @@ class ComponentbuilderControllerSnippets extends JControllerAdmin
|
||||
$input = JFactory::getApplication()->input;
|
||||
$pks = $input->post->get('cid', array(), 'array');
|
||||
// Sanitize the input
|
||||
ArrayHelper::toInteger($pks);
|
||||
$pks = ArrayHelper::toInteger($pks);
|
||||
// Get the model
|
||||
$model = $this->getModel('Snippets');
|
||||
// get the data to export
|
||||
|
@ -55,7 +55,7 @@ class ComponentbuilderControllerTemplates extends JControllerAdmin
|
||||
$input = JFactory::getApplication()->input;
|
||||
$pks = $input->post->get('cid', array(), 'array');
|
||||
// Sanitize the input
|
||||
ArrayHelper::toInteger($pks);
|
||||
$pks = ArrayHelper::toInteger($pks);
|
||||
// Get the model
|
||||
$model = $this->getModel('Templates');
|
||||
// get the data to export
|
||||
|
@ -55,7 +55,7 @@ class ComponentbuilderControllerValidation_rules extends JControllerAdmin
|
||||
$input = JFactory::getApplication()->input;
|
||||
$pks = $input->post->get('cid', array(), 'array');
|
||||
// Sanitize the input
|
||||
ArrayHelper::toInteger($pks);
|
||||
$pks = ArrayHelper::toInteger($pks);
|
||||
// Get the model
|
||||
$model = $this->getModel('Validation_rules');
|
||||
// get the data to export
|
||||
|
@ -190,13 +190,69 @@ class Compiler extends Infusion
|
||||
{
|
||||
$this->app->enqueueMessage(
|
||||
JText::sprintf(
|
||||
'The <b>%s</b> language has %s% translated. Was addeded %s',
|
||||
'The <b>%s</b> language has %s% translated. Was added %s',
|
||||
$tag, $percentage, $whyAddedLang
|
||||
), 'Notice'
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
// set assets table column fix type messages
|
||||
$message_fix['intelligent'] = JText::_(
|
||||
'The <b>intelligent</b> fix only updates the #__assets table\'s column when it detects that it is too small for the worse case. The intelligent fix also only reverse the #__assets table\'s update on uninstall of the component if it detects that no other component needs the rules column to be larger any longer. This options also shows a notice to the end user of all that it does to the #__assets table on installation and uninstalling of the component.'
|
||||
);
|
||||
$message_fix['sql'] = JText::_(
|
||||
'The <b>SQL</b> fix updates the #__assets table\'s column size on installation of the component and reverses it back to the Joomla default on uninstall of the component.'
|
||||
);
|
||||
// set assets table rules column notice
|
||||
if ($this->addAssetsTableFix)
|
||||
{
|
||||
$this->app->enqueueMessage(
|
||||
JText::_('<hr /><h3>Assets Table Notice</h3>'), 'Notice'
|
||||
);
|
||||
$asset_table_fix_type = ($this->addAssetsTableFix == 2)
|
||||
? 'intelligent' : 'sql';
|
||||
$this->app->enqueueMessage(
|
||||
JText::sprintf(
|
||||
'The #__assets table <b>%s</b> fix has been added to this component. %s',
|
||||
$asset_table_fix_type,
|
||||
$message_fix[$asset_table_fix_type]
|
||||
), 'Notice'
|
||||
);
|
||||
}
|
||||
// set assets table rules column Warning
|
||||
elseif ($this->accessSize >= 30)
|
||||
{
|
||||
$this->app->enqueueMessage(
|
||||
JText::_('<hr /><h3>Assets Table Warning</h3>'), 'Warning'
|
||||
);
|
||||
$this->app->enqueueMessage(
|
||||
JText::sprintf(
|
||||
'The Joomla #__assets table\'s rules column has to be fixed for this component to work coherently. JCB has detected that in worse case the rules column in the #__assets table may require <b>%s</b> characters, and yet the Joomla default is only <b>varchar(5120)</b>. JCB has three option to resolve this issue, first <b>use less permissions</b> in your component, second use the <b>SQL</b> fix, or the <b>intelligent</b> fix. %s %s',
|
||||
$this->accessWorseCase, $message_fix['intelligent'],
|
||||
$message_fix['sql']
|
||||
), 'Warning'
|
||||
);
|
||||
}
|
||||
// set assets table name column warning if not set
|
||||
if (!$this->addAssetsTableFix && $this->addAssetsTableNameFix)
|
||||
{
|
||||
// only add if not already added
|
||||
if ($this->accessSize < 30)
|
||||
{
|
||||
$this->app->enqueueMessage(
|
||||
JText::_('<hr /><h3>Assets Table Warning</h3>'),
|
||||
'Warning'
|
||||
);
|
||||
}
|
||||
$this->app->enqueueMessage(
|
||||
JText::sprintf(
|
||||
'The Joomla #__assets table\'s name column has to be fixed for this component to work correctly. JCB has detected that the #__assets table name column will need to be enlarged because this component\'s own naming convention is larger than varchar(50) which is the Joomla default. JCB has three option to resolve this issue, first <b>shorter names</b> for your component and/or its admin views, second use the <b>SQL</b> fix, or the <b>intelligent</b> fix. %s %s',
|
||||
$message_fix['intelligent'],
|
||||
$message_fix['sql']
|
||||
), 'Warning'
|
||||
);
|
||||
}
|
||||
// move the update server into place
|
||||
$this->setUpdateServer();
|
||||
// set the global counters
|
||||
|
@ -95,6 +95,27 @@ class Get
|
||||
*/
|
||||
public $compilerPath;
|
||||
|
||||
/**
|
||||
* Switch to add assets table fix
|
||||
*
|
||||
* @var int
|
||||
*/
|
||||
public $addAssetsTableFix = 1;
|
||||
|
||||
/**
|
||||
* Assets table worse case
|
||||
*
|
||||
* @var int
|
||||
*/
|
||||
public $accessWorseCase;
|
||||
|
||||
/**
|
||||
* Switch to add assets table name fix
|
||||
*
|
||||
* @var bool
|
||||
*/
|
||||
public $addAssetsTableNameFix = false;
|
||||
|
||||
/**
|
||||
* Switch to add custom code placeholders
|
||||
*
|
||||
@ -341,6 +362,13 @@ class Get
|
||||
*/
|
||||
public $componentCodeName;
|
||||
|
||||
/**
|
||||
* The Component Code Name Length
|
||||
*
|
||||
* @var int
|
||||
*/
|
||||
public $componentCodeNameLength;
|
||||
|
||||
/**
|
||||
* The Component ID
|
||||
*
|
||||
@ -453,6 +481,13 @@ class Get
|
||||
*/
|
||||
public $siteEditView = array();
|
||||
|
||||
/**
|
||||
* The admin list view filter type
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
public $adminFilterType = array();
|
||||
|
||||
/**
|
||||
* The Language target
|
||||
*
|
||||
@ -822,7 +857,8 @@ class Get
|
||||
if (isset($config) && count($config))
|
||||
{
|
||||
// we do not yet have this set as an option
|
||||
$config['remove_line_breaks'] = 2; // 2 is global (use the components value)
|
||||
$config['remove_line_breaks']
|
||||
= 2; // 2 is global (use the components value)
|
||||
// load application
|
||||
$this->app = JFactory::getApplication();
|
||||
// Set the params
|
||||
@ -900,14 +936,29 @@ class Get
|
||||
// set component context
|
||||
$this->componentContext = $this->componentCodeName . '.'
|
||||
. $this->componentID;
|
||||
// set the component name length
|
||||
$this->componentCodeNameLength = strlen(
|
||||
$this->componentCodeName
|
||||
);
|
||||
// add assets table fix
|
||||
$global = (int) $this->params->get(
|
||||
'assets_table_fix', 1
|
||||
);
|
||||
$this->addAssetsTableFix = (($add_assets_table_fix
|
||||
= (int) ComponentbuilderHelper::getVar(
|
||||
'joomla_component', $this->componentID, 'id',
|
||||
'assets_table_fix'
|
||||
)) == 3) ? $global : $add_assets_table_fix;
|
||||
// set if language strings line breaks should be removed
|
||||
$global = ((int) ComponentbuilderHelper::getVar(
|
||||
$global = ((int) ComponentbuilderHelper::getVar(
|
||||
'joomla_component', $this->componentID, 'id',
|
||||
'remove_line_breaks'
|
||||
) == 1) ? true : false;
|
||||
$this->removeLineBreaks = ((int) $config['remove_line_breaks'] == 0)
|
||||
$this->removeLineBreaks = ((int) $config['remove_line_breaks']
|
||||
== 0)
|
||||
? false
|
||||
: (((int) $config['remove_line_breaks'] == 1) ? true : $global);
|
||||
: (((int) $config['remove_line_breaks'] == 1) ? true
|
||||
: $global);
|
||||
// set if placeholders should be added to customcode
|
||||
$global = ((int) ComponentbuilderHelper::getVar(
|
||||
'joomla_component', $this->componentID, 'id',
|
||||
@ -1477,16 +1528,19 @@ class Get
|
||||
$this->siteEditView[$array['adminview']] = true;
|
||||
$this->lang = 'both';
|
||||
}
|
||||
// set the import/export option for this view
|
||||
if (isset($array['port']) && $array['port']
|
||||
&& !$this->addEximport)
|
||||
{
|
||||
$this->addEximport = true;
|
||||
}
|
||||
// set the history tracking option for this view
|
||||
if (isset($array['history']) && $array['history']
|
||||
&& !$this->setTagHistory)
|
||||
{
|
||||
$this->setTagHistory = true;
|
||||
}
|
||||
// set the custom field integration for this view
|
||||
if (isset($array['joomla_fields'])
|
||||
&& $array['joomla_fields']
|
||||
&& !$this->setJoomlaFields)
|
||||
@ -1499,6 +1553,18 @@ class Get
|
||||
$array['settings'] = $this->getAdminViewData(
|
||||
$array['view']
|
||||
);
|
||||
// set the filter option for this view
|
||||
$this->adminFilterType[$array['settings']->name_list_code]
|
||||
= 1; // Side (old) [default for now]
|
||||
if (isset($array['filter'])
|
||||
&& is_numeric(
|
||||
$array['filter']
|
||||
)
|
||||
&& $array['filter'] > 0)
|
||||
{
|
||||
$this->adminFilterType[$array['settings']->name_list_code]
|
||||
= (int) $array['filter'];
|
||||
}
|
||||
|
||||
return $array;
|
||||
}, array_values($component->addadmin_views)
|
||||
@ -2080,14 +2146,16 @@ class Get
|
||||
}
|
||||
elseif (!isset($this->langContent[$target][$language]))
|
||||
{
|
||||
$this->langContent[$target][$language] = $this->fixLangString($string);
|
||||
$this->langContent[$target][$language] = $this->fixLangString(
|
||||
$string
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* We need to remove all text breaks from all language strings
|
||||
*
|
||||
* @param string $string The language string
|
||||
* @param string $string The language string
|
||||
*
|
||||
* @return string
|
||||
*
|
||||
@ -2098,6 +2166,7 @@ class Get
|
||||
{
|
||||
return trim(str_replace(array(PHP_EOL, "\r", "\n"), '', $string));
|
||||
}
|
||||
|
||||
return trim($string);
|
||||
}
|
||||
|
||||
@ -2175,13 +2244,35 @@ class Get
|
||||
// Load the results as a list of stdClass objects (see later for more options on retrieving data).
|
||||
$view = $this->db->loadObject();
|
||||
|
||||
// setup view name to use in storing the data
|
||||
$name_single = ComponentbuilderHelper::safeString(
|
||||
$view->name_single
|
||||
);
|
||||
$name_list = ComponentbuilderHelper::safeString($view->name_list);
|
||||
// setup single view code names to use in storing the data
|
||||
$view->name_single_code = 'oops_hmm_' . $id;
|
||||
if (isset($view->name_single) && $view->name_single != 'null')
|
||||
{
|
||||
$view->name_single_code = ComponentbuilderHelper::safeString(
|
||||
$view->name_single
|
||||
);
|
||||
}
|
||||
|
||||
// set upater
|
||||
// setup list view code name to use in storing the data
|
||||
$view->name_list_code = 'oops_hmmm_' . $id;
|
||||
if (isset($view->name_list) && $view->name_list != 'null')
|
||||
{
|
||||
$view->name_list_code = ComponentbuilderHelper::safeString(
|
||||
$view->name_list
|
||||
);
|
||||
}
|
||||
|
||||
// check the length of the view name (+5 for com_ and _)
|
||||
$name_length = $this->componentCodeNameLength + strlen(
|
||||
$view->name_single_code
|
||||
) + 5;
|
||||
// when the name is larger then 49 we need to add the assets table name fix
|
||||
if ($name_length > 49)
|
||||
{
|
||||
$this->addAssetsTableNameFix = true;
|
||||
}
|
||||
|
||||
// set updater
|
||||
$updater = array(
|
||||
'unique' => array(
|
||||
'addfields' => array('table' => 'admin_fields',
|
||||
@ -2217,32 +2308,29 @@ class Get
|
||||
{
|
||||
$this->customScriptBuilder['token'] = array();
|
||||
}
|
||||
$this->customScriptBuilder['token'][$name_single] = false;
|
||||
$this->customScriptBuilder['token'][$name_list] = false;
|
||||
$this->customScriptBuilder['token'][$view->name_single_code]
|
||||
= false;
|
||||
$this->customScriptBuilder['token'][$view->name_list_code] = false;
|
||||
// set some placeholders
|
||||
$this->placeholders[$this->hhh . 'view' . $this->hhh]
|
||||
= ComponentbuilderHelper::safeString(
|
||||
$name_single
|
||||
);
|
||||
= $view->name_single_code;
|
||||
$this->placeholders[$this->hhh . 'views' . $this->hhh]
|
||||
= ComponentbuilderHelper::safeString(
|
||||
$name_list
|
||||
);
|
||||
= $view->name_list_code;
|
||||
$this->placeholders[$this->hhh . 'View' . $this->hhh]
|
||||
= ComponentbuilderHelper::safeString(
|
||||
$name_single, 'F'
|
||||
$view->name_single, 'F'
|
||||
);
|
||||
$this->placeholders[$this->hhh . 'Views' . $this->hhh]
|
||||
= ComponentbuilderHelper::safeString(
|
||||
$name_list, 'F'
|
||||
$view->name_list, 'F'
|
||||
);
|
||||
$this->placeholders[$this->hhh . 'VIEW' . $this->hhh]
|
||||
= ComponentbuilderHelper::safeString(
|
||||
$name_single, 'U'
|
||||
$view->name_single, 'U'
|
||||
);
|
||||
$this->placeholders[$this->hhh . 'VIEWS' . $this->hhh]
|
||||
= ComponentbuilderHelper::safeString(
|
||||
$name_list, 'U'
|
||||
$view->name_list, 'U'
|
||||
);
|
||||
$this->placeholders[$this->bbb . 'view' . $this->ddd]
|
||||
= $this->placeholders[$this->hhh . 'view' . $this->hhh];
|
||||
@ -2274,17 +2362,18 @@ class Get
|
||||
unset($view->addtables);
|
||||
|
||||
// set custom tabs
|
||||
$this->customTabs[$name_single] = null;
|
||||
$view->customtabs = (isset($view->customtabs)
|
||||
$this->customTabs[$view->name_single_code] = null;
|
||||
$view->customtabs
|
||||
= (isset($view->customtabs)
|
||||
&& ComponentbuilderHelper::checkJson($view->customtabs))
|
||||
? json_decode($view->customtabs, true) : null;
|
||||
if (ComponentbuilderHelper::checkArray($view->customtabs))
|
||||
{
|
||||
// setup custom tabs to global data sets
|
||||
$this->customTabs[$name_single] = array_map(
|
||||
function ($tab) use ($name_single) {
|
||||
$this->customTabs[$view->name_single_code] = array_map(
|
||||
function ($tab) use (&$view) {
|
||||
// set the view name
|
||||
$tab['view'] = $name_single;
|
||||
$tab['view'] = $view->name_single_code;
|
||||
// load the dynamic data
|
||||
$tab['html'] = $this->setPlaceholders(
|
||||
$this->setDynamicValues($tab['html']),
|
||||
@ -2445,11 +2534,12 @@ class Get
|
||||
// load the field data
|
||||
$view->fields = array_map(
|
||||
function ($field) use (
|
||||
$name_single, $name_list, &$ignoreFields
|
||||
&$view, &$ignoreFields
|
||||
) {
|
||||
// set the field details
|
||||
$this->setFieldDetails(
|
||||
$field, $name_single, $name_list
|
||||
$field, $view->name_single_code,
|
||||
$view->name_list_code
|
||||
);
|
||||
// check if this field is a default field OR
|
||||
// check if this is none database related field
|
||||
@ -2480,7 +2570,7 @@ class Get
|
||||
{
|
||||
$this->setUpdateSQL(
|
||||
json_decode($old_view->addfields, true),
|
||||
$view->addfields, 'field', $name_single,
|
||||
$view->addfields, 'field', $view->name_single_code,
|
||||
$ignoreFields
|
||||
);
|
||||
}
|
||||
@ -2515,7 +2605,9 @@ class Get
|
||||
foreach ($view->fields as $field)
|
||||
{
|
||||
// so first we lock the field name in
|
||||
$field_name = $this->getFieldName($field, $name_list);
|
||||
$field_name = $this->getFieldName(
|
||||
$field, $view->name_list_code
|
||||
);
|
||||
// check if the field changed since the last compilation (default fields never change and are always added)
|
||||
if (!isset($ignoreFields[$field['field']])
|
||||
&& ComponentbuilderHelper::checkObject(
|
||||
@ -2528,7 +2620,7 @@ class Get
|
||||
$this->setUpdateSQL(
|
||||
$field['settings']->history->datatype,
|
||||
$field['settings']->datatype, 'field.datatype',
|
||||
$name_single . '.' . $field_name
|
||||
$view->name_single_code . '.' . $field_name
|
||||
);
|
||||
}
|
||||
// check if the datatype lenght changed
|
||||
@ -2540,7 +2632,8 @@ class Get
|
||||
. $field['settings']->history->datalenght_other,
|
||||
$field['settings']->datalenght
|
||||
. $field['settings']->datalenght_other,
|
||||
'field.lenght', $name_single . '.' . $field_name
|
||||
'field.lenght',
|
||||
$view->name_single_code . '.' . $field_name
|
||||
);
|
||||
}
|
||||
// check if the name changed
|
||||
@ -2578,13 +2671,14 @@ class Get
|
||||
);
|
||||
|
||||
// only run this if not a multi field
|
||||
if (!isset($this->uniqueNames[$name_list]['names'][$field_name]))
|
||||
if (!isset($this->uniqueNames[$view->name_list_code]['names'][$field_name]))
|
||||
{
|
||||
// this only works when the field is not multiple of the same field
|
||||
$this->setUpdateSQL(
|
||||
$old_field_name, $field_name,
|
||||
'field.name',
|
||||
$name_single . '.' . $field_name
|
||||
$view->name_single_code . '.'
|
||||
. $field_name
|
||||
);
|
||||
}
|
||||
elseif ($old_field_name !== $field_name)
|
||||
@ -2597,7 +2691,8 @@ class Get
|
||||
$this->app->enqueueMessage(
|
||||
JText::sprintf(
|
||||
'You have a field called <b>%s</b> that has been added multiple times to the <b>%s</b> view, the name of that field has changed to <b>%s</b>. Normaly we would automaticly add the update SQL to your component, but with multiple fields this does not work automaticly since it could be that noting changed and it just seems like it did. Therefore you will have to do this manualy if it actualy did change!',
|
||||
$field_name, $name_single,
|
||||
$field_name,
|
||||
$view->name_single_code,
|
||||
$old_field_name
|
||||
), 'Notice'
|
||||
);
|
||||
@ -2619,7 +2714,8 @@ class Get
|
||||
$this->setUpdateSQL(
|
||||
ComponentbuilderHelper::safeString(
|
||||
$old_view->name_single
|
||||
), $name_single, 'table_name', $name_single
|
||||
), $view->name_single_code, 'table_name',
|
||||
$view->name_single_code
|
||||
);
|
||||
}
|
||||
// loop the mysql table settings
|
||||
@ -2634,7 +2730,7 @@ class Get
|
||||
$this->setUpdateSQL(
|
||||
$old_view->{'mysql_table_' . $_mysqlTableKey},
|
||||
$view->{'mysql_table_' . $_mysqlTableKey},
|
||||
'table_' . $_mysqlTableKey, $name_single
|
||||
'table_' . $_mysqlTableKey, $view->name_single_code
|
||||
);
|
||||
}
|
||||
// check if there is no history on table engine, and it changed from the default/global
|
||||
@ -2649,7 +2745,7 @@ class Get
|
||||
$this->setUpdateSQL(
|
||||
$_mysqlTableVal['default'],
|
||||
$view->{'mysql_table_' . $_mysqlTableKey},
|
||||
'table_' . $_mysqlTableKey, $name_single
|
||||
'table_' . $_mysqlTableKey, $view->name_single_code
|
||||
);
|
||||
}
|
||||
}
|
||||
@ -2702,7 +2798,7 @@ class Get
|
||||
$conditionValue['target_field'][$fieldKey]
|
||||
= array(
|
||||
'name' => $this->getFieldName(
|
||||
$fieldValues, $name_list
|
||||
$fieldValues, $view->name_list_code
|
||||
),
|
||||
'type' => $this->getFieldType(
|
||||
$fieldValues
|
||||
@ -2730,7 +2826,7 @@ class Get
|
||||
// set the field details
|
||||
$conditionValue['match_name']
|
||||
= $this->getFieldName(
|
||||
$fieldValue, $name_list
|
||||
$fieldValue, $view->name_list_code
|
||||
);
|
||||
$conditionValue['match_type'] = $type;
|
||||
$conditionValue['match_xml']
|
||||
@ -2760,9 +2856,9 @@ class Get
|
||||
unset($view->addconditions);
|
||||
|
||||
// prep the buckets
|
||||
$this->fieldRelations[$name_list] = array();
|
||||
$this->listJoinBuilder[$name_list] = array();
|
||||
$this->listHeadOverRide[$name_list] = array();
|
||||
$this->fieldRelations[$view->name_list_code] = array();
|
||||
$this->listJoinBuilder[$view->name_list_code] = array();
|
||||
$this->listHeadOverRide[$view->name_list_code] = array();
|
||||
// set the relations
|
||||
$view->addrelations = (isset($view->addrelations)
|
||||
&& ComponentbuilderHelper::checkJson($view->addrelations))
|
||||
@ -2792,16 +2888,16 @@ class Get
|
||||
);
|
||||
}
|
||||
// check that the arrays are set
|
||||
if (!isset($this->fieldRelations[$name_list][(int) $relationsValue['listfield']])
|
||||
if (!isset($this->fieldRelations[$view->name_list_code][(int) $relationsValue['listfield']])
|
||||
|| !ComponentbuilderHelper::checkArray(
|
||||
$this->fieldRelations[$name_list][(int) $relationsValue['listfield']]
|
||||
$this->fieldRelations[$view->name_list_code][(int) $relationsValue['listfield']]
|
||||
))
|
||||
{
|
||||
$this->fieldRelations[$name_list][(int) $relationsValue['listfield']]
|
||||
$this->fieldRelations[$view->name_list_code][(int) $relationsValue['listfield']]
|
||||
= array();
|
||||
}
|
||||
// load the field relations
|
||||
$this->fieldRelations[$name_list][(int) $relationsValue['listfield']][(int) $relationsValue['area']]
|
||||
$this->fieldRelations[$view->name_list_code][(int) $relationsValue['listfield']][(int) $relationsValue['area']]
|
||||
= $relationsValue;
|
||||
// load the list joints
|
||||
if (isset($relationsValue['joinfields'])
|
||||
@ -2811,7 +2907,7 @@ class Get
|
||||
{
|
||||
foreach ($relationsValue['joinfields'] as $join)
|
||||
{
|
||||
$this->listJoinBuilder[$name_list][(int) $join]
|
||||
$this->listJoinBuilder[$view->name_list_code][(int) $join]
|
||||
= (int) $join;
|
||||
}
|
||||
}
|
||||
@ -2829,7 +2925,7 @@ class Get
|
||||
{
|
||||
$column_name_lang = $this->langPrefix . '_'
|
||||
. ComponentbuilderHelper::safeString(
|
||||
$name_list, 'U'
|
||||
$view->name_list_code, 'U'
|
||||
) . '_'
|
||||
. ComponentbuilderHelper::safeString(
|
||||
$relationsValue['column_name'], 'U'
|
||||
@ -2838,7 +2934,7 @@ class Get
|
||||
'admin', $column_name_lang,
|
||||
$relationsValue['column_name']
|
||||
);
|
||||
$this->listHeadOverRide[$name_list][(int) $relationsValue['listfield']]
|
||||
$this->listHeadOverRide[$view->name_list_code][(int) $relationsValue['listfield']]
|
||||
= $column_name_lang;
|
||||
}
|
||||
}
|
||||
@ -2848,15 +2944,15 @@ class Get
|
||||
unset($view->addrelations);
|
||||
|
||||
// set linked views
|
||||
$this->linkedAdminViews[$name_single] = null;
|
||||
$this->linkedAdminViews[$view->name_single_code] = null;
|
||||
$view->addlinked_views
|
||||
= (isset($view->addlinked_views)
|
||||
= (isset($view->addlinked_views)
|
||||
&& ComponentbuilderHelper::checkJson($view->addlinked_views))
|
||||
? json_decode($view->addlinked_views, true) : null;
|
||||
if (ComponentbuilderHelper::checkArray($view->addlinked_views))
|
||||
{
|
||||
// setup linked views to global data sets
|
||||
$this->linkedAdminViews[$name_single] = array_values(
|
||||
$this->linkedAdminViews[$view->name_single_code] = array_values(
|
||||
$view->addlinked_views
|
||||
);
|
||||
}
|
||||
@ -2890,7 +2986,7 @@ class Get
|
||||
$this->setCustomScriptBuilder(
|
||||
$view->{$scripter},
|
||||
$scripter_target,
|
||||
$name_single,
|
||||
$view->name_single_code,
|
||||
false,
|
||||
$guiMapper,
|
||||
true,
|
||||
@ -2903,9 +2999,9 @@ class Get
|
||||
$view->$scripter, "task=ajax"
|
||||
) !== false)
|
||||
{
|
||||
if (!$this->customScriptBuilder['token'][$name_single])
|
||||
if (!$this->customScriptBuilder['token'][$view->name_single_code])
|
||||
{
|
||||
$this->customScriptBuilder['token'][$name_single]
|
||||
$this->customScriptBuilder['token'][$view->name_single_code]
|
||||
= true;
|
||||
}
|
||||
}
|
||||
@ -2924,7 +3020,7 @@ class Get
|
||||
$this->setCustomScriptBuilder(
|
||||
$view->{$scripter},
|
||||
$scripter,
|
||||
$name_single,
|
||||
$view->name_single_code,
|
||||
false,
|
||||
array('prefix' => PHP_EOL),
|
||||
true,
|
||||
@ -2956,13 +3052,15 @@ class Get
|
||||
$this->setCustomScriptBuilder(
|
||||
$view->{$scripter},
|
||||
$scripter,
|
||||
$name_single,
|
||||
$view->name_single_code,
|
||||
false,
|
||||
$guiMapper
|
||||
);
|
||||
|
||||
// check if we have template or layouts to load
|
||||
$this->setTemplateAndLayoutData($view->{$scripter}, $name_single);
|
||||
$this->setTemplateAndLayoutData(
|
||||
$view->{$scripter}, $view->name_single_code
|
||||
);
|
||||
|
||||
unset($view->{$scripter});
|
||||
}
|
||||
@ -2996,7 +3094,9 @@ class Get
|
||||
);
|
||||
|
||||
// check if we have template or layouts to load
|
||||
$this->setTemplateAndLayoutData($view->{$button_code_field}, $name_single);
|
||||
$this->setTemplateAndLayoutData(
|
||||
$view->{$button_code_field}, $view->name_single_code
|
||||
);
|
||||
}
|
||||
}
|
||||
// set the button array
|
||||
@ -3026,7 +3126,7 @@ class Get
|
||||
{
|
||||
// update GUI mapper field
|
||||
$guiMapper['field'] = $importScripter;
|
||||
$guiMapper['type'] = 'php';
|
||||
$guiMapper['type'] = 'php';
|
||||
// Make sure html gets HTML comment for placeholder
|
||||
if ('html_import_view' === $importScripter)
|
||||
{
|
||||
@ -3035,7 +3135,7 @@ class Get
|
||||
$this->setCustomScriptBuilder(
|
||||
$view->$importScripter,
|
||||
$importScripter,
|
||||
'import_' . $name_list,
|
||||
'import_' . $view->name_list_code,
|
||||
false,
|
||||
$guiMapper
|
||||
);
|
||||
@ -3045,7 +3145,7 @@ class Get
|
||||
{
|
||||
// load the default
|
||||
$this->customScriptBuilder[$importScripter]['import_'
|
||||
. $name_list]
|
||||
. $view->name_list_code]
|
||||
= ComponentbuilderHelper::getDynamicScripts(
|
||||
$importScripter, true
|
||||
);
|
||||
@ -3056,8 +3156,9 @@ class Get
|
||||
if (isset($view->add_php_ajax) && $view->add_php_ajax == 1)
|
||||
{
|
||||
// insure the token is added to edit view atleast
|
||||
$this->customScriptBuilder['token'][$name_single] = true;
|
||||
$addAjaxSite = false;
|
||||
$this->customScriptBuilder['token'][$view->name_single_code]
|
||||
= true;
|
||||
$addAjaxSite = false;
|
||||
if (isset($this->siteEditView[$id]) && $this->siteEditView[$id])
|
||||
{
|
||||
// we should add this site ajax to front ajax
|
||||
@ -3075,10 +3176,10 @@ class Get
|
||||
{
|
||||
if ($addAjaxSite)
|
||||
{
|
||||
$this->customScriptBuilder['site']['ajax_controller'][$name_single]
|
||||
$this->customScriptBuilder['site']['ajax_controller'][$view->name_single_code]
|
||||
= array_values($view->ajax_input);
|
||||
}
|
||||
$this->customScriptBuilder['admin']['ajax_controller'][$name_single]
|
||||
$this->customScriptBuilder['admin']['ajax_controller'][$view->name_single_code]
|
||||
= array_values($view->ajax_input);
|
||||
$this->addAjax = true;
|
||||
unset($view->ajax_input);
|
||||
@ -3093,7 +3194,7 @@ class Get
|
||||
$view->php_ajaxmethod,
|
||||
'admin',
|
||||
'ajax_model',
|
||||
$name_single,
|
||||
$view->name_single_code,
|
||||
$guiMapper
|
||||
);
|
||||
|
||||
@ -3103,7 +3204,7 @@ class Get
|
||||
$view->php_ajaxmethod,
|
||||
'site',
|
||||
'ajax_model',
|
||||
$name_single,
|
||||
$view->name_single_code,
|
||||
$guiMapper,
|
||||
false,
|
||||
false
|
||||
@ -3115,7 +3216,7 @@ class Get
|
||||
}
|
||||
}
|
||||
// activate alias builder
|
||||
if (!isset($this->customAliasBuilder[$name_single])
|
||||
if (!isset($this->customAliasBuilder[$view->name_single_code])
|
||||
&& isset($view->alias_builder_type)
|
||||
&& 2 == $view->alias_builder_type
|
||||
&& isset($view->alias_builder)
|
||||
@ -3139,9 +3240,12 @@ class Get
|
||||
if (ComponentbuilderHelper::checkArray($alias_fields))
|
||||
{
|
||||
// load the field names
|
||||
$this->customAliasBuilder[$name_single] = (array) array_map(
|
||||
function ($field) use ($name_list) {
|
||||
return $this->getFieldName($field, $name_list);
|
||||
$this->customAliasBuilder[$view->name_single_code]
|
||||
= (array) array_map(
|
||||
function ($field) use (&$view) {
|
||||
return $this->getFieldName(
|
||||
$field, $view->name_list_code
|
||||
);
|
||||
}, $alias_fields
|
||||
);
|
||||
}
|
||||
@ -3154,8 +3258,10 @@ class Get
|
||||
if ($view->source == 1 && isset($view->tables))
|
||||
{
|
||||
// build and add the SQL dump
|
||||
$this->customScriptBuilder['sql'][$name_single]
|
||||
= $this->buildSqlDump($view->tables, $name_single, $id);
|
||||
$this->customScriptBuilder['sql'][$view->name_single_code]
|
||||
= $this->buildSqlDump(
|
||||
$view->tables, $view->name_single_code, $id
|
||||
);
|
||||
unset($view->tables);
|
||||
}
|
||||
elseif ($view->source == 2 && isset($view->sql))
|
||||
@ -3164,15 +3270,15 @@ class Get
|
||||
$this->setCustomScriptBuilder(
|
||||
$view->sql,
|
||||
'sql',
|
||||
$name_single
|
||||
$view->name_single_code
|
||||
);
|
||||
unset($view->sql);
|
||||
}
|
||||
}
|
||||
// load table settings
|
||||
if (!isset($this->mysqlTableSetting[$name_single]))
|
||||
if (!isset($this->mysqlTableSetting[$view->name_single_code]))
|
||||
{
|
||||
$this->mysqlTableSetting[$name_single] = array();
|
||||
$this->mysqlTableSetting[$view->name_single_code] = array();
|
||||
}
|
||||
// set mySql Table Settings
|
||||
foreach (
|
||||
@ -3185,12 +3291,12 @@ class Get
|
||||
)
|
||||
&& !is_numeric($view->{'mysql_table_' . $_mysqlTableKey}))
|
||||
{
|
||||
$this->mysqlTableSetting[$name_single][$_mysqlTableKey]
|
||||
$this->mysqlTableSetting[$view->name_single_code][$_mysqlTableKey]
|
||||
= $view->{'mysql_table_' . $_mysqlTableKey};
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->mysqlTableSetting[$name_single][$_mysqlTableKey]
|
||||
$this->mysqlTableSetting[$view->name_single_code][$_mysqlTableKey]
|
||||
= $_mysqlTableVal['default'];
|
||||
}
|
||||
// remove the table values since we moved to another object
|
||||
@ -3254,7 +3360,12 @@ class Get
|
||||
|
||||
// Load the results as a list of stdClass objects (see later for more options on retrieving data).
|
||||
$view = $this->db->loadObject();
|
||||
|
||||
// fix alias to use in code
|
||||
$view->code = $this->uniqueCode(
|
||||
ComponentbuilderHelper::safeString($view->codename)
|
||||
);
|
||||
$view->Code = ComponentbuilderHelper::safeString($view->code, 'F');
|
||||
$view->CODE = ComponentbuilderHelper::safeString($view->code, 'U');
|
||||
// Trigger Event: jcb_ce_onBeforeModelCustomViewData
|
||||
$this->triggerEvent(
|
||||
'jcb_ce_onBeforeModelCustomViewData',
|
||||
@ -3300,12 +3411,6 @@ class Get
|
||||
$this->setDynamicValues(base64_decode($view->default)),
|
||||
$guiMapper
|
||||
);
|
||||
// fix alias to use in code
|
||||
$view->code = $this->uniqueCode(
|
||||
ComponentbuilderHelper::safeString($view->codename)
|
||||
);
|
||||
$view->Code = ComponentbuilderHelper::safeString($view->code, 'F');
|
||||
$view->CODE = ComponentbuilderHelper::safeString($view->code, 'U');
|
||||
// load context if not set
|
||||
if (!isset($view->context)
|
||||
|| !ComponentbuilderHelper::checkString(
|
||||
@ -3931,8 +4036,6 @@ class Get
|
||||
$this->_fieldData[$id]->css_view_decoded = true;
|
||||
}
|
||||
}
|
||||
// add this only once to view.
|
||||
$this->customFieldScript[$name_single][$id] = true;
|
||||
}
|
||||
// check if we should load scripts for list views
|
||||
if (ComponentbuilderHelper::checkString($name_list)
|
||||
@ -4003,7 +4106,7 @@ class Get
|
||||
$this->setCustomScriptBuilder(
|
||||
$this->_fieldData[$id]->css_views,
|
||||
'css_views',
|
||||
$name_list,
|
||||
$name_single,
|
||||
false,
|
||||
array('prefix' => PHP_EOL),
|
||||
$convert__,
|
||||
@ -4015,10 +4118,11 @@ class Get
|
||||
$this->_fieldData[$id]->css_views_decoded = true;
|
||||
}
|
||||
}
|
||||
|
||||
// add this only once to view.
|
||||
$this->customFieldScript[$name_list][$id] = true;
|
||||
}
|
||||
// add this only once to single view.
|
||||
$this->customFieldScript[$name_single][$id] = true;
|
||||
// add this only once to list view.
|
||||
$this->customFieldScript[$name_list][$id] = true;
|
||||
}
|
||||
if ($id > 0 && isset($this->_fieldData[$id]))
|
||||
{
|
||||
@ -4088,6 +4192,100 @@ class Get
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* get the list default ordering values
|
||||
*
|
||||
* @param string $nameListCode The list view name
|
||||
*
|
||||
* @return array
|
||||
*
|
||||
*/
|
||||
public function getListViewDefaultOrdering(&$nameListCode)
|
||||
{
|
||||
if (isset($this->viewsDefaultOrdering[$nameListCode])
|
||||
&& $this->viewsDefaultOrdering[$nameListCode]['add_admin_ordering']
|
||||
== 1)
|
||||
{
|
||||
foreach (
|
||||
$this->viewsDefaultOrdering[$nameListCode]['admin_ordering_fields']
|
||||
as $order_field
|
||||
)
|
||||
{
|
||||
if (($order_field_name = $this->getFieldDatabaseName(
|
||||
$nameListCode, $order_field['field']
|
||||
)) !== false)
|
||||
{
|
||||
// just the first field is the based ordering state
|
||||
return array(
|
||||
'name' => $order_field_name,
|
||||
'direction' => $order_field['direction']
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// the default
|
||||
return array(
|
||||
'name' => 'a.id',
|
||||
'direction' => 'DESC'
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* get the field database name and AS prefix
|
||||
*
|
||||
* @param string $nameListCode The list view name
|
||||
* @param int $fieldId The field ID
|
||||
* @param string $targetArea The area being targeted
|
||||
*
|
||||
* @return string
|
||||
*
|
||||
*/
|
||||
public function getFieldDatabaseName($nameListCode, int $fieldId,
|
||||
$targetArea = 'listBuilder'
|
||||
) {
|
||||
if (isset($this->{$targetArea}[$nameListCode]))
|
||||
{
|
||||
if ($fieldId < 0)
|
||||
{
|
||||
switch ($fieldId)
|
||||
{
|
||||
case -1:
|
||||
return 'a.id';
|
||||
case -2:
|
||||
return 'a.ordering';
|
||||
case -3:
|
||||
return 'a.published';
|
||||
}
|
||||
}
|
||||
foreach ($this->{$targetArea}[$nameListCode] as $field)
|
||||
{
|
||||
if ($field['id'] == $fieldId)
|
||||
{
|
||||
// now check if this is a category
|
||||
if ($field['type'] === 'category')
|
||||
{
|
||||
return 'c.title';
|
||||
}
|
||||
// set the custom code
|
||||
elseif (ComponentbuilderHelper::checkArray(
|
||||
$field['custom']
|
||||
))
|
||||
{
|
||||
return $field['custom']['db'] . "."
|
||||
. $field['custom']['text'];
|
||||
}
|
||||
else
|
||||
{
|
||||
return 'a.' . $field['code'];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the field's actual type
|
||||
*
|
||||
@ -5088,6 +5286,57 @@ class Get
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* get the a script from the custom script builder
|
||||
*
|
||||
* @param string $first The first key
|
||||
* @param string $second The second key
|
||||
* @param string $prefix The prefix to add in front of the script if found
|
||||
* @param string $note The switch/note to add to the script
|
||||
* @param bool $unset The switch to unset the value if found
|
||||
* @param string $default The switch/string to use as default return if script not found
|
||||
* @param string $sufix The sufix to add after the script if found
|
||||
*
|
||||
* @return mix The string/script if found or the default value if not found
|
||||
*
|
||||
*/
|
||||
public function getCustomScriptBuilder($first, $second, $prefix = '',
|
||||
$note = null, $unset = null, $default = null, $sufix = ''
|
||||
) {
|
||||
// default is to return an empty string
|
||||
$script = '';
|
||||
// check if there is any custom script
|
||||
if (isset($this->customScriptBuilder[$first][$second])
|
||||
&& ComponentbuilderHelper::checkString(
|
||||
$this->customScriptBuilder[$first][$second]
|
||||
))
|
||||
{
|
||||
// add not if set
|
||||
if ($note)
|
||||
{
|
||||
$script .= $note;
|
||||
}
|
||||
// load the actual script
|
||||
$script .= $prefix . str_replace(
|
||||
array_keys($this->placeholders),
|
||||
array_values($this->placeholders),
|
||||
$this->customScriptBuilder[$first][$second]
|
||||
) . $sufix;
|
||||
// clear some memory
|
||||
if ($unset)
|
||||
{
|
||||
unset($this->customScriptBuilder[$first][$second]);
|
||||
}
|
||||
}
|
||||
// if not found return default
|
||||
if (!ComponentbuilderHelper::checkString($script) && $default)
|
||||
{
|
||||
return $default;
|
||||
}
|
||||
|
||||
return $script;
|
||||
}
|
||||
|
||||
/**
|
||||
* To limit the SQL Demo date build in the views
|
||||
*
|
||||
@ -8552,7 +8801,7 @@ class Get
|
||||
$unique = $form['fields_name']
|
||||
. $form['fieldset'];
|
||||
}
|
||||
// set global fields rule path switchs
|
||||
// set global fields rule path switches
|
||||
if ($module->fields_rules_paths == 1
|
||||
&& isset($form['fields_rules_paths'])
|
||||
&& $form['fields_rules_paths'] == 2)
|
||||
@ -8771,7 +9020,7 @@ class Get
|
||||
$addScriptTypes = array('install', 'update',
|
||||
'uninstall');
|
||||
// the next are php placeholders
|
||||
$guiMapper['type'] = 'php';
|
||||
$guiMapper['type'] = 'php';
|
||||
foreach ($addScriptMethods as $scriptMethod)
|
||||
{
|
||||
foreach ($addScriptTypes as $scriptType)
|
||||
@ -8948,6 +9197,46 @@ class Get
|
||||
return $xml;
|
||||
}
|
||||
|
||||
/**
|
||||
* get the module admin custom script field
|
||||
*
|
||||
* @return string
|
||||
*
|
||||
*/
|
||||
public function getModAdminVvvvvvvdm($fieldScriptBucket)
|
||||
{
|
||||
$form_field_class = array();
|
||||
$form_field_class[] = $this->hhh . 'BOM' . $this->hhh . PHP_EOL;
|
||||
$form_field_class[] = "//" . $this->setLine(__LINE__)
|
||||
. " No direct access to this file";
|
||||
$form_field_class[] = "defined('_JEXEC') or die('Restricted access');";
|
||||
$form_field_class[] = PHP_EOL . "use Joomla\CMS\Form\FormField;";
|
||||
$form_field_class[] = "use Joomla\CMS\Factory;";
|
||||
$form_field_class[] = PHP_EOL
|
||||
. "class JFormFieldModadminvvvvvvvdm extends FormField";
|
||||
$form_field_class[] = "{";
|
||||
$form_field_class[] = $this->_t(1)
|
||||
. "protected \$type = 'modadminvvvvvvvdm';";
|
||||
$form_field_class[] = PHP_EOL . $this->_t(1)
|
||||
. "protected function getLabel()";
|
||||
$form_field_class[] = $this->_t(1) . "{";
|
||||
$form_field_class[] = $this->_t(2) . "return;";
|
||||
$form_field_class[] = $this->_t(1) . "}";
|
||||
$form_field_class[] = PHP_EOL . $this->_t(1)
|
||||
. "protected function getInput()";
|
||||
$form_field_class[] = $this->_t(1) . "{";
|
||||
$form_field_class[] = $this->_t(2) . "//" . $this->setLine(__LINE__)
|
||||
. " Get the document";
|
||||
$form_field_class[] = $this->_t(2)
|
||||
. "\$document = Factory::getDocument();";
|
||||
$form_field_class[] = implode(PHP_EOL, $fieldScriptBucket);
|
||||
$form_field_class[] = $this->_t(2) . "return; // noting for now :)";
|
||||
$form_field_class[] = $this->_t(1) . "}";
|
||||
$form_field_class[] = "}";
|
||||
|
||||
return implode(PHP_EOL, $form_field_class);
|
||||
}
|
||||
|
||||
/**
|
||||
* get the Joomla plugins IDs
|
||||
*
|
||||
@ -9253,7 +9542,7 @@ class Get
|
||||
);
|
||||
// set description
|
||||
$this->placeholders[$this->hhh . 'DESCRIPTION' . $this->hhh]
|
||||
= $plugin->description;
|
||||
= $plugin->description;
|
||||
$plugin->description = '<p>' . $plugin->description
|
||||
. '</p>';
|
||||
}
|
||||
@ -9739,13 +10028,16 @@ class Get
|
||||
);
|
||||
unset(
|
||||
$this->placeholders[$this->hhh . 'VERSION'
|
||||
. $this->hhh]);
|
||||
. $this->hhh]
|
||||
);
|
||||
unset(
|
||||
$this->placeholders[$this->hhh . 'DESCRIPTION'
|
||||
. $this->hhh]);
|
||||
. $this->hhh]
|
||||
);
|
||||
unset(
|
||||
$this->placeholders[$this->hhh . 'PLUGIN_NAME'
|
||||
. $this->hhh]);
|
||||
. $this->hhh]
|
||||
);
|
||||
|
||||
$this->joomlaPlugins[$id] = $plugin;
|
||||
|
||||
@ -10406,19 +10698,26 @@ class Get
|
||||
if (strpos($script, 'LOCKBASE64((((') !== false)
|
||||
{
|
||||
// get the strings
|
||||
$values = ComponentbuilderHelper::getAllBetween($script, 'LOCKBASE64((((', '))))');
|
||||
$values = ComponentbuilderHelper::getAllBetween(
|
||||
$script, 'LOCKBASE64((((', '))))'
|
||||
);
|
||||
$locker = array();
|
||||
// convert them
|
||||
foreach($values as $value)
|
||||
foreach ($values as $value)
|
||||
{
|
||||
$locker['LOCKBASE64((((' . $value . '))))'] = "base64_decode( preg_replace('/\s+/', ''," .
|
||||
$locker['LOCKBASE64((((' . $value . '))))']
|
||||
= "base64_decode( preg_replace('/\s+/', ''," .
|
||||
PHP_EOL . $this->_t(2) . "'" .
|
||||
wordwrap(base64_encode($value), 64, PHP_EOL . $this->_t(2), true) .
|
||||
wordwrap(
|
||||
base64_encode($value), 64, PHP_EOL . $this->_t(2), true
|
||||
) .
|
||||
"'))";
|
||||
}
|
||||
|
||||
// update the script
|
||||
return $this->setPlaceholders($script, $locker);
|
||||
}
|
||||
|
||||
return $script;
|
||||
}
|
||||
|
||||
|
@ -501,16 +501,8 @@ class Structure extends Get
|
||||
$this->dynamicPaths[$module->key] = $module->folder_path;
|
||||
// make sure there is no old build
|
||||
$this->removeFolder($module->folder_path);
|
||||
// creat the main component folder
|
||||
if (!JFolder::exists($module->folder_path))
|
||||
{
|
||||
JFolder::create($module->folder_path);
|
||||
// count the folder created
|
||||
$this->folderCount++;
|
||||
$this->indexHTML(
|
||||
$module->folder_name, $this->compilerPath
|
||||
);
|
||||
}
|
||||
// creat the main module folder
|
||||
$this->createFolder($module->folder_path);
|
||||
// set main mod file
|
||||
$fileDetails = array('path' => $module->folder_path . '/'
|
||||
. $module->file_name . '.php',
|
||||
@ -592,15 +584,7 @@ class Structure extends Get
|
||||
// count the file created
|
||||
$this->fileCount++;
|
||||
// set tmpl folder
|
||||
if (!JFolder::exists($module->folder_path . '/tmpl'))
|
||||
{
|
||||
JFolder::create($module->folder_path . '/tmpl');
|
||||
// count the folder created
|
||||
$this->folderCount++;
|
||||
$this->indexHTML(
|
||||
$module->folder_name . '/tmpl', $this->compilerPath
|
||||
);
|
||||
}
|
||||
$this->createFolder($module->folder_path . '/tmpl');
|
||||
// set default file
|
||||
$fileDetails = array('path' => $module->folder_path
|
||||
. '/tmpl/default.php',
|
||||
@ -652,32 +636,116 @@ class Structure extends Get
|
||||
// count the file created
|
||||
$this->fileCount++;
|
||||
}
|
||||
// set fields & rules folders if needed
|
||||
// set the folders target path
|
||||
$target_path = '';
|
||||
if ($module->target_client === 'administrator')
|
||||
{
|
||||
$target_path = '/administrator';
|
||||
}
|
||||
// check if we have custom fields needed for scripts
|
||||
$module->add_scripts_field = false;
|
||||
$field_script_bucket = array();
|
||||
// add any css from the fields
|
||||
if (($css = $this->getCustomScriptBuilder(
|
||||
'css_view', $module->key
|
||||
)) !== null
|
||||
&& ComponentbuilderHelper::checkString($css))
|
||||
{
|
||||
// make sure this script does not have PHP
|
||||
if (strpos($css, '<?php') === false)
|
||||
{
|
||||
// make sure the field is added
|
||||
$module->add_scripts_field = true;
|
||||
// create the css folder
|
||||
$this->createFolder($module->folder_path . '/css');
|
||||
// add the CSS file
|
||||
$fileDetails = array('path' => $module->folder_path
|
||||
. '/css/mod_admin.css',
|
||||
'name' => 'mod_admin.css',
|
||||
'zip' => 'mod_admin.css');
|
||||
$this->writeFile(
|
||||
$fileDetails['path'],
|
||||
$this->hhh . 'BOM' . $this->hhh . PHP_EOL
|
||||
. PHP_EOL . $css
|
||||
);
|
||||
$this->newFiles[$module->key][] = $fileDetails;
|
||||
// count the file created
|
||||
$this->fileCount++;
|
||||
// add the field script
|
||||
$field_script_bucket[] = $this->_t(2) . "//"
|
||||
. $this->setLine(__LINE__) . " Custom CSS";
|
||||
$field_script_bucket[] = $this->_t(2)
|
||||
. "\$document->addStyleSheet('" . $target_path
|
||||
. "/modules/" . $module->folder_name
|
||||
. "/css/mod_admin.css', ['version' => 'auto', 'relative' => true]);";
|
||||
}
|
||||
}
|
||||
// add any JavaScript from the fields
|
||||
if (($javascript = $this->getCustomScriptBuilder(
|
||||
'view_footer', $module->key
|
||||
)) !== null
|
||||
&& ComponentbuilderHelper::checkString($javascript))
|
||||
{
|
||||
// make sure this script does not have PHP
|
||||
if (strpos($javascript, '<?php') === false)
|
||||
{
|
||||
// make sure the field is added
|
||||
$module->add_scripts_field = true;
|
||||
// add the JavaScript file
|
||||
$this->createFolder($module->folder_path . '/js');
|
||||
// add the CSS file
|
||||
$fileDetails = array('path' => $module->folder_path
|
||||
. '/js/mod_admin.js',
|
||||
'name' => 'mod_admin.js',
|
||||
'zip' => 'mod_admin.js');
|
||||
$this->writeFile(
|
||||
$fileDetails['path'],
|
||||
$this->hhh . 'BOM' . $this->hhh . PHP_EOL
|
||||
. PHP_EOL . $javascript
|
||||
);
|
||||
$this->newFiles[$module->key][] = $fileDetails;
|
||||
// count the file created
|
||||
$this->fileCount++;
|
||||
// add the field script
|
||||
$field_script_bucket[] = $this->_t(2) . "//"
|
||||
. $this->setLine(__LINE__) . " Custom JS";
|
||||
$field_script_bucket[] = $this->_t(2)
|
||||
. "\$document->addScript('" . $target_path
|
||||
. "/modules/" . $module->folder_name
|
||||
. "/js/mod_admin.js', ['version' => 'auto', 'relative' => true]);";
|
||||
}
|
||||
}
|
||||
// set fields folders if needed
|
||||
if ($module->add_scripts_field
|
||||
|| (isset($module->fields_rules_paths)
|
||||
&& $module->fields_rules_paths == 2))
|
||||
{
|
||||
// create fields folder
|
||||
$this->createFolder($module->folder_path . '/fields');
|
||||
// add the custom script field
|
||||
if ($module->add_scripts_field)
|
||||
{
|
||||
$fileDetails = array('path' => $module->folder_path
|
||||
. '/fields/modadminvvvvvvvdm.php',
|
||||
'name' => 'modadminvvvvvvvdm.php',
|
||||
'zip' => 'modadminvvvvvvvdm.php');
|
||||
$this->writeFile(
|
||||
$fileDetails['path'],
|
||||
$this->getModAdminVvvvvvvdm(
|
||||
$field_script_bucket
|
||||
)
|
||||
);
|
||||
$this->newFiles[$module->key][] = $fileDetails;
|
||||
// count the file created
|
||||
$this->fileCount++;
|
||||
}
|
||||
}
|
||||
// set rules folders if needed
|
||||
if (isset($module->fields_rules_paths)
|
||||
&& $module->fields_rules_paths == 2)
|
||||
{
|
||||
// create fields folder
|
||||
if (!JFolder::exists($module->folder_path . '/fields'))
|
||||
{
|
||||
JFolder::create($module->folder_path . '/fields');
|
||||
// count the folder created
|
||||
$this->folderCount++;
|
||||
$this->indexHTML(
|
||||
$module->folder_name . '/fields',
|
||||
$this->compilerPath
|
||||
);
|
||||
}
|
||||
// create rules folder
|
||||
if (!JFolder::exists($module->folder_path . '/rules'))
|
||||
{
|
||||
JFolder::create($module->folder_path . '/rules');
|
||||
// count the folder created
|
||||
$this->folderCount++;
|
||||
$this->indexHTML(
|
||||
$module->folder_name . '/rules',
|
||||
$this->compilerPath
|
||||
);
|
||||
}
|
||||
$this->createFolder($module->folder_path . '/rules');
|
||||
}
|
||||
// set forms folder if needed
|
||||
if (isset($module->form_files)
|
||||
@ -686,16 +754,7 @@ class Structure extends Get
|
||||
))
|
||||
{
|
||||
// create forms folder
|
||||
if (!JFolder::exists($module->folder_path . '/forms'))
|
||||
{
|
||||
JFolder::create($module->folder_path . '/forms');
|
||||
// count the folder created
|
||||
$this->folderCount++;
|
||||
$this->indexHTML(
|
||||
$module->folder_name . '/forms',
|
||||
$this->compilerPath
|
||||
);
|
||||
}
|
||||
$this->createFolder($module->folder_path . '/forms');
|
||||
// set the template files
|
||||
foreach ($module->form_files as $file => $fields)
|
||||
{
|
||||
@ -705,7 +764,7 @@ class Structure extends Get
|
||||
'name' => $file . '.xml',
|
||||
'zip' => 'forms/' . $file
|
||||
. '.xml');
|
||||
// biuld basic XML
|
||||
// build basic XML
|
||||
$xml = '<?xml version="1.0" encoding="utf-8"?>';
|
||||
$xml .= PHP_EOL . '<!--' . $this->setLine(__LINE__)
|
||||
. ' default paths of ' . $file
|
||||
@ -848,31 +907,11 @@ class Structure extends Get
|
||||
if ($module->add_sql || $module->add_sql_uninstall)
|
||||
{
|
||||
// create SQL folder
|
||||
if (!JFolder::exists($module->folder_path . '/sql'))
|
||||
{
|
||||
JFolder::create($module->folder_path . '/sql');
|
||||
// count the folder created
|
||||
$this->folderCount++;
|
||||
$this->indexHTML(
|
||||
$module->folder_name . '/sql',
|
||||
$this->compilerPath
|
||||
);
|
||||
}
|
||||
$this->createFolder($module->folder_path . '/sql');
|
||||
// create mysql folder
|
||||
if (!JFolder::exists(
|
||||
$this->createFolder(
|
||||
$module->folder_path . '/sql/mysql'
|
||||
))
|
||||
{
|
||||
JFolder::create(
|
||||
$module->folder_path . '/sql/mysql'
|
||||
);
|
||||
// count the folder created
|
||||
$this->folderCount++;
|
||||
$this->indexHTML(
|
||||
$module->folder_name . '/sql/mysql',
|
||||
$this->compilerPath
|
||||
);
|
||||
}
|
||||
);
|
||||
// now set the install file
|
||||
if ($module->add_sql)
|
||||
{
|
||||
@ -896,24 +935,11 @@ class Structure extends Get
|
||||
}
|
||||
}
|
||||
// creat the language folder
|
||||
if (!JFolder::exists($module->folder_path . '/language'))
|
||||
{
|
||||
JFolder::create($module->folder_path . '/language');
|
||||
// count the folder created
|
||||
$this->folderCount++;
|
||||
// also the lang tag
|
||||
if (!JFolder::exists(
|
||||
$module->folder_path . '/language/' . $this->langTag
|
||||
))
|
||||
{
|
||||
JFolder::create(
|
||||
$module->folder_path . '/language/'
|
||||
. $this->langTag
|
||||
);
|
||||
// count the folder created
|
||||
$this->folderCount++;
|
||||
}
|
||||
}
|
||||
$this->createFolder($module->folder_path . '/language');
|
||||
// also create the lang tag folder
|
||||
$this->createFolder(
|
||||
$module->folder_path . '/language/' . $this->langTag
|
||||
);
|
||||
// check if this lib has files
|
||||
if (isset($module->files)
|
||||
&& ComponentbuilderHelper::checkArray($module->files))
|
||||
@ -974,20 +1000,9 @@ class Structure extends Get
|
||||
$path = '';
|
||||
}
|
||||
// create sub media path if not set
|
||||
if (!JFolder::exists(
|
||||
$this->createFolder(
|
||||
$module->folder_path . $path
|
||||
))
|
||||
{
|
||||
JFolder::create(
|
||||
$module->folder_path . $path
|
||||
);
|
||||
// count the folder created
|
||||
$this->folderCount++;
|
||||
$this->indexHTML(
|
||||
$module->folder_name . $path,
|
||||
$this->compilerPath
|
||||
);
|
||||
}
|
||||
);
|
||||
// set the path to module file
|
||||
$url['path'] = $module->folder_path . $path
|
||||
. '/' . $fileName; // we need this for later
|
||||
@ -1034,15 +1049,7 @@ class Structure extends Get
|
||||
// make sure there is no old build
|
||||
$this->removeFolder($plugin->folder_path);
|
||||
// creat the main component folder
|
||||
if (!JFolder::exists($plugin->folder_path))
|
||||
{
|
||||
JFolder::create($plugin->folder_path);
|
||||
// count the folder created
|
||||
$this->folderCount++;
|
||||
$this->indexHTML(
|
||||
$plugin->folder_name, $this->compilerPath
|
||||
);
|
||||
}
|
||||
$this->createFolder($plugin->folder_path);
|
||||
// set main class file
|
||||
$fileDetails = array('path' => $plugin->folder_path . '/'
|
||||
. $plugin->file_name . '.php',
|
||||
@ -1111,27 +1118,9 @@ class Structure extends Get
|
||||
&& $plugin->fields_rules_paths == 2)
|
||||
{
|
||||
// create fields folder
|
||||
if (!JFolder::exists($plugin->folder_path . '/fields'))
|
||||
{
|
||||
JFolder::create($plugin->folder_path . '/fields');
|
||||
// count the folder created
|
||||
$this->folderCount++;
|
||||
$this->indexHTML(
|
||||
$plugin->folder_name . '/fields',
|
||||
$this->compilerPath
|
||||
);
|
||||
}
|
||||
$this->createFolder($plugin->folder_path . '/fields');
|
||||
// create rules folder
|
||||
if (!JFolder::exists($plugin->folder_path . '/rules'))
|
||||
{
|
||||
JFolder::create($plugin->folder_path . '/rules');
|
||||
// count the folder created
|
||||
$this->folderCount++;
|
||||
$this->indexHTML(
|
||||
$plugin->folder_name . '/rules',
|
||||
$this->compilerPath
|
||||
);
|
||||
}
|
||||
$this->createFolder($plugin->folder_path . '/rules');
|
||||
}
|
||||
// set forms folder if needed
|
||||
if (isset($plugin->form_files)
|
||||
@ -1140,16 +1129,7 @@ class Structure extends Get
|
||||
))
|
||||
{
|
||||
// create forms folder
|
||||
if (!JFolder::exists($plugin->folder_path . '/forms'))
|
||||
{
|
||||
JFolder::create($plugin->folder_path . '/forms');
|
||||
// count the folder created
|
||||
$this->folderCount++;
|
||||
$this->indexHTML(
|
||||
$plugin->folder_name . '/forms',
|
||||
$this->compilerPath
|
||||
);
|
||||
}
|
||||
$this->createFolder($plugin->folder_path . '/forms');
|
||||
// set the template files
|
||||
foreach ($plugin->form_files as $file => $fields)
|
||||
{
|
||||
@ -1304,31 +1284,11 @@ class Structure extends Get
|
||||
if ($plugin->add_sql || $plugin->add_sql_uninstall)
|
||||
{
|
||||
// create SQL folder
|
||||
if (!JFolder::exists($plugin->folder_path . '/sql'))
|
||||
{
|
||||
JFolder::create($plugin->folder_path . '/sql');
|
||||
// count the folder created
|
||||
$this->folderCount++;
|
||||
$this->indexHTML(
|
||||
$plugin->folder_name . '/sql',
|
||||
$this->compilerPath
|
||||
);
|
||||
}
|
||||
$this->createFolder($plugin->folder_path . '/sql');
|
||||
// create mysql folder
|
||||
if (!JFolder::exists(
|
||||
$this->createFolder(
|
||||
$plugin->folder_path . '/sql/mysql'
|
||||
))
|
||||
{
|
||||
JFolder::create(
|
||||
$plugin->folder_path . '/sql/mysql'
|
||||
);
|
||||
// count the folder created
|
||||
$this->folderCount++;
|
||||
$this->indexHTML(
|
||||
$plugin->folder_name . '/sql/mysql',
|
||||
$this->compilerPath
|
||||
);
|
||||
}
|
||||
);
|
||||
// now set the install file
|
||||
if ($plugin->add_sql)
|
||||
{
|
||||
@ -1351,25 +1311,12 @@ class Structure extends Get
|
||||
$this->fileCount++;
|
||||
}
|
||||
}
|
||||
// creat the language folder
|
||||
if (!JFolder::exists($plugin->folder_path . '/language'))
|
||||
{
|
||||
JFolder::create($plugin->folder_path . '/language');
|
||||
// count the folder created
|
||||
$this->folderCount++;
|
||||
// also the lang tag
|
||||
if (!JFolder::exists(
|
||||
$plugin->folder_path . '/language/' . $this->langTag
|
||||
))
|
||||
{
|
||||
JFolder::create(
|
||||
$plugin->folder_path . '/language/'
|
||||
. $this->langTag
|
||||
);
|
||||
// count the folder created
|
||||
$this->folderCount++;
|
||||
}
|
||||
}
|
||||
// creat the language folder path
|
||||
$this->createFolder($plugin->folder_path . '/language');
|
||||
// also creat the lang tag folder path
|
||||
$this->createFolder(
|
||||
$plugin->folder_path . '/language/' . $this->langTag
|
||||
);
|
||||
// check if this lib has files
|
||||
if (isset($plugin->files)
|
||||
&& ComponentbuilderHelper::checkArray($plugin->files))
|
||||
@ -1429,21 +1376,10 @@ class Structure extends Get
|
||||
{
|
||||
$path = '';
|
||||
}
|
||||
// create sub media path if not set
|
||||
if (!JFolder::exists(
|
||||
// create sub media media folder path if not set
|
||||
$this->createFolder(
|
||||
$plugin->folder_path . $path
|
||||
))
|
||||
{
|
||||
JFolder::create(
|
||||
$plugin->folder_path . $path
|
||||
);
|
||||
// count the folder created
|
||||
$this->folderCount++;
|
||||
$this->indexHTML(
|
||||
$plugin->folder_name . $path,
|
||||
$this->compilerPath
|
||||
);
|
||||
}
|
||||
);
|
||||
// set the path to plugin file
|
||||
$url['path'] = $plugin->folder_path . $path
|
||||
. '/' . $fileName; // we need this for later
|
||||
@ -1459,6 +1395,31 @@ class Structure extends Get
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Create Path if not exist
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
private function createFolder($path)
|
||||
{
|
||||
// check if the path exist
|
||||
if (!JFolder::exists(
|
||||
$path
|
||||
))
|
||||
{
|
||||
// create the path
|
||||
JFolder::create(
|
||||
$path
|
||||
);
|
||||
// count the folder created
|
||||
$this->folderCount++;
|
||||
// add index.html (boring I know)
|
||||
$this->indexHTML(
|
||||
$path, ''
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Build the Libraries files, folders, url's and config
|
||||
*
|
||||
@ -1483,13 +1444,7 @@ class Structure extends Get
|
||||
$this->indexHTML('');
|
||||
}
|
||||
// create media path if not set
|
||||
if (!JFolder::exists($this->componentPath . '/media'))
|
||||
{
|
||||
JFolder::create($this->componentPath . '/media');
|
||||
// count the folder created
|
||||
$this->folderCount++;
|
||||
$this->indexHTML('/media');
|
||||
}
|
||||
$this->createFolder($this->componentPath . '/media');
|
||||
foreach ($this->libraries as $id => &$library)
|
||||
{
|
||||
if (ComponentbuilderHelper::checkObject($library))
|
||||
@ -1542,17 +1497,9 @@ class Structure extends Get
|
||||
))
|
||||
{
|
||||
// create media/lib path if not set
|
||||
if (!JFolder::exists(
|
||||
$this->createFolder(
|
||||
$this->componentPath . $mediaPath
|
||||
))
|
||||
{
|
||||
JFolder::create(
|
||||
$this->componentPath . $mediaPath
|
||||
);
|
||||
// count the folder created
|
||||
$this->folderCount++;
|
||||
$this->indexHTML($mediaPath);
|
||||
}
|
||||
);
|
||||
// add local folder
|
||||
$addLocalFolder = true;
|
||||
// set file name
|
||||
@ -1575,18 +1522,9 @@ class Structure extends Get
|
||||
$path = '';
|
||||
}
|
||||
// create sub media path if not set
|
||||
if (!JFolder::exists(
|
||||
$this->createFolder(
|
||||
$this->componentPath . $mediaPath . $path
|
||||
))
|
||||
{
|
||||
JFolder::create(
|
||||
$this->componentPath . $mediaPath
|
||||
. $path
|
||||
);
|
||||
// count the folder created
|
||||
$this->folderCount++;
|
||||
$this->indexHTML($mediaPath . $path);
|
||||
}
|
||||
);
|
||||
// set the path to library file
|
||||
$url['path'] = $mediaPath . $path . '/'
|
||||
. $fileName; // we need this for later
|
||||
@ -1808,47 +1746,22 @@ class Structure extends Get
|
||||
// now build all folders needed for this component
|
||||
foreach ($this->joomlaVersionData->create as $main => $folders)
|
||||
{
|
||||
if (!JFolder::exists($this->componentPath . '/' . $main))
|
||||
{
|
||||
JFolder::create($this->componentPath . '/' . $main);
|
||||
// count the folder created
|
||||
$this->folderCount++;
|
||||
$this->indexHTML($main);
|
||||
}
|
||||
$this->createFolder($this->componentPath . '/' . $main);
|
||||
if (ComponentbuilderHelper::checkObject($folders))
|
||||
{
|
||||
foreach ($folders as $sub => $subFolders)
|
||||
{
|
||||
if (!JFolder::exists(
|
||||
$this->createFolder(
|
||||
$this->componentPath . '/' . $main . '/' . $sub
|
||||
))
|
||||
{
|
||||
JFolder::create(
|
||||
$this->componentPath . '/' . $main . '/' . $sub
|
||||
);
|
||||
// count the folder created
|
||||
$this->folderCount++;
|
||||
$this->indexHTML($main . '/' . $sub);
|
||||
}
|
||||
);
|
||||
if (ComponentbuilderHelper::checkObject($subFolders))
|
||||
{
|
||||
foreach ($subFolders as $sub_2 => $subFolders_2)
|
||||
{
|
||||
if (!JFolder::exists(
|
||||
$this->createFolder(
|
||||
$this->componentPath . '/' . $main . '/'
|
||||
. $sub . '/' . $sub_2
|
||||
))
|
||||
{
|
||||
JFolder::create(
|
||||
$this->componentPath . '/' . $main . '/'
|
||||
. $sub . '/' . $sub_2
|
||||
);
|
||||
// count the folder created
|
||||
$this->folderCount++;
|
||||
$this->indexHTML(
|
||||
$main . '/' . $sub . '/' . $sub_2
|
||||
);
|
||||
}
|
||||
);
|
||||
if (ComponentbuilderHelper::checkObject(
|
||||
$subFolders_2
|
||||
))
|
||||
@ -1857,25 +1770,11 @@ class Structure extends Get
|
||||
$subFolders_2 as $sub_3 => $subFolders_3
|
||||
)
|
||||
{
|
||||
|
||||
if (!JFolder::exists(
|
||||
$this->createFolder(
|
||||
$this->componentPath . '/' . $main
|
||||
. '/' . $sub . '/' . $sub_2 . '/'
|
||||
. $sub_3
|
||||
))
|
||||
{
|
||||
JFolder::create(
|
||||
$this->componentPath . '/'
|
||||
. $main . '/' . $sub . '/'
|
||||
. $sub_2 . '/' . $sub_3
|
||||
);
|
||||
// count the folder created
|
||||
$this->folderCount++;
|
||||
$this->indexHTML(
|
||||
$main . '/' . $sub . '/'
|
||||
. $sub_2 . '/' . $sub_3
|
||||
);
|
||||
}
|
||||
);
|
||||
if (ComponentbuilderHelper::checkObject(
|
||||
$subFolders_3
|
||||
))
|
||||
@ -1885,28 +1784,12 @@ class Structure extends Get
|
||||
$subFolders_4
|
||||
)
|
||||
{
|
||||
if (!JFolder::exists(
|
||||
$this->createFolder(
|
||||
$this->componentPath . '/'
|
||||
. $main . '/' . $sub . '/'
|
||||
. $sub_2 . '/' . $sub_3
|
||||
. '/' . $sub_4
|
||||
))
|
||||
{
|
||||
JFolder::create(
|
||||
$this->componentPath
|
||||
. '/' . $main . '/'
|
||||
. $sub . '/' . $sub_2
|
||||
. '/' . $sub_3 . '/'
|
||||
. $sub_4
|
||||
);
|
||||
// count the folder created
|
||||
$this->folderCount++;
|
||||
$this->indexHTML(
|
||||
$main . '/' . $sub . '/'
|
||||
. $sub_2 . '/' . $sub_3
|
||||
. '/' . $sub_4
|
||||
);
|
||||
}
|
||||
);
|
||||
if (ComponentbuilderHelper::checkObject(
|
||||
$subFolders_4
|
||||
))
|
||||
@ -1916,7 +1799,7 @@ class Structure extends Get
|
||||
=> $subFolders_5
|
||||
)
|
||||
{
|
||||
if (!JFolder::exists(
|
||||
$this->createFolder(
|
||||
$this->componentPath
|
||||
. '/' . $main . '/'
|
||||
. $sub . '/'
|
||||
@ -1924,28 +1807,7 @@ class Structure extends Get
|
||||
. $sub_3 . '/'
|
||||
. $sub_4 . '/'
|
||||
. $sub_5
|
||||
))
|
||||
{
|
||||
JFolder::create(
|
||||
$this->componentPath
|
||||
. '/' . $main
|
||||
. '/' . $sub
|
||||
. '/' . $sub_2
|
||||
. '/' . $sub_3
|
||||
. '/' . $sub_4
|
||||
. '/' . $sub_5
|
||||
);
|
||||
// count the folder created
|
||||
$this->folderCount++;
|
||||
$this->indexHTML(
|
||||
$main . '/'
|
||||
. $sub . '/'
|
||||
. $sub_2 . '/'
|
||||
. $sub_3 . '/'
|
||||
. $sub_4 . '/'
|
||||
. $sub_5
|
||||
);
|
||||
}
|
||||
);
|
||||
if (ComponentbuilderHelper::checkObject(
|
||||
$subFolders_5
|
||||
))
|
||||
@ -1956,11 +1818,12 @@ class Structure extends Get
|
||||
$subFolders_6
|
||||
)
|
||||
{
|
||||
if (!JFolder::exists(
|
||||
$this->createFolder(
|
||||
$this->componentPath
|
||||
. '/'
|
||||
. $main
|
||||
. '/' . $sub
|
||||
. '/'
|
||||
. $sub
|
||||
. '/'
|
||||
. $sub_2
|
||||
. '/'
|
||||
@ -1971,43 +1834,7 @@ class Structure extends Get
|
||||
. $sub_5
|
||||
. '/'
|
||||
. $sub_6
|
||||
))
|
||||
{
|
||||
JFolder::create(
|
||||
$this->componentPath
|
||||
. '/'
|
||||
. $main
|
||||
. '/'
|
||||
. $sub
|
||||
. '/'
|
||||
. $sub_2
|
||||
. '/'
|
||||
. $sub_3
|
||||
. '/'
|
||||
. $sub_4
|
||||
. '/'
|
||||
. $sub_5
|
||||
. '/'
|
||||
. $sub_6
|
||||
);
|
||||
// count the folder created
|
||||
$this->folderCount++;
|
||||
$this->indexHTML(
|
||||
$main
|
||||
. '/'
|
||||
. $sub
|
||||
. '/'
|
||||
. $sub_2
|
||||
. '/'
|
||||
. $sub_3
|
||||
. '/'
|
||||
. $sub_4
|
||||
. '/'
|
||||
. $sub_5
|
||||
. '/'
|
||||
. $sub_6
|
||||
);
|
||||
}
|
||||
);
|
||||
if (ComponentbuilderHelper::checkObject(
|
||||
$subFolders_6
|
||||
))
|
||||
@ -2020,7 +1847,7 @@ class Structure extends Get
|
||||
$subFolders_7
|
||||
)
|
||||
{
|
||||
if (!JFolder::exists(
|
||||
$this->createFolder(
|
||||
$this->componentPath
|
||||
. '/'
|
||||
. $main
|
||||
@ -2038,47 +1865,7 @@ class Structure extends Get
|
||||
. $sub_6
|
||||
. '/'
|
||||
. $sub_7
|
||||
))
|
||||
{
|
||||
JFolder::create(
|
||||
$this->componentPath
|
||||
. '/'
|
||||
. $main
|
||||
. '/'
|
||||
. $sub
|
||||
. '/'
|
||||
. $sub_2
|
||||
. '/'
|
||||
. $sub_3
|
||||
. '/'
|
||||
. $sub_4
|
||||
. '/'
|
||||
. $sub_5
|
||||
. '/'
|
||||
. $sub_6
|
||||
. '/'
|
||||
. $sub_7
|
||||
);
|
||||
// count the folder created
|
||||
$this->folderCount++;
|
||||
$this->indexHTML(
|
||||
$main
|
||||
. '/'
|
||||
. $sub
|
||||
. '/'
|
||||
. $sub_2
|
||||
. '/'
|
||||
. $sub_3
|
||||
. '/'
|
||||
. $sub_4
|
||||
. '/'
|
||||
. $sub_5
|
||||
. '/'
|
||||
. $sub_6
|
||||
. '/'
|
||||
. $sub_7
|
||||
);
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -2634,11 +2421,13 @@ class Structure extends Get
|
||||
{
|
||||
// get the fields ids
|
||||
$ids = array_map(
|
||||
'trim', explode(
|
||||
',', ComponentbuilderHelper::getBetween(
|
||||
$multi_field['settings']->xml, 'fields="', '"'
|
||||
)
|
||||
)
|
||||
'trim',
|
||||
explode(
|
||||
',',
|
||||
ComponentbuilderHelper::getBetween(
|
||||
$multi_field['settings']->xml, 'fields="', '"'
|
||||
)
|
||||
)
|
||||
);
|
||||
if (ComponentbuilderHelper::checkArray($ids))
|
||||
{
|
||||
@ -2927,7 +2716,7 @@ class Structure extends Get
|
||||
/**
|
||||
* set the Joomla Version Data
|
||||
*
|
||||
* @return oject The version data
|
||||
* @return object The version data
|
||||
*
|
||||
*/
|
||||
private function setJoomlaVersionData()
|
||||
@ -3249,14 +3038,14 @@ class Structure extends Get
|
||||
{
|
||||
if ('component' === $root)
|
||||
{
|
||||
$root = $this->componentPath;
|
||||
$root = $this->componentPath . '/';
|
||||
}
|
||||
// use path if exist
|
||||
if (strlen($path) > 0)
|
||||
{
|
||||
JFile::copy(
|
||||
$this->templatePath . '/index.html',
|
||||
$root . '/' . $path . '/index.html'
|
||||
$root . $path . '/index.html'
|
||||
);
|
||||
// count the file created
|
||||
$this->fileCount++;
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -313,7 +313,7 @@ COM_COMPONENTBUILDER_ADMIN_FIELDS_FIELD="Field"
|
||||
COM_COMPONENTBUILDER_ADMIN_FIELDS_FIELDS="Fields"
|
||||
COM_COMPONENTBUILDER_ADMIN_FIELDS_FIELD_DESCRIPTION="Select a field"
|
||||
COM_COMPONENTBUILDER_ADMIN_FIELDS_FIELD_LABEL="Field"
|
||||
COM_COMPONENTBUILDER_ADMIN_FIELDS_FILTER_DESCRIPTION="Select if the field is to be used as a filter in list view, if shown."
|
||||
COM_COMPONENTBUILDER_ADMIN_FIELDS_FILTER_DESCRIPTION="Should this field be used as a filter in list view, if shown."
|
||||
COM_COMPONENTBUILDER_ADMIN_FIELDS_FILTER_LABEL="Filter"
|
||||
COM_COMPONENTBUILDER_ADMIN_FIELDS_FULL_WIDTH_IN_TAB="Full Width in Tab"
|
||||
COM_COMPONENTBUILDER_ADMIN_FIELDS_ID="Id"
|
||||
@ -328,6 +328,7 @@ COM_COMPONENTBUILDER_ADMIN_FIELDS_MODIFIED_BY_LABEL="Modified By"
|
||||
COM_COMPONENTBUILDER_ADMIN_FIELDS_MODIFIED_DATE_DESC="The date this Admin Fields was modified."
|
||||
COM_COMPONENTBUILDER_ADMIN_FIELDS_MODIFIED_DATE_LABEL="Modified Date"
|
||||
COM_COMPONENTBUILDER_ADMIN_FIELDS_NEW="A New Admin Fields"
|
||||
COM_COMPONENTBUILDER_ADMIN_FIELDS_NO="No"
|
||||
COM_COMPONENTBUILDER_ADMIN_FIELDS_NONE_DB="None DB"
|
||||
COM_COMPONENTBUILDER_ADMIN_FIELDS_NOTE_ON_VIEWS_DESCRIPTION="id, asset_id, state, access, ordering, created_by, created, modified_by, modified, checked_out, checked_out_time, version, hits, metakey, metadesc, metadata (you don't need to add them again)<br />For more help <a href='https://youtu.be/CdSKSCTzmRA?list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=32m28s' target='_blank'>please watch this tutorial</a>."
|
||||
COM_COMPONENTBUILDER_ADMIN_FIELDS_NOTE_ON_VIEWS_LABEL="The following fields are added by default to all views."
|
||||
@ -409,6 +410,8 @@ COM_COMPONENTBUILDER_ADMIN_FIELDS_UNDERNEATH_TABS="Underneath Tabs"
|
||||
COM_COMPONENTBUILDER_ADMIN_FIELDS_VERSION_DESC="A count of the number of times this Admin Fields has been revised."
|
||||
COM_COMPONENTBUILDER_ADMIN_FIELDS_VERSION_LABEL="Version"
|
||||
COM_COMPONENTBUILDER_ADMIN_FIELDS_VIEW="View"
|
||||
COM_COMPONENTBUILDER_ADMIN_FIELDS_YES_MULTI="Yes (multi)"
|
||||
COM_COMPONENTBUILDER_ADMIN_FIELDS_YES_SINGLE="Yes (single)"
|
||||
COM_COMPONENTBUILDER_ADMIN_VIEW="Admin View"
|
||||
COM_COMPONENTBUILDER_ADMIN_VIEWS="Admin Views"
|
||||
COM_COMPONENTBUILDER_ADMIN_VIEWS_ACCESS="Admin Views Access"
|
||||
@ -2277,6 +2280,7 @@ COM_COMPONENTBUILDER_COMPONENTS_UPDATES_N_ITEMS_UNFEATURED_1="%s Component Updat
|
||||
COM_COMPONENTBUILDER_COMPONENTS_UPDATES_N_ITEMS_UNPUBLISHED="%s Components Updates unpublished."
|
||||
COM_COMPONENTBUILDER_COMPONENTS_UPDATES_N_ITEMS_UNPUBLISHED_1="%s Component Updates unpublished."
|
||||
COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS="Component Admin Views"
|
||||
COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_ABOVE_NEW="Above (new)"
|
||||
COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_ACCESS_DESCRIPTION="Select if this view<br />should use access."
|
||||
COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_ACCESS_LABEL="Add Access"
|
||||
COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_ADD="Add"
|
||||
@ -2382,6 +2386,8 @@ COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_FILE_MINUS="File Minus"
|
||||
COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_FILE_REMOVE="File Remove"
|
||||
COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_FILE_TWO="File 2"
|
||||
COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_FILTER="Filter"
|
||||
COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_FILTER_DESCRIPTION="Select the type of filter to use in this list view."
|
||||
COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_FILTER_LABEL="Filter Type"
|
||||
COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_FIRST="First"
|
||||
COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_FLAG="Flag"
|
||||
COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_FLAG_THREE="Flag 3"
|
||||
@ -2499,6 +2505,7 @@ COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_SHARE="Share"
|
||||
COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_SHARE_ALT="Share Alt"
|
||||
COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_SHIELD="Shield"
|
||||
COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_SHUFFLE="Shuffle"
|
||||
COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_SIDE_OLD="Side (old)"
|
||||
COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_SIGNUP="Signup"
|
||||
COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_SMILEY="Smiley"
|
||||
COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_SMILEY_NEUTRAL="Smiley Neutral"
|
||||
@ -3284,6 +3291,10 @@ COM_COMPONENTBUILDER_CONFIG_ALPHANUMERIC="Alphanumeric"
|
||||
COM_COMPONENTBUILDER_CONFIG_ALPHANUMERICDOT="Alphanumeric+dot"
|
||||
COM_COMPONENTBUILDER_CONFIG_API_DESCRIPTION="This User will be used to log the API call."
|
||||
COM_COMPONENTBUILDER_CONFIG_API_LABEL="API User"
|
||||
COM_COMPONENTBUILDER_CONFIG_ASSETS_TABLE_FIX_DESCRIPTION="How to apply the assets table fix in JCB.<br />
|
||||
SQL (add&remove) this is the <b>default</b> which adds the SQL fix and removes it once the component is uninstalled.<br />
|
||||
Intelligent (add&remove+if) same as default, but on uninstall will only remove this fix if no other component needs it. Note that this option will only work with other components that also use the <b>intelligent path</b>."
|
||||
COM_COMPONENTBUILDER_CONFIG_ASSETS_TABLE_FIX_LABEL="Assets Table Fix"
|
||||
COM_COMPONENTBUILDER_CONFIG_AUTHOR="Author Info"
|
||||
COM_COMPONENTBUILDER_CONFIG_AUTHOR_EMAIL_DESC="The email address of the author of this component."
|
||||
COM_COMPONENTBUILDER_CONFIG_AUTHOR_EMAIL_LABEL="Author Email"
|
||||
@ -3371,6 +3382,7 @@ COM_COMPONENTBUILDER_CONFIG_CHECK_TIMER_OPTION_SIX="Never"
|
||||
COM_COMPONENTBUILDER_CONFIG_CHECK_TIMER_OPTION_THREE="Once a day"
|
||||
COM_COMPONENTBUILDER_CONFIG_CHECK_TIMER_OPTION_TWO="Every twelve hours"
|
||||
COM_COMPONENTBUILDER_CONFIG_COMPANY="Company"
|
||||
COM_COMPONENTBUILDER_CONFIG_COMPILER="Compiler"
|
||||
COM_COMPONENTBUILDER_CONFIG_COMPILER_FIELD_BUILDER_TYPE_DESCRIPTION="Select the method to use when building the xml fields in the compiler. The <b>SimpleXMLElement Class</b> is best practice, and <b>String Manipulation</b> is faster and works without special extensions."
|
||||
COM_COMPONENTBUILDER_CONFIG_COMPILER_FIELD_BUILDER_TYPE_LABEL="Field Builder Type<br /><small>(in compiler)</small>"
|
||||
COM_COMPONENTBUILDER_CONFIG_COMPILER_FOLDER_PATH_DESCRIPTION="Here you can set the path to the compiler folder"
|
||||
@ -3426,6 +3438,7 @@ COM_COMPONENTBUILDER_CONFIG_DKIM_VALUE_DESCRIPTION="This is the TXT value to use
|
||||
COM_COMPONENTBUILDER_CONFIG_DKIM_VALUE_HINT="v=DKIM1;k=rsa;g=*;s=email;h=sha1;t=s;p=PUBLICKEY"
|
||||
COM_COMPONENTBUILDER_CONFIG_DKIM_VALUE_LABEL="Value"
|
||||
COM_COMPONENTBUILDER_CONFIG_DONT_LOAD="Not"
|
||||
COM_COMPONENTBUILDER_CONFIG_DO_NOT_ADD_FIX_EVER="Do not add fix ever"
|
||||
COM_COMPONENTBUILDER_CONFIG_DYNAMIC_GET_JOIN_DB_TABLE="Dynamic Get (join_db_table)"
|
||||
COM_COMPONENTBUILDER_CONFIG_DYNAMIC_GET_JOIN_VIEW_TABLE="Dynamic Get (join_view_table)"
|
||||
COM_COMPONENTBUILDER_CONFIG_EDITOR_DESCRIPTION="Select the editor you would like to use as the JCB global editor for all custom coding areas."
|
||||
@ -3533,6 +3546,7 @@ COM_COMPONENTBUILDER_CONFIG_GRADIANT_LOAD="Gradient"
|
||||
COM_COMPONENTBUILDER_CONFIG_INACTIVE="Inactive"
|
||||
COM_COMPONENTBUILDER_CONFIG_INSTALL_DESCRIPTION="Component locally"
|
||||
COM_COMPONENTBUILDER_CONFIG_INSTALL_LABEL="Install"
|
||||
COM_COMPONENTBUILDER_CONFIG_INTELLIGENT_ADDREMOVEIF="Intelligent (add&remove+if)"
|
||||
COM_COMPONENTBUILDER_CONFIG_JCB_COMMUNITY_PACKAGES="JCB Community Packages"
|
||||
COM_COMPONENTBUILDER_CONFIG_JCB_PACKAGE_DIRECTORIES_DESCRIPTION="Here you can manage what package directories show in the JCB package import area."
|
||||
COM_COMPONENTBUILDER_CONFIG_JCB_PACKAGE_DIRECTORIES_LABEL="Directories"
|
||||
@ -3654,6 +3668,7 @@ COM_COMPONENTBUILDER_CONFIG_SMTPSECURE_LABEL="SMTP Security"
|
||||
COM_COMPONENTBUILDER_CONFIG_SMTPUSER_DESCRIPTION="Enter the username for access to the SMTP host."
|
||||
COM_COMPONENTBUILDER_CONFIG_SMTPUSER_HINT="email@demo.com"
|
||||
COM_COMPONENTBUILDER_CONFIG_SMTPUSER_LABEL="SMTP Username"
|
||||
COM_COMPONENTBUILDER_CONFIG_SQL_ADDREMOVE="SQL (add&remove)"
|
||||
COM_COMPONENTBUILDER_CONFIG_SSL="SSL"
|
||||
COM_COMPONENTBUILDER_CONFIG_STORAGE_TIME_TO_LIVE_DESCRIPTION="How long should the data that is stored in the browser memory remain unchanged before it is removed and updated."
|
||||
COM_COMPONENTBUILDER_CONFIG_STORAGE_TIME_TO_LIVE_LABEL="Update Cycle"
|
||||
@ -4798,7 +4813,7 @@ COM_COMPONENTBUILDER_EDIT_VERSIONS_DESC="Allows users in this group to edit vers
|
||||
COM_COMPONENTBUILDER_EDIT_VIEW="Edit View"
|
||||
COM_COMPONENTBUILDER_EMAIL="Email"
|
||||
COM_COMPONENTBUILDER_EMAIL_S="Email %s"
|
||||
COM_COMPONENTBUILDER_EMAIL_WITH_THE_NEW_KEY_WAS_SEND="Email with the new key was send"
|
||||
COM_COMPONENTBUILDER_EMAIL_WITH_THE_NEW_KEY_WAS_SENT="Email with the new key was sent"
|
||||
COM_COMPONENTBUILDER_EMCOMPANYEM_BSB="<em>Company:</em> <b>%s</b>"
|
||||
COM_COMPONENTBUILDER_EMCOPYRIGHTEM_BSB="<em>Copyright:</em> <b>%s</b>"
|
||||
COM_COMPONENTBUILDER_EMEMAILEM_BSB="<em>Email:</em> <b>%s</b>"
|
||||
@ -5329,6 +5344,214 @@ COM_COMPONENTBUILDER_FILE_BSB_WAS_MOVED_TO_BSB="File <b>%s</b> was moved to <b>%
|
||||
COM_COMPONENTBUILDER_FILE_BSB_WAS_NOT_MOVED_TO_BSB="File <b>%s</b> was not moved to <b>%s</b>"
|
||||
COM_COMPONENTBUILDER_FILE_BSB_WAS_SUCCESSFULLY_UNLOCKED="File <b>%s</b> was successfully unlocked!"
|
||||
COM_COMPONENTBUILDER_FILTER="Filter"
|
||||
COM_COMPONENTBUILDER_FILTER_ADMIN_VIEW_ASCENDING="Admin View ascending"
|
||||
COM_COMPONENTBUILDER_FILTER_ADMIN_VIEW_DESCENDING="Admin View descending"
|
||||
COM_COMPONENTBUILDER_FILTER_CLASS_EXTENDS_ASCENDING="Class Extends ascending"
|
||||
COM_COMPONENTBUILDER_FILTER_CLASS_EXTENDS_DESCENDING="Class Extends descending"
|
||||
COM_COMPONENTBUILDER_FILTER_COMMENT_TYPE_ASCENDING="Comment Type ascending"
|
||||
COM_COMPONENTBUILDER_FILTER_COMMENT_TYPE_DESCENDING="Comment Type descending"
|
||||
COM_COMPONENTBUILDER_FILTER_COMPANYNAME_ASCENDING="Companyname ascending"
|
||||
COM_COMPONENTBUILDER_FILTER_COMPANYNAME_DESCENDING="Companyname descending"
|
||||
COM_COMPONENTBUILDER_FILTER_COMPONENT_ASCENDING="Component ascending"
|
||||
COM_COMPONENTBUILDER_FILTER_COMPONENT_DESCENDING="Component descending"
|
||||
COM_COMPONENTBUILDER_FILTER_CONTEXT_ASCENDING="Context ascending"
|
||||
COM_COMPONENTBUILDER_FILTER_CONTEXT_DESCENDING="Context descending"
|
||||
COM_COMPONENTBUILDER_FILTER_DATATYPE_ASCENDING="Datatype ascending"
|
||||
COM_COMPONENTBUILDER_FILTER_DATATYPE_DESCENDING="Datatype descending"
|
||||
COM_COMPONENTBUILDER_FILTER_DESCRIPTION_ASCENDING="Description ascending"
|
||||
COM_COMPONENTBUILDER_FILTER_DESCRIPTION_DESCENDING="Description descending"
|
||||
COM_COMPONENTBUILDER_FILTER_DYNAMIC_GET_ASCENDING="Dynamic Get ascending"
|
||||
COM_COMPONENTBUILDER_FILTER_DYNAMIC_GET_DESCENDING="Dynamic Get descending"
|
||||
COM_COMPONENTBUILDER_FILTER_EXTENSION_TYPE_ASCENDING="Extension Type ascending"
|
||||
COM_COMPONENTBUILDER_FILTER_EXTENSION_TYPE_DESCENDING="Extension Type descending"
|
||||
COM_COMPONENTBUILDER_FILTER_FIELDS_CATEGORIES_ASCENDING="Fields Categories ascending"
|
||||
COM_COMPONENTBUILDER_FILTER_FIELDS_CATEGORIES_DESCENDING="Fields Categories descending"
|
||||
COM_COMPONENTBUILDER_FILTER_FIELDTYPES_CATEGORIES_ASCENDING="Fieldtypes Categories ascending"
|
||||
COM_COMPONENTBUILDER_FILTER_FIELDTYPES_CATEGORIES_DESCENDING="Fieldtypes Categories descending"
|
||||
COM_COMPONENTBUILDER_FILTER_FIELDTYPE_ASCENDING="Fieldtype ascending"
|
||||
COM_COMPONENTBUILDER_FILTER_FIELDTYPE_DESCENDING="Fieldtype descending"
|
||||
COM_COMPONENTBUILDER_FILTER_GETTYPE_ASCENDING="Gettype ascending"
|
||||
COM_COMPONENTBUILDER_FILTER_GETTYPE_DESCENDING="Gettype descending"
|
||||
COM_COMPONENTBUILDER_FILTER_HEADING_ASCENDING="Heading ascending"
|
||||
COM_COMPONENTBUILDER_FILTER_HEADING_DESCENDING="Heading descending"
|
||||
COM_COMPONENTBUILDER_FILTER_INDEXES_ASCENDING="Indexes ascending"
|
||||
COM_COMPONENTBUILDER_FILTER_INDEXES_DESCENDING="Indexes descending"
|
||||
COM_COMPONENTBUILDER_FILTER_JOOMLA_PLUGIN_GROUP_ASCENDING="Joomla Plugin Group ascending"
|
||||
COM_COMPONENTBUILDER_FILTER_JOOMLA_PLUGIN_GROUP_DESCENDING="Joomla Plugin Group descending"
|
||||
COM_COMPONENTBUILDER_FILTER_LANGTAG_ASCENDING="Langtag ascending"
|
||||
COM_COMPONENTBUILDER_FILTER_LANGTAG_DESCENDING="Langtag descending"
|
||||
COM_COMPONENTBUILDER_FILTER_LIBRARY_ASCENDING="Library ascending"
|
||||
COM_COMPONENTBUILDER_FILTER_LIBRARY_DESCENDING="Library descending"
|
||||
COM_COMPONENTBUILDER_FILTER_LOCATION_ASCENDING="Location ascending"
|
||||
COM_COMPONENTBUILDER_FILTER_LOCATION_DESCENDING="Location descending"
|
||||
COM_COMPONENTBUILDER_FILTER_MAIN_GET_ASCENDING="Main Get ascending"
|
||||
COM_COMPONENTBUILDER_FILTER_MAIN_GET_DESCENDING="Main Get descending"
|
||||
COM_COMPONENTBUILDER_FILTER_MAIN_SOURCE_ASCENDING="Main Source ascending"
|
||||
COM_COMPONENTBUILDER_FILTER_MAIN_SOURCE_DESCENDING="Main Source descending"
|
||||
COM_COMPONENTBUILDER_FILTER_NAME_ASCENDING="Name ascending"
|
||||
COM_COMPONENTBUILDER_FILTER_NAME_CODE_ASCENDING="Name Code ascending"
|
||||
COM_COMPONENTBUILDER_FILTER_NAME_CODE_DESCENDING="Name Code descending"
|
||||
COM_COMPONENTBUILDER_FILTER_NAME_DESCENDING="Name descending"
|
||||
COM_COMPONENTBUILDER_FILTER_NAME_SINGLE_ASCENDING="Name Single ascending"
|
||||
COM_COMPONENTBUILDER_FILTER_NAME_SINGLE_DESCENDING="Name Single descending"
|
||||
COM_COMPONENTBUILDER_FILTER_NULL_SWITCH_ASCENDING="Null Switch ascending"
|
||||
COM_COMPONENTBUILDER_FILTER_NULL_SWITCH_DESCENDING="Null Switch descending"
|
||||
COM_COMPONENTBUILDER_FILTER_PATH_ASCENDING="Path ascending"
|
||||
COM_COMPONENTBUILDER_FILTER_PATH_DESCENDING="Path descending"
|
||||
COM_COMPONENTBUILDER_FILTER_PROTOCOL_ASCENDING="Protocol ascending"
|
||||
COM_COMPONENTBUILDER_FILTER_PROTOCOL_DESCENDING="Protocol descending"
|
||||
COM_COMPONENTBUILDER_FILTER_PUBLISHED="Status"
|
||||
COM_COMPONENTBUILDER_FILTER_PUBLISHED_ADMINS_CUSTOM_TABS="Status options for admins custom tabs"
|
||||
COM_COMPONENTBUILDER_FILTER_PUBLISHED_ADMINS_FIELDS="Status options for admins fields"
|
||||
COM_COMPONENTBUILDER_FILTER_PUBLISHED_ADMINS_FIELDS_CONDITIONS="Status options for admins fields conditions"
|
||||
COM_COMPONENTBUILDER_FILTER_PUBLISHED_ADMINS_FIELDS_RELATIONS="Status options for admins fields relations"
|
||||
COM_COMPONENTBUILDER_FILTER_PUBLISHED_ADMIN_VIEWS="Status options for admin views"
|
||||
COM_COMPONENTBUILDER_FILTER_PUBLISHED_CLASS_EXTENDINGS="Status options for class extendings"
|
||||
COM_COMPONENTBUILDER_FILTER_PUBLISHED_CLASS_METHODS="Status options for class methods"
|
||||
COM_COMPONENTBUILDER_FILTER_PUBLISHED_CLASS_PROPERTIES="Status options for class properties"
|
||||
COM_COMPONENTBUILDER_FILTER_PUBLISHED_COMPONENTS_ADMIN_VIEWS="Status options for components admin views"
|
||||
COM_COMPONENTBUILDER_FILTER_PUBLISHED_COMPONENTS_CONFIG="Status options for components config"
|
||||
COM_COMPONENTBUILDER_FILTER_PUBLISHED_COMPONENTS_CUSTOM_ADMIN_MENUS="Status options for components custom admin menus"
|
||||
COM_COMPONENTBUILDER_FILTER_PUBLISHED_COMPONENTS_CUSTOM_ADMIN_VIEWS="Status options for components custom admin views"
|
||||
COM_COMPONENTBUILDER_FILTER_PUBLISHED_COMPONENTS_DASHBOARD="Status options for components dashboard"
|
||||
COM_COMPONENTBUILDER_FILTER_PUBLISHED_COMPONENTS_FILES_FOLDERS="Status options for components files folders"
|
||||
COM_COMPONENTBUILDER_FILTER_PUBLISHED_COMPONENTS_MODULES="Status options for components modules"
|
||||
COM_COMPONENTBUILDER_FILTER_PUBLISHED_COMPONENTS_MYSQL_TWEAKS="Status options for components mysql tweaks"
|
||||
COM_COMPONENTBUILDER_FILTER_PUBLISHED_COMPONENTS_PLACEHOLDERS="Status options for components placeholders"
|
||||
COM_COMPONENTBUILDER_FILTER_PUBLISHED_COMPONENTS_PLUGINS="Status options for components plugins"
|
||||
COM_COMPONENTBUILDER_FILTER_PUBLISHED_COMPONENTS_SITE_VIEWS="Status options for components site views"
|
||||
COM_COMPONENTBUILDER_FILTER_PUBLISHED_COMPONENTS_UPDATES="Status options for components updates"
|
||||
COM_COMPONENTBUILDER_FILTER_PUBLISHED_CUSTOM_ADMIN_VIEWS="Status options for custom admin views"
|
||||
COM_COMPONENTBUILDER_FILTER_PUBLISHED_CUSTOM_CODES="Status options for custom codes"
|
||||
COM_COMPONENTBUILDER_FILTER_PUBLISHED_DYNAMIC_GETS="Status options for dynamic gets"
|
||||
COM_COMPONENTBUILDER_FILTER_PUBLISHED_FIELDS="Status options for fields"
|
||||
COM_COMPONENTBUILDER_FILTER_PUBLISHED_FIELDTYPES="Status options for fieldtypes"
|
||||
COM_COMPONENTBUILDER_FILTER_PUBLISHED_HELP_DOCUMENTS="Status options for help documents"
|
||||
COM_COMPONENTBUILDER_FILTER_PUBLISHED_JOOMLA_COMPONENTS="Status options for joomla components"
|
||||
COM_COMPONENTBUILDER_FILTER_PUBLISHED_JOOMLA_MODULES="Status options for joomla modules"
|
||||
COM_COMPONENTBUILDER_FILTER_PUBLISHED_JOOMLA_MODULES_FILES_FOLDERS_URLS="Status options for joomla modules files folders urls"
|
||||
COM_COMPONENTBUILDER_FILTER_PUBLISHED_JOOMLA_MODULES_UPDATES="Status options for joomla modules updates"
|
||||
COM_COMPONENTBUILDER_FILTER_PUBLISHED_JOOMLA_PLUGINS="Status options for joomla plugins"
|
||||
COM_COMPONENTBUILDER_FILTER_PUBLISHED_JOOMLA_PLUGINS_FILES_FOLDERS_URLS="Status options for joomla plugins files folders urls"
|
||||
COM_COMPONENTBUILDER_FILTER_PUBLISHED_JOOMLA_PLUGINS_UPDATES="Status options for joomla plugins updates"
|
||||
COM_COMPONENTBUILDER_FILTER_PUBLISHED_JOOMLA_PLUGIN_GROUPS="Status options for joomla plugin groups"
|
||||
COM_COMPONENTBUILDER_FILTER_PUBLISHED_LANGUAGES="Status options for languages"
|
||||
COM_COMPONENTBUILDER_FILTER_PUBLISHED_LANGUAGE_TRANSLATIONS="Status options for language translations"
|
||||
COM_COMPONENTBUILDER_FILTER_PUBLISHED_LAYOUTS="Status options for layouts"
|
||||
COM_COMPONENTBUILDER_FILTER_PUBLISHED_LIBRARIES="Status options for libraries"
|
||||
COM_COMPONENTBUILDER_FILTER_PUBLISHED_LIBRARIES_CONFIG="Status options for libraries config"
|
||||
COM_COMPONENTBUILDER_FILTER_PUBLISHED_LIBRARIES_FILES_FOLDERS_URLS="Status options for libraries files folders urls"
|
||||
COM_COMPONENTBUILDER_FILTER_PUBLISHED_PLACEHOLDERS="Status options for placeholders"
|
||||
COM_COMPONENTBUILDER_FILTER_PUBLISHED_SERVERS="Status options for servers"
|
||||
COM_COMPONENTBUILDER_FILTER_PUBLISHED_SITE_VIEWS="Status options for site views"
|
||||
COM_COMPONENTBUILDER_FILTER_PUBLISHED_SNIPPETS="Status options for snippets"
|
||||
COM_COMPONENTBUILDER_FILTER_PUBLISHED_SNIPPET_TYPES="Status options for snippet types"
|
||||
COM_COMPONENTBUILDER_FILTER_PUBLISHED_TEMPLATES="Status options for templates"
|
||||
COM_COMPONENTBUILDER_FILTER_PUBLISHED_VALIDATION_RULES="Status options for validation rules"
|
||||
COM_COMPONENTBUILDER_FILTER_SEARCH="Searchjoomla components"
|
||||
COM_COMPONENTBUILDER_FILTER_SEARCH_ADMINS_CUSTOM_TABS="Search the admin custom tabs items. Prefix with ID: to search for an item by ID."
|
||||
COM_COMPONENTBUILDER_FILTER_SEARCH_ADMINS_FIELDS="Search the admin fields items. Prefix with ID: to search for an item by ID."
|
||||
COM_COMPONENTBUILDER_FILTER_SEARCH_ADMINS_FIELDS_CONDITIONS="Search the admin fields conditions items. Prefix with ID: to search for an item by ID."
|
||||
COM_COMPONENTBUILDER_FILTER_SEARCH_ADMINS_FIELDS_RELATIONS="Search the admin fields relations items. Prefix with ID: to search for an item by ID."
|
||||
COM_COMPONENTBUILDER_FILTER_SEARCH_ADMIN_VIEWS="Search the admin view items. Prefix with ID: to search for an item by ID."
|
||||
COM_COMPONENTBUILDER_FILTER_SEARCH_CLASS_EXTENDINGS="Search the class extends items. Prefix with ID: to search for an item by ID."
|
||||
COM_COMPONENTBUILDER_FILTER_SEARCH_CLASS_METHODS="Search the class method items. Prefix with ID: to search for an item by ID."
|
||||
COM_COMPONENTBUILDER_FILTER_SEARCH_CLASS_PROPERTIES="Search the class property items. Prefix with ID: to search for an item by ID."
|
||||
COM_COMPONENTBUILDER_FILTER_SEARCH_COMPONENTS_ADMIN_VIEWS="Search the component admin views items. Prefix with ID: to search for an item by ID."
|
||||
COM_COMPONENTBUILDER_FILTER_SEARCH_COMPONENTS_CONFIG="Search the component config items. Prefix with ID: to search for an item by ID."
|
||||
COM_COMPONENTBUILDER_FILTER_SEARCH_COMPONENTS_CUSTOM_ADMIN_MENUS="Search the component custom admin menus items. Prefix with ID: to search for an item by ID."
|
||||
COM_COMPONENTBUILDER_FILTER_SEARCH_COMPONENTS_CUSTOM_ADMIN_VIEWS="Search the component custom admin views items. Prefix with ID: to search for an item by ID."
|
||||
COM_COMPONENTBUILDER_FILTER_SEARCH_COMPONENTS_DASHBOARD="Search the component dashboard items. Prefix with ID: to search for an item by ID."
|
||||
COM_COMPONENTBUILDER_FILTER_SEARCH_COMPONENTS_FILES_FOLDERS="Search the component files folders items. Prefix with ID: to search for an item by ID."
|
||||
COM_COMPONENTBUILDER_FILTER_SEARCH_COMPONENTS_MODULES="Search the component modules items. Prefix with ID: to search for an item by ID."
|
||||
COM_COMPONENTBUILDER_FILTER_SEARCH_COMPONENTS_MYSQL_TWEAKS="Search the component mysql tweaks items. Prefix with ID: to search for an item by ID."
|
||||
COM_COMPONENTBUILDER_FILTER_SEARCH_COMPONENTS_PLACEHOLDERS="Search the component placeholders items. Prefix with ID: to search for an item by ID."
|
||||
COM_COMPONENTBUILDER_FILTER_SEARCH_COMPONENTS_PLUGINS="Search the component plugins items. Prefix with ID: to search for an item by ID."
|
||||
COM_COMPONENTBUILDER_FILTER_SEARCH_COMPONENTS_SITE_VIEWS="Search the component site views items. Prefix with ID: to search for an item by ID."
|
||||
COM_COMPONENTBUILDER_FILTER_SEARCH_COMPONENTS_UPDATES="Search the component updates items. Prefix with ID: to search for an item by ID."
|
||||
COM_COMPONENTBUILDER_FILTER_SEARCH_CUSTOM_ADMIN_VIEWS="Search the custom admin view items. Prefix with ID: to search for an item by ID."
|
||||
COM_COMPONENTBUILDER_FILTER_SEARCH_CUSTOM_CODES="Search the custom code items. Prefix with ID: to search for an item by ID."
|
||||
COM_COMPONENTBUILDER_FILTER_SEARCH_DYNAMIC_GETS="Search the dynamic get items. Prefix with ID: to search for an item by ID."
|
||||
COM_COMPONENTBUILDER_FILTER_SEARCH_FIELDS="Search the field items. Prefix with ID: to search for an item by ID."
|
||||
COM_COMPONENTBUILDER_FILTER_SEARCH_FIELDTYPES="Search the fieldtype items. Prefix with ID: to search for an item by ID."
|
||||
COM_COMPONENTBUILDER_FILTER_SEARCH_HELP_DOCUMENTS="Search the help document items. Prefix with ID: to search for an item by ID."
|
||||
COM_COMPONENTBUILDER_FILTER_SEARCH_JOOMLA_COMPONENTS="Search the joomla component items. Prefix with ID: to search for an item by ID."
|
||||
COM_COMPONENTBUILDER_FILTER_SEARCH_JOOMLA_MODULES="Search the joomla module items. Prefix with ID: to search for an item by ID."
|
||||
COM_COMPONENTBUILDER_FILTER_SEARCH_JOOMLA_MODULES_FILES_FOLDERS_URLS="Search the joomla module files folders urls items. Prefix with ID: to search for an item by ID."
|
||||
COM_COMPONENTBUILDER_FILTER_SEARCH_JOOMLA_MODULES_UPDATES="Search the joomla module updates items. Prefix with ID: to search for an item by ID."
|
||||
COM_COMPONENTBUILDER_FILTER_SEARCH_JOOMLA_PLUGINS="Search the joomla plugin items. Prefix with ID: to search for an item by ID."
|
||||
COM_COMPONENTBUILDER_FILTER_SEARCH_JOOMLA_PLUGINS_FILES_FOLDERS_URLS="Search the joomla plugin files folders urls items. Prefix with ID: to search for an item by ID."
|
||||
COM_COMPONENTBUILDER_FILTER_SEARCH_JOOMLA_PLUGINS_UPDATES="Search the joomla plugin updates items. Prefix with ID: to search for an item by ID."
|
||||
COM_COMPONENTBUILDER_FILTER_SEARCH_JOOMLA_PLUGIN_GROUPS="Search the joomla plugin group items. Prefix with ID: to search for an item by ID."
|
||||
COM_COMPONENTBUILDER_FILTER_SEARCH_LANGUAGES="Search the language items. Prefix with ID: to search for an item by ID."
|
||||
COM_COMPONENTBUILDER_FILTER_SEARCH_LANGUAGE_TRANSLATIONS="Search the language translation items. Prefix with ID: to search for an item by ID."
|
||||
COM_COMPONENTBUILDER_FILTER_SEARCH_LAYOUTS="Search the layout items. Prefix with ID: to search for an item by ID."
|
||||
COM_COMPONENTBUILDER_FILTER_SEARCH_LIBRARIES="Search the library items. Prefix with ID: to search for an item by ID."
|
||||
COM_COMPONENTBUILDER_FILTER_SEARCH_LIBRARIES_CONFIG="Search the library config items. Prefix with ID: to search for an item by ID."
|
||||
COM_COMPONENTBUILDER_FILTER_SEARCH_LIBRARIES_FILES_FOLDERS_URLS="Search the library files folders urls items. Prefix with ID: to search for an item by ID."
|
||||
COM_COMPONENTBUILDER_FILTER_SEARCH_PLACEHOLDERS="Search the placeholder items. Prefix with ID: to search for an item by ID."
|
||||
COM_COMPONENTBUILDER_FILTER_SEARCH_SERVERS="Search the server items. Prefix with ID: to search for an item by ID."
|
||||
COM_COMPONENTBUILDER_FILTER_SEARCH_SITE_VIEWS="Search the site view items. Prefix with ID: to search for an item by ID."
|
||||
COM_COMPONENTBUILDER_FILTER_SEARCH_SNIPPETS="Search the snippet items. Prefix with ID: to search for an item by ID."
|
||||
COM_COMPONENTBUILDER_FILTER_SEARCH_SNIPPET_TYPES="Search the snippet type items. Prefix with ID: to search for an item by ID."
|
||||
COM_COMPONENTBUILDER_FILTER_SEARCH_TEMPLATES="Search the template items. Prefix with ID: to search for an item by ID."
|
||||
COM_COMPONENTBUILDER_FILTER_SEARCH_VALIDATION_RULES="Search the validation rule items. Prefix with ID: to search for an item by ID."
|
||||
COM_COMPONENTBUILDER_FILTER_SELECT_ACCESS="Select Access"
|
||||
COM_COMPONENTBUILDER_FILTER_SELECT_ADD_CUSTOM_BUTTON="Select Add Custom Button"
|
||||
COM_COMPONENTBUILDER_FILTER_SELECT_ADD_CUSTOM_IMPORT="Select Add Custom Import"
|
||||
COM_COMPONENTBUILDER_FILTER_SELECT_ADD_FADEIN="Select Add Fadein"
|
||||
COM_COMPONENTBUILDER_FILTER_SELECT_ADD_PHP_AJAX="Select Add Php Ajax"
|
||||
COM_COMPONENTBUILDER_FILTER_SELECT_ADD_PHP_VIEW="Select Add Php View"
|
||||
COM_COMPONENTBUILDER_FILTER_SELECT_ADMIN_VIEW="Select Admin View"
|
||||
COM_COMPONENTBUILDER_FILTER_SELECT_AUTHOR="Select Author"
|
||||
COM_COMPONENTBUILDER_FILTER_SELECT_CLASS_EXTENDS="Select Class Extends"
|
||||
COM_COMPONENTBUILDER_FILTER_SELECT_COMMENT_TYPE="Select Comment Type"
|
||||
COM_COMPONENTBUILDER_FILTER_SELECT_COMPANYNAME="Select Companyname"
|
||||
COM_COMPONENTBUILDER_FILTER_SELECT_COMPONENT="Select Component"
|
||||
COM_COMPONENTBUILDER_FILTER_SELECT_DATATYPE="Select Datatype"
|
||||
COM_COMPONENTBUILDER_FILTER_SELECT_DYNAMIC_GET="Select Dynamic Get"
|
||||
COM_COMPONENTBUILDER_FILTER_SELECT_EXTENSION_TYPE="Select Extension Type"
|
||||
COM_COMPONENTBUILDER_FILTER_SELECT_FIELDS_CATEGORIES="Select Fields Categories"
|
||||
COM_COMPONENTBUILDER_FILTER_SELECT_FIELDTYPE="Select Fieldtype"
|
||||
COM_COMPONENTBUILDER_FILTER_SELECT_FIELDTYPES_CATEGORIES="Select Fieldtypes Categories"
|
||||
COM_COMPONENTBUILDER_FILTER_SELECT_GETTYPE="Select Gettype"
|
||||
COM_COMPONENTBUILDER_FILTER_SELECT_HOW="Select How"
|
||||
COM_COMPONENTBUILDER_FILTER_SELECT_INDEXES="Select Indexes"
|
||||
COM_COMPONENTBUILDER_FILTER_SELECT_JOOMLA_PLUGIN_GROUP="Select Joomla Plugin Group"
|
||||
COM_COMPONENTBUILDER_FILTER_SELECT_LIBRARY="Select Library"
|
||||
COM_COMPONENTBUILDER_FILTER_SELECT_LOCATION="Select Location"
|
||||
COM_COMPONENTBUILDER_FILTER_SELECT_MAIN_GET="Select Main Get"
|
||||
COM_COMPONENTBUILDER_FILTER_SELECT_MAIN_SOURCE="Select Main Source"
|
||||
COM_COMPONENTBUILDER_FILTER_SELECT_NAME="Select Name"
|
||||
COM_COMPONENTBUILDER_FILTER_SELECT_NULL_SWITCH="Select Null Switch"
|
||||
COM_COMPONENTBUILDER_FILTER_SELECT_PROTOCOL="Select Protocol"
|
||||
COM_COMPONENTBUILDER_FILTER_SELECT_SITE_VIEW="Select Site View"
|
||||
COM_COMPONENTBUILDER_FILTER_SELECT_STORE="Select Store"
|
||||
COM_COMPONENTBUILDER_FILTER_SELECT_TARGET="Select Target"
|
||||
COM_COMPONENTBUILDER_FILTER_SELECT_TYPE="Select Type"
|
||||
COM_COMPONENTBUILDER_FILTER_SELECT_VISIBILITY="Select Visibility"
|
||||
COM_COMPONENTBUILDER_FILTER_SHORT_DESCRIPTION_ASCENDING="Short Description ascending"
|
||||
COM_COMPONENTBUILDER_FILTER_SHORT_DESCRIPTION_DESCENDING="Short Description descending"
|
||||
COM_COMPONENTBUILDER_FILTER_SITE_VIEW_ASCENDING="Site View ascending"
|
||||
COM_COMPONENTBUILDER_FILTER_SITE_VIEW_DESCENDING="Site View descending"
|
||||
COM_COMPONENTBUILDER_FILTER_SOURCE_ASCENDING="Source ascending"
|
||||
COM_COMPONENTBUILDER_FILTER_SOURCE_DESCENDING="Source descending"
|
||||
COM_COMPONENTBUILDER_FILTER_STORE_ASCENDING="Store ascending"
|
||||
COM_COMPONENTBUILDER_FILTER_STORE_DESCENDING="Store descending"
|
||||
COM_COMPONENTBUILDER_FILTER_SYSTEM_NAME_ASCENDING="System Name ascending"
|
||||
COM_COMPONENTBUILDER_FILTER_SYSTEM_NAME_DESCENDING="System Name descending"
|
||||
COM_COMPONENTBUILDER_FILTER_TARGET_ASCENDING="Target ascending"
|
||||
COM_COMPONENTBUILDER_FILTER_TARGET_DESCENDING="Target descending"
|
||||
COM_COMPONENTBUILDER_FILTER_TITLE_ASCENDING="Title ascending"
|
||||
COM_COMPONENTBUILDER_FILTER_TITLE_DESCENDING="Title descending"
|
||||
COM_COMPONENTBUILDER_FILTER_TYPE_ASCENDING="Type ascending"
|
||||
COM_COMPONENTBUILDER_FILTER_TYPE_DESCENDING="Type descending"
|
||||
COM_COMPONENTBUILDER_FILTER_URL_ASCENDING="Url ascending"
|
||||
COM_COMPONENTBUILDER_FILTER_URL_DESCENDING="Url descending"
|
||||
COM_COMPONENTBUILDER_FILTER_VALUE_ASCENDING="Value ascending"
|
||||
COM_COMPONENTBUILDER_FILTER_VALUE_DESCENDING="Value descending"
|
||||
COM_COMPONENTBUILDER_FILTER_VISIBILITY_ASCENDING="Visibility ascending"
|
||||
COM_COMPONENTBUILDER_FILTER_VISIBILITY_DESCENDING="Visibility descending"
|
||||
COM_COMPONENTBUILDER_FOLDER="Folder"
|
||||
COM_COMPONENTBUILDER_FOLDER_BSB_WAS_MOVED_TO_BSB="Folder <b>%s</b> was moved to <b>%s</b>"
|
||||
COM_COMPONENTBUILDER_FOLDER_BSB_WAS_NOT_MOVED_TO_BSB="Folder <b>%s</b> was not moved to <b>%s</b>"
|
||||
@ -5684,6 +5907,11 @@ COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADD_UIKIT_VTWO="Add Uikit v2"
|
||||
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADD_UPDATE_SERVER="Add Update Server"
|
||||
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADD_UPDATE_SERVER_LABEL="Add Update Server"
|
||||
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADMIN_VIEWS="Admin Views"
|
||||
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ASSETS_TABLE_FIX="Assets Table Fix"
|
||||
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ASSETS_TABLE_FIX_DESCRIPTION="How to apply the assets table fix in JCB.<br />
|
||||
SQL (add&remove) this is the <b>default</b> which adds the SQL fix and removes it once the component is uninstalled.<br />
|
||||
Intelligent (add&remove+if) same as default, but on uninstall will only remove this fix if no other component needs it. Note that this option will only work with other components that also use the <b>intelligent path</b>."
|
||||
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ASSETS_TABLE_FIX_LABEL="Assets Table Fix"
|
||||
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_AUTHOR="Author"
|
||||
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_AUTHOR_DESCRIPTION="The Author's Name & Surname."
|
||||
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_AUTHOR_HINT="Author Name & Surname Here"
|
||||
@ -5769,6 +5997,7 @@ COM_COMPONENTBUILDER_JOOMLA_COMPONENT_DESCRIPTION_DESCRIPTION="Add Description H
|
||||
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_DESCRIPTION_HINT="Add Description Here"
|
||||
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_DESCRIPTION_LABEL="Description"
|
||||
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_DETAILS="Details"
|
||||
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_DO_NOT_ADD_FIX_EVER="Do not add fix ever"
|
||||
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_DYNAMIC="Dynamic"
|
||||
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_DYNAMIC_BUILD_BETA="Dynamic Build (beta)"
|
||||
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_DYNAMIC_INTEGRATION="Dynamic Integration"
|
||||
@ -5805,6 +6034,7 @@ COM_COMPONENTBUILDER_JOOMLA_COMPONENT_IMAGE_DESCRIPTION="The component image (pr
|
||||
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_IMAGE_LABEL="Component Image"
|
||||
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_IMPORT_JCB_PACKAGES_BUTTON_ACCESS="Joomla Component Import JCB Packages Button Access"
|
||||
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_IMPORT_JCB_PACKAGES_BUTTON_ACCESS_DESC="Allows the users in this group to access the import jcb packages button."
|
||||
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_INTELLIGENT_ADDREMOVEIF="Intelligent (add&remove+if)"
|
||||
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_JAVASCRIPT="Javascript"
|
||||
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_JAVASCRIPT_DESCRIPTION="Add JavaScript for the entire back-end. Do not add the script tags."
|
||||
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_JAVASCRIPT_LABEL="Javascript"
|
||||
@ -6021,6 +6251,7 @@ COM_COMPONENTBUILDER_JOOMLA_COMPONENT_SHOW_DESCRIPTION="Select where you want th
|
||||
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_SHOW_LABEL="Show"
|
||||
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_SITE_VIEWS="Site Views"
|
||||
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_SQL="Sql"
|
||||
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_SQL_ADDREMOVE="SQL (add&remove)"
|
||||
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_SQL_DESCRIPTION="Add your MySQL here!"
|
||||
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_SQL_HINT="// Add MySQL Table Dump Here"
|
||||
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_SQL_LABEL="MySQL - (Install)"
|
||||
@ -9057,6 +9288,7 @@ COM_COMPONENTBUILDER_THE_ADMIN_FIELDS="The admin fields"
|
||||
COM_COMPONENTBUILDER_THE_ADMIN_FIELDS_CONDITIONS="The admin fields conditions"
|
||||
COM_COMPONENTBUILDER_THE_ADMIN_FIELDS_RELATIONS="The admin fields relations"
|
||||
COM_COMPONENTBUILDER_THE_AVAILABLE_VALIDATION_RULES_FOR_THE_VALIDATE_ATTRIBUTE_ARE="The available validation rules for the validate attribute are:"
|
||||
COM_COMPONENTBUILDER_THE_BMULTI_FILTERB_SELECTION_OPTION_ALLOWS_THE_USER_TO_SELECT_MORE_THEN_ONE_VALUE_IN_THIS_FILTERFIELD_PLEASE_NOTE_THAT_THIS_OPTION_BONLY_WORKSB_WITH_THE_BNEWB_FILTERS_THAT_LOAD_ABOVE_THE_ADMIN_LIST_VIEW_YOU_CAN_SELECT_THE_NEW_FILTER_OPTION_WHENWHERE_YOU_ADD_THE_VIEW_TO_THE_COMPONENT="The <b>multi filter</b> selection option allows the user to select more then one value in this filter/field. Please note that this option <b>only works</b> with the <b>new</b> filters that load above the admin list view. You can select the new filter option when/where you add the view to the component."
|
||||
COM_COMPONENTBUILDER_THE_BNONE_DBB_OPTION_WILL_REMOVE_THIS_FIELD_FROM_BEING_SAVED_IN_THE_DATABASE="The <b>None DB</b> option will remove this field from being saved in the database."
|
||||
COM_COMPONENTBUILDER_THE_BONLY_IN_ADMIN_LIST_VIEWB_OPTION_WILL_ONLY_ADD_THIS_FIELD_TO_THE_ADMIN_LIST_VIEW_NOT_TO_ANY_LINKED_VIEWS="The <b>Only in Admin List View</b> option will only Add this field to the admin list view, not to any linked views."
|
||||
COM_COMPONENTBUILDER_THE_BONLY_IN_LINKED_LIST_VIEWSB_OPTION_WILL_ONLY_ADD_THIS_FIELD_TO_THE_LINKED_LIST_VIEW_IF_THIS_VIEW_GETS_LINKED_TO_OTHER_VIEW_NOT_TO_THIS_ADMIN_LIST_VIEW="The <b>Only in Linked List Views</b> option will only Add this field to the linked list view, if this view gets linked to other view, not to this admin list view."
|
||||
@ -9066,6 +9298,7 @@ COM_COMPONENTBUILDER_THE_BSB_FILE_COULD_NOT_BE_MOVED_TO_BSB_SERVER="The <b>%s</b
|
||||
COM_COMPONENTBUILDER_THE_BSB_LIBRARYCLASS_IS_NOT_AVAILABLE_THIS_LIBRARYCLASS_SHOULD_HAVE_BEEN_ADDED_TO_YOUR_BLIBRARIESPHPSECLIBVENDORB_FOLDER_PLEASE_CONTACT_YOUR_SYSTEM_ADMINISTRATOR_FOR_MORE_INFO="The <b>%s</b> library\class is not available! This library\class should have been added to your <b>libraries/phpseclib/vendor</b> folder. Please contact your system administrator for more info!"
|
||||
COM_COMPONENTBUILDER_THE_BSB_LIBRARY_CAN_NOT_BE_DELETED_OR_THINGS_WILL_BREAK="The <b>%s</b> library can not be deleted, or things will break."
|
||||
COM_COMPONENTBUILDER_THE_BSHOW_IN_ALL_LIST_VIEWSB_OPTION_WILL_ADD_THIS_FIELD_TO_ALL_LIST_VIEWS_ADMIN_AMP_LINKED="The <b>Show in All List Views</b> option will Add this field to all list views, admin & linked."
|
||||
COM_COMPONENTBUILDER_THE_BSINGLE_FILTERB_SELECTION_OPTION_ALLOWS_THE_USER_TO_SELECT_JUST_ONE_VALUE_IN_THIS_FILTERFIELD="The <b>single filter</b> selection option allows the user to select just one value in this filter/field."
|
||||
COM_COMPONENTBUILDER_THE_COMPONENT_ADMIN_VIEWS="The component admin views"
|
||||
COM_COMPONENTBUILDER_THE_COMPONENT_CONFIG="The component config"
|
||||
COM_COMPONENTBUILDER_THE_COMPONENT_CUSTOM_ADMIN_MENUS="The component custom admin menus"
|
||||
|
@ -29,7 +29,8 @@ $fields = $displayData->get($fields_tab_layout) ?: array(
|
||||
'add_sql',
|
||||
'sql',
|
||||
'add_sql_uninstall',
|
||||
'sql_uninstall'
|
||||
'sql_uninstall',
|
||||
'assets_table_fix'
|
||||
);
|
||||
|
||||
$hiddenFields = $displayData->get('hidden_fields') ?: array();
|
||||
|
@ -26,27 +26,34 @@ class ComponentbuilderModelAdmin_views extends JModelList
|
||||
$config['filter_fields'] = array(
|
||||
'a.id','id',
|
||||
'a.published','published',
|
||||
'a.access','access',
|
||||
'a.ordering','ordering',
|
||||
'a.created_by','created_by',
|
||||
'a.modified_by','modified_by',
|
||||
'a.system_name','system_name',
|
||||
'a.name_single','name_single',
|
||||
'a.short_description','short_description',
|
||||
'a.add_fadein','add_fadein',
|
||||
'a.type','type',
|
||||
'a.add_custom_button','add_custom_button',
|
||||
'a.add_php_ajax','add_php_ajax',
|
||||
'a.add_custom_import','add_custom_import'
|
||||
'a.add_custom_import','add_custom_import',
|
||||
'a.system_name','system_name',
|
||||
'a.name_single','name_single',
|
||||
'a.short_description','short_description'
|
||||
);
|
||||
}
|
||||
|
||||
parent::__construct($config);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Method to auto-populate the model state.
|
||||
*
|
||||
* Note. Calling getState in this method will result in recursion.
|
||||
*
|
||||
* @param string $ordering An optional ordering field.
|
||||
* @param string $direction An optional direction (asc|desc).
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
*/
|
||||
protected function populateState($ordering = null, $direction = null)
|
||||
{
|
||||
@ -56,48 +63,88 @@ class ComponentbuilderModelAdmin_views extends JModelList
|
||||
if ($layout = $app->input->get('layout'))
|
||||
{
|
||||
$this->context .= '.' . $layout;
|
||||
}
|
||||
$system_name = $this->getUserStateFromRequest($this->context . '.filter.system_name', 'filter_system_name');
|
||||
$this->setState('filter.system_name', $system_name);
|
||||
}
|
||||
|
||||
$name_single = $this->getUserStateFromRequest($this->context . '.filter.name_single', 'filter_name_single');
|
||||
$this->setState('filter.name_single', $name_single);
|
||||
// Check if the form was submitted
|
||||
$formSubmited = $app->input->post->get('form_submited');
|
||||
|
||||
$short_description = $this->getUserStateFromRequest($this->context . '.filter.short_description', 'filter_short_description');
|
||||
$this->setState('filter.short_description', $short_description);
|
||||
$access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int');
|
||||
if ($formSubmited)
|
||||
{
|
||||
$access = $app->input->post->get('access');
|
||||
$this->setState('filter.access', $access);
|
||||
}
|
||||
|
||||
$published = $this->getUserStateFromRequest($this->context . '.filter.published', 'filter_published', '');
|
||||
$this->setState('filter.published', $published);
|
||||
|
||||
$created_by = $this->getUserStateFromRequest($this->context . '.filter.created_by', 'filter_created_by', '');
|
||||
$this->setState('filter.created_by', $created_by);
|
||||
|
||||
$created = $this->getUserStateFromRequest($this->context . '.filter.created', 'filter_created');
|
||||
$this->setState('filter.created', $created);
|
||||
|
||||
$sorting = $this->getUserStateFromRequest($this->context . '.filter.sorting', 'filter_sorting', 0, 'int');
|
||||
$this->setState('filter.sorting', $sorting);
|
||||
|
||||
$search = $this->getUserStateFromRequest($this->context . '.filter.search', 'filter_search');
|
||||
$this->setState('filter.search', $search);
|
||||
|
||||
$add_fadein = $this->getUserStateFromRequest($this->context . '.filter.add_fadein', 'filter_add_fadein');
|
||||
$this->setState('filter.add_fadein', $add_fadein);
|
||||
if ($formSubmited)
|
||||
{
|
||||
$add_fadein = $app->input->post->get('add_fadein');
|
||||
$this->setState('filter.add_fadein', $add_fadein);
|
||||
}
|
||||
|
||||
$type = $this->getUserStateFromRequest($this->context . '.filter.type', 'filter_type');
|
||||
$this->setState('filter.type', $type);
|
||||
if ($formSubmited)
|
||||
{
|
||||
$type = $app->input->post->get('type');
|
||||
$this->setState('filter.type', $type);
|
||||
}
|
||||
|
||||
$add_custom_button = $this->getUserStateFromRequest($this->context . '.filter.add_custom_button', 'filter_add_custom_button');
|
||||
$this->setState('filter.add_custom_button', $add_custom_button);
|
||||
if ($formSubmited)
|
||||
{
|
||||
$add_custom_button = $app->input->post->get('add_custom_button');
|
||||
$this->setState('filter.add_custom_button', $add_custom_button);
|
||||
}
|
||||
|
||||
$add_php_ajax = $this->getUserStateFromRequest($this->context . '.filter.add_php_ajax', 'filter_add_php_ajax');
|
||||
$this->setState('filter.add_php_ajax', $add_php_ajax);
|
||||
if ($formSubmited)
|
||||
{
|
||||
$add_php_ajax = $app->input->post->get('add_php_ajax');
|
||||
$this->setState('filter.add_php_ajax', $add_php_ajax);
|
||||
}
|
||||
|
||||
$add_custom_import = $this->getUserStateFromRequest($this->context . '.filter.add_custom_import', 'filter_add_custom_import');
|
||||
$this->setState('filter.add_custom_import', $add_custom_import);
|
||||
|
||||
$sorting = $this->getUserStateFromRequest($this->context . '.filter.sorting', 'filter_sorting', 0, 'int');
|
||||
$this->setState('filter.sorting', $sorting);
|
||||
|
||||
$access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int');
|
||||
$this->setState('filter.access', $access);
|
||||
|
||||
$search = $this->getUserStateFromRequest($this->context . '.filter.search', 'filter_search');
|
||||
$this->setState('filter.search', $search);
|
||||
|
||||
$published = $this->getUserStateFromRequest($this->context . '.filter.published', 'filter_published', '');
|
||||
$this->setState('filter.published', $published);
|
||||
|
||||
$created_by = $this->getUserStateFromRequest($this->context . '.filter.created_by', 'filter_created_by', '');
|
||||
$this->setState('filter.created_by', $created_by);
|
||||
|
||||
$created = $this->getUserStateFromRequest($this->context . '.filter.created', 'filter_created');
|
||||
$this->setState('filter.created', $created);
|
||||
if ($formSubmited)
|
||||
{
|
||||
$add_custom_import = $app->input->post->get('add_custom_import');
|
||||
$this->setState('filter.add_custom_import', $add_custom_import);
|
||||
}
|
||||
|
||||
$system_name = $this->getUserStateFromRequest($this->context . '.filter.system_name', 'filter_system_name');
|
||||
if ($formSubmited)
|
||||
{
|
||||
$system_name = $app->input->post->get('system_name');
|
||||
$this->setState('filter.system_name', $system_name);
|
||||
}
|
||||
|
||||
$name_single = $this->getUserStateFromRequest($this->context . '.filter.name_single', 'filter_name_single');
|
||||
if ($formSubmited)
|
||||
{
|
||||
$name_single = $app->input->post->get('name_single');
|
||||
$this->setState('filter.name_single', $name_single);
|
||||
}
|
||||
|
||||
$short_description = $this->getUserStateFromRequest($this->context . '.filter.short_description', 'filter_short_description');
|
||||
if ($formSubmited)
|
||||
{
|
||||
$short_description = $app->input->post->get('short_description');
|
||||
$this->setState('filter.short_description', $short_description);
|
||||
}
|
||||
|
||||
// List state information.
|
||||
parent::populateState($ordering, $direction);
|
||||
@ -269,9 +316,17 @@ class ComponentbuilderModelAdmin_views extends JModelList
|
||||
$query->select('ag.title AS access_level');
|
||||
$query->join('LEFT', '#__viewlevels AS ag ON ag.id = a.access');
|
||||
// Filter by access level.
|
||||
if ($access = $this->getState('filter.access'))
|
||||
$_access = $this->getState('filter.access');
|
||||
if ($_access && is_numeric($_access))
|
||||
{
|
||||
$query->where('a.access = ' . (int) $access);
|
||||
$query->where('a.access = ' . (int) $_access);
|
||||
}
|
||||
elseif (ComponentbuilderHelper::checkArray($_access))
|
||||
{
|
||||
// Secure the array for the query
|
||||
$_access = ArrayHelper::toInteger($_access);
|
||||
// Filter by the Access Array.
|
||||
$query->where('a.access IN (' . implode(',', $_access) . ')');
|
||||
}
|
||||
// Implement View Level Access
|
||||
if (!$user->authorise('core.options', 'com_componentbuilder'))
|
||||
@ -295,29 +350,112 @@ class ComponentbuilderModelAdmin_views extends JModelList
|
||||
}
|
||||
|
||||
// Filter by Add_fadein.
|
||||
if ($add_fadein = $this->getState('filter.add_fadein'))
|
||||
$_add_fadein = $this->getState('filter.add_fadein');
|
||||
if (is_numeric($_add_fadein))
|
||||
{
|
||||
$query->where('a.add_fadein = ' . $db->quote($db->escape($add_fadein)));
|
||||
if (is_float($_add_fadein))
|
||||
{
|
||||
$query->where('a.add_fadein = ' . (float) $_add_fadein);
|
||||
}
|
||||
else
|
||||
{
|
||||
$query->where('a.add_fadein = ' . (int) $_add_fadein);
|
||||
}
|
||||
}
|
||||
elseif (ComponentbuilderHelper::checkString($_add_fadein))
|
||||
{
|
||||
$query->where('a.add_fadein = ' . $db->quote($db->escape($_add_fadein)));
|
||||
}
|
||||
// Filter by Type.
|
||||
if ($type = $this->getState('filter.type'))
|
||||
$_type = $this->getState('filter.type');
|
||||
if (is_numeric($_type))
|
||||
{
|
||||
$query->where('a.type = ' . $db->quote($db->escape($type)));
|
||||
if (is_float($_type))
|
||||
{
|
||||
$query->where('a.type = ' . (float) $_type);
|
||||
}
|
||||
else
|
||||
{
|
||||
$query->where('a.type = ' . (int) $_type);
|
||||
}
|
||||
}
|
||||
elseif (ComponentbuilderHelper::checkString($_type))
|
||||
{
|
||||
$query->where('a.type = ' . $db->quote($db->escape($_type)));
|
||||
}
|
||||
elseif (ComponentbuilderHelper::checkArray($_type))
|
||||
{
|
||||
// Secure the array for the query
|
||||
$_type = array_map( function ($val) use(&$db) {
|
||||
if (is_numeric($val))
|
||||
{
|
||||
if (is_float($val))
|
||||
{
|
||||
return (float) $val;
|
||||
}
|
||||
else
|
||||
{
|
||||
return (int) $val;
|
||||
}
|
||||
}
|
||||
elseif (ComponentbuilderHelper::checkString($val))
|
||||
{
|
||||
return $db->quote($db->escape($val));
|
||||
}
|
||||
}, $_type);
|
||||
// Filter by the Type Array.
|
||||
$query->where('a.type IN (' . implode(',', $_type) . ')');
|
||||
}
|
||||
// Filter by Add_custom_button.
|
||||
if ($add_custom_button = $this->getState('filter.add_custom_button'))
|
||||
$_add_custom_button = $this->getState('filter.add_custom_button');
|
||||
if (is_numeric($_add_custom_button))
|
||||
{
|
||||
$query->where('a.add_custom_button = ' . $db->quote($db->escape($add_custom_button)));
|
||||
if (is_float($_add_custom_button))
|
||||
{
|
||||
$query->where('a.add_custom_button = ' . (float) $_add_custom_button);
|
||||
}
|
||||
else
|
||||
{
|
||||
$query->where('a.add_custom_button = ' . (int) $_add_custom_button);
|
||||
}
|
||||
}
|
||||
elseif (ComponentbuilderHelper::checkString($_add_custom_button))
|
||||
{
|
||||
$query->where('a.add_custom_button = ' . $db->quote($db->escape($_add_custom_button)));
|
||||
}
|
||||
// Filter by Add_php_ajax.
|
||||
if ($add_php_ajax = $this->getState('filter.add_php_ajax'))
|
||||
$_add_php_ajax = $this->getState('filter.add_php_ajax');
|
||||
if (is_numeric($_add_php_ajax))
|
||||
{
|
||||
$query->where('a.add_php_ajax = ' . $db->quote($db->escape($add_php_ajax)));
|
||||
if (is_float($_add_php_ajax))
|
||||
{
|
||||
$query->where('a.add_php_ajax = ' . (float) $_add_php_ajax);
|
||||
}
|
||||
else
|
||||
{
|
||||
$query->where('a.add_php_ajax = ' . (int) $_add_php_ajax);
|
||||
}
|
||||
}
|
||||
elseif (ComponentbuilderHelper::checkString($_add_php_ajax))
|
||||
{
|
||||
$query->where('a.add_php_ajax = ' . $db->quote($db->escape($_add_php_ajax)));
|
||||
}
|
||||
// Filter by Add_custom_import.
|
||||
if ($add_custom_import = $this->getState('filter.add_custom_import'))
|
||||
$_add_custom_import = $this->getState('filter.add_custom_import');
|
||||
if (is_numeric($_add_custom_import))
|
||||
{
|
||||
$query->where('a.add_custom_import = ' . $db->quote($db->escape($add_custom_import)));
|
||||
if (is_float($_add_custom_import))
|
||||
{
|
||||
$query->where('a.add_custom_import = ' . (float) $_add_custom_import);
|
||||
}
|
||||
else
|
||||
{
|
||||
$query->where('a.add_custom_import = ' . (int) $_add_custom_import);
|
||||
}
|
||||
}
|
||||
elseif (ComponentbuilderHelper::checkString($_add_custom_import))
|
||||
{
|
||||
$query->where('a.add_custom_import = ' . $db->quote($db->escape($_add_custom_import)));
|
||||
}
|
||||
|
||||
// Add the list ordering clause.
|
||||
@ -541,17 +679,40 @@ class ComponentbuilderModelAdmin_views extends JModelList
|
||||
$id .= ':' . $this->getState('filter.id');
|
||||
$id .= ':' . $this->getState('filter.search');
|
||||
$id .= ':' . $this->getState('filter.published');
|
||||
// Check if the value is an array
|
||||
$_access = $this->getState('filter.access');
|
||||
if (ComponentbuilderHelper::checkArray($_access))
|
||||
{
|
||||
$id .= ':' . implode(':', $_access);
|
||||
}
|
||||
// Check if this is only an number or string
|
||||
elseif (is_numeric($_access)
|
||||
|| ComponentbuilderHelper::checkString($_access))
|
||||
{
|
||||
$id .= ':' . $_access;
|
||||
}
|
||||
$id .= ':' . $this->getState('filter.ordering');
|
||||
$id .= ':' . $this->getState('filter.created_by');
|
||||
$id .= ':' . $this->getState('filter.modified_by');
|
||||
$id .= ':' . $this->getState('filter.system_name');
|
||||
$id .= ':' . $this->getState('filter.name_single');
|
||||
$id .= ':' . $this->getState('filter.short_description');
|
||||
$id .= ':' . $this->getState('filter.add_fadein');
|
||||
$id .= ':' . $this->getState('filter.type');
|
||||
// Check if the value is an array
|
||||
$_type = $this->getState('filter.type');
|
||||
if (ComponentbuilderHelper::checkArray($_type))
|
||||
{
|
||||
$id .= ':' . implode(':', $_type);
|
||||
}
|
||||
// Check if this is only an number or string
|
||||
elseif (is_numeric($_type)
|
||||
|| ComponentbuilderHelper::checkString($_type))
|
||||
{
|
||||
$id .= ':' . $_type;
|
||||
}
|
||||
$id .= ':' . $this->getState('filter.add_custom_button');
|
||||
$id .= ':' . $this->getState('filter.add_php_ajax');
|
||||
$id .= ':' . $this->getState('filter.add_custom_import');
|
||||
$id .= ':' . $this->getState('filter.add_custom_import');
|
||||
$id .= ':' . $this->getState('filter.system_name');
|
||||
$id .= ':' . $this->getState('filter.name_single');
|
||||
$id .= ':' . $this->getState('filter.short_description');
|
||||
|
||||
return parent::getStoreId($id);
|
||||
}
|
||||
|
@ -26,6 +26,7 @@ class ComponentbuilderModelAdmins_custom_tabs extends JModelList
|
||||
$config['filter_fields'] = array(
|
||||
'a.id','id',
|
||||
'a.published','published',
|
||||
'a.access','access',
|
||||
'a.ordering','ordering',
|
||||
'a.created_by','created_by',
|
||||
'a.modified_by','modified_by'
|
||||
@ -34,11 +35,17 @@ class ComponentbuilderModelAdmins_custom_tabs extends JModelList
|
||||
|
||||
parent::__construct($config);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Method to auto-populate the model state.
|
||||
*
|
||||
* Note. Calling getState in this method will result in recursion.
|
||||
*
|
||||
* @param string $ordering An optional ordering field.
|
||||
* @param string $direction An optional direction (asc|desc).
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
*/
|
||||
protected function populateState($ordering = null, $direction = null)
|
||||
{
|
||||
@ -48,27 +55,33 @@ class ComponentbuilderModelAdmins_custom_tabs extends JModelList
|
||||
if ($layout = $app->input->get('layout'))
|
||||
{
|
||||
$this->context .= '.' . $layout;
|
||||
}
|
||||
|
||||
|
||||
$sorting = $this->getUserStateFromRequest($this->context . '.filter.sorting', 'filter_sorting', 0, 'int');
|
||||
$this->setState('filter.sorting', $sorting);
|
||||
|
||||
$access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int');
|
||||
$this->setState('filter.access', $access);
|
||||
|
||||
$search = $this->getUserStateFromRequest($this->context . '.filter.search', 'filter_search');
|
||||
}
|
||||
|
||||
// Check if the form was submitted
|
||||
$formSubmited = $app->input->post->get('form_submited');
|
||||
|
||||
$access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int');
|
||||
if ($formSubmited)
|
||||
{
|
||||
$access = $app->input->post->get('access');
|
||||
$this->setState('filter.access', $access);
|
||||
}
|
||||
|
||||
$published = $this->getUserStateFromRequest($this->context . '.filter.published', 'filter_published', '');
|
||||
$this->setState('filter.published', $published);
|
||||
|
||||
$created_by = $this->getUserStateFromRequest($this->context . '.filter.created_by', 'filter_created_by', '');
|
||||
$this->setState('filter.created_by', $created_by);
|
||||
|
||||
$created = $this->getUserStateFromRequest($this->context . '.filter.created', 'filter_created');
|
||||
$this->setState('filter.created', $created);
|
||||
|
||||
$sorting = $this->getUserStateFromRequest($this->context . '.filter.sorting', 'filter_sorting', 0, 'int');
|
||||
$this->setState('filter.sorting', $sorting);
|
||||
|
||||
$search = $this->getUserStateFromRequest($this->context . '.filter.search', 'filter_search');
|
||||
$this->setState('filter.search', $search);
|
||||
|
||||
$published = $this->getUserStateFromRequest($this->context . '.filter.published', 'filter_published', '');
|
||||
$this->setState('filter.published', $published);
|
||||
|
||||
$created_by = $this->getUserStateFromRequest($this->context . '.filter.created_by', 'filter_created_by', '');
|
||||
$this->setState('filter.created_by', $created_by);
|
||||
|
||||
$created = $this->getUserStateFromRequest($this->context . '.filter.created', 'filter_created');
|
||||
$this->setState('filter.created', $created);
|
||||
|
||||
// List state information.
|
||||
parent::populateState($ordering, $direction);
|
||||
}
|
||||
@ -149,9 +162,17 @@ class ComponentbuilderModelAdmins_custom_tabs extends JModelList
|
||||
$query->select('ag.title AS access_level');
|
||||
$query->join('LEFT', '#__viewlevels AS ag ON ag.id = a.access');
|
||||
// Filter by access level.
|
||||
if ($access = $this->getState('filter.access'))
|
||||
$_access = $this->getState('filter.access');
|
||||
if ($_access && is_numeric($_access))
|
||||
{
|
||||
$query->where('a.access = ' . (int) $access);
|
||||
$query->where('a.access = ' . (int) $_access);
|
||||
}
|
||||
elseif (ComponentbuilderHelper::checkArray($_access))
|
||||
{
|
||||
// Secure the array for the query
|
||||
$_access = ArrayHelper::toInteger($_access);
|
||||
// Filter by the Access Array.
|
||||
$query->where('a.access IN (' . implode(',', $_access) . ')');
|
||||
}
|
||||
// Implement View Level Access
|
||||
if (!$user->authorise('core.options', 'com_componentbuilder'))
|
||||
@ -162,7 +183,7 @@ class ComponentbuilderModelAdmins_custom_tabs extends JModelList
|
||||
|
||||
// Add the list ordering clause.
|
||||
$orderCol = $this->state->get('list.ordering', 'a.id');
|
||||
$orderDirn = $this->state->get('list.direction', 'asc');
|
||||
$orderDirn = $this->state->get('list.direction', 'desc');
|
||||
if ($orderCol != '')
|
||||
{
|
||||
$query->order($db->escape($orderCol . ' ' . $orderDirn));
|
||||
@ -183,6 +204,18 @@ class ComponentbuilderModelAdmins_custom_tabs extends JModelList
|
||||
$id .= ':' . $this->getState('filter.id');
|
||||
$id .= ':' . $this->getState('filter.search');
|
||||
$id .= ':' . $this->getState('filter.published');
|
||||
// Check if the value is an array
|
||||
$_access = $this->getState('filter.access');
|
||||
if (ComponentbuilderHelper::checkArray($_access))
|
||||
{
|
||||
$id .= ':' . implode(':', $_access);
|
||||
}
|
||||
// Check if this is only an number or string
|
||||
elseif (is_numeric($_access)
|
||||
|| ComponentbuilderHelper::checkString($_access))
|
||||
{
|
||||
$id .= ':' . $_access;
|
||||
}
|
||||
$id .= ':' . $this->getState('filter.ordering');
|
||||
$id .= ':' . $this->getState('filter.created_by');
|
||||
$id .= ':' . $this->getState('filter.modified_by');
|
||||
|
@ -26,6 +26,7 @@ class ComponentbuilderModelAdmins_fields extends JModelList
|
||||
$config['filter_fields'] = array(
|
||||
'a.id','id',
|
||||
'a.published','published',
|
||||
'a.access','access',
|
||||
'a.ordering','ordering',
|
||||
'a.created_by','created_by',
|
||||
'a.modified_by','modified_by'
|
||||
@ -34,11 +35,17 @@ class ComponentbuilderModelAdmins_fields extends JModelList
|
||||
|
||||
parent::__construct($config);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Method to auto-populate the model state.
|
||||
*
|
||||
* Note. Calling getState in this method will result in recursion.
|
||||
*
|
||||
* @param string $ordering An optional ordering field.
|
||||
* @param string $direction An optional direction (asc|desc).
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
*/
|
||||
protected function populateState($ordering = null, $direction = null)
|
||||
{
|
||||
@ -48,27 +55,33 @@ class ComponentbuilderModelAdmins_fields extends JModelList
|
||||
if ($layout = $app->input->get('layout'))
|
||||
{
|
||||
$this->context .= '.' . $layout;
|
||||
}
|
||||
|
||||
|
||||
$sorting = $this->getUserStateFromRequest($this->context . '.filter.sorting', 'filter_sorting', 0, 'int');
|
||||
$this->setState('filter.sorting', $sorting);
|
||||
|
||||
$access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int');
|
||||
$this->setState('filter.access', $access);
|
||||
|
||||
$search = $this->getUserStateFromRequest($this->context . '.filter.search', 'filter_search');
|
||||
}
|
||||
|
||||
// Check if the form was submitted
|
||||
$formSubmited = $app->input->post->get('form_submited');
|
||||
|
||||
$access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int');
|
||||
if ($formSubmited)
|
||||
{
|
||||
$access = $app->input->post->get('access');
|
||||
$this->setState('filter.access', $access);
|
||||
}
|
||||
|
||||
$published = $this->getUserStateFromRequest($this->context . '.filter.published', 'filter_published', '');
|
||||
$this->setState('filter.published', $published);
|
||||
|
||||
$created_by = $this->getUserStateFromRequest($this->context . '.filter.created_by', 'filter_created_by', '');
|
||||
$this->setState('filter.created_by', $created_by);
|
||||
|
||||
$created = $this->getUserStateFromRequest($this->context . '.filter.created', 'filter_created');
|
||||
$this->setState('filter.created', $created);
|
||||
|
||||
$sorting = $this->getUserStateFromRequest($this->context . '.filter.sorting', 'filter_sorting', 0, 'int');
|
||||
$this->setState('filter.sorting', $sorting);
|
||||
|
||||
$search = $this->getUserStateFromRequest($this->context . '.filter.search', 'filter_search');
|
||||
$this->setState('filter.search', $search);
|
||||
|
||||
$published = $this->getUserStateFromRequest($this->context . '.filter.published', 'filter_published', '');
|
||||
$this->setState('filter.published', $published);
|
||||
|
||||
$created_by = $this->getUserStateFromRequest($this->context . '.filter.created_by', 'filter_created_by', '');
|
||||
$this->setState('filter.created_by', $created_by);
|
||||
|
||||
$created = $this->getUserStateFromRequest($this->context . '.filter.created', 'filter_created');
|
||||
$this->setState('filter.created', $created);
|
||||
|
||||
// List state information.
|
||||
parent::populateState($ordering, $direction);
|
||||
}
|
||||
@ -149,9 +162,17 @@ class ComponentbuilderModelAdmins_fields extends JModelList
|
||||
$query->select('ag.title AS access_level');
|
||||
$query->join('LEFT', '#__viewlevels AS ag ON ag.id = a.access');
|
||||
// Filter by access level.
|
||||
if ($access = $this->getState('filter.access'))
|
||||
$_access = $this->getState('filter.access');
|
||||
if ($_access && is_numeric($_access))
|
||||
{
|
||||
$query->where('a.access = ' . (int) $access);
|
||||
$query->where('a.access = ' . (int) $_access);
|
||||
}
|
||||
elseif (ComponentbuilderHelper::checkArray($_access))
|
||||
{
|
||||
// Secure the array for the query
|
||||
$_access = ArrayHelper::toInteger($_access);
|
||||
// Filter by the Access Array.
|
||||
$query->where('a.access IN (' . implode(',', $_access) . ')');
|
||||
}
|
||||
// Implement View Level Access
|
||||
if (!$user->authorise('core.options', 'com_componentbuilder'))
|
||||
@ -162,7 +183,7 @@ class ComponentbuilderModelAdmins_fields extends JModelList
|
||||
|
||||
// Add the list ordering clause.
|
||||
$orderCol = $this->state->get('list.ordering', 'a.id');
|
||||
$orderDirn = $this->state->get('list.direction', 'asc');
|
||||
$orderDirn = $this->state->get('list.direction', 'desc');
|
||||
if ($orderCol != '')
|
||||
{
|
||||
$query->order($db->escape($orderCol . ' ' . $orderDirn));
|
||||
@ -183,6 +204,18 @@ class ComponentbuilderModelAdmins_fields extends JModelList
|
||||
$id .= ':' . $this->getState('filter.id');
|
||||
$id .= ':' . $this->getState('filter.search');
|
||||
$id .= ':' . $this->getState('filter.published');
|
||||
// Check if the value is an array
|
||||
$_access = $this->getState('filter.access');
|
||||
if (ComponentbuilderHelper::checkArray($_access))
|
||||
{
|
||||
$id .= ':' . implode(':', $_access);
|
||||
}
|
||||
// Check if this is only an number or string
|
||||
elseif (is_numeric($_access)
|
||||
|| ComponentbuilderHelper::checkString($_access))
|
||||
{
|
||||
$id .= ':' . $_access;
|
||||
}
|
||||
$id .= ':' . $this->getState('filter.ordering');
|
||||
$id .= ':' . $this->getState('filter.created_by');
|
||||
$id .= ':' . $this->getState('filter.modified_by');
|
||||
|
@ -26,6 +26,7 @@ class ComponentbuilderModelAdmins_fields_conditions extends JModelList
|
||||
$config['filter_fields'] = array(
|
||||
'a.id','id',
|
||||
'a.published','published',
|
||||
'a.access','access',
|
||||
'a.ordering','ordering',
|
||||
'a.created_by','created_by',
|
||||
'a.modified_by','modified_by'
|
||||
@ -34,11 +35,17 @@ class ComponentbuilderModelAdmins_fields_conditions extends JModelList
|
||||
|
||||
parent::__construct($config);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Method to auto-populate the model state.
|
||||
*
|
||||
* Note. Calling getState in this method will result in recursion.
|
||||
*
|
||||
* @param string $ordering An optional ordering field.
|
||||
* @param string $direction An optional direction (asc|desc).
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
*/
|
||||
protected function populateState($ordering = null, $direction = null)
|
||||
{
|
||||
@ -48,27 +55,33 @@ class ComponentbuilderModelAdmins_fields_conditions extends JModelList
|
||||
if ($layout = $app->input->get('layout'))
|
||||
{
|
||||
$this->context .= '.' . $layout;
|
||||
}
|
||||
|
||||
|
||||
$sorting = $this->getUserStateFromRequest($this->context . '.filter.sorting', 'filter_sorting', 0, 'int');
|
||||
$this->setState('filter.sorting', $sorting);
|
||||
|
||||
$access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int');
|
||||
$this->setState('filter.access', $access);
|
||||
|
||||
$search = $this->getUserStateFromRequest($this->context . '.filter.search', 'filter_search');
|
||||
}
|
||||
|
||||
// Check if the form was submitted
|
||||
$formSubmited = $app->input->post->get('form_submited');
|
||||
|
||||
$access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int');
|
||||
if ($formSubmited)
|
||||
{
|
||||
$access = $app->input->post->get('access');
|
||||
$this->setState('filter.access', $access);
|
||||
}
|
||||
|
||||
$published = $this->getUserStateFromRequest($this->context . '.filter.published', 'filter_published', '');
|
||||
$this->setState('filter.published', $published);
|
||||
|
||||
$created_by = $this->getUserStateFromRequest($this->context . '.filter.created_by', 'filter_created_by', '');
|
||||
$this->setState('filter.created_by', $created_by);
|
||||
|
||||
$created = $this->getUserStateFromRequest($this->context . '.filter.created', 'filter_created');
|
||||
$this->setState('filter.created', $created);
|
||||
|
||||
$sorting = $this->getUserStateFromRequest($this->context . '.filter.sorting', 'filter_sorting', 0, 'int');
|
||||
$this->setState('filter.sorting', $sorting);
|
||||
|
||||
$search = $this->getUserStateFromRequest($this->context . '.filter.search', 'filter_search');
|
||||
$this->setState('filter.search', $search);
|
||||
|
||||
$published = $this->getUserStateFromRequest($this->context . '.filter.published', 'filter_published', '');
|
||||
$this->setState('filter.published', $published);
|
||||
|
||||
$created_by = $this->getUserStateFromRequest($this->context . '.filter.created_by', 'filter_created_by', '');
|
||||
$this->setState('filter.created_by', $created_by);
|
||||
|
||||
$created = $this->getUserStateFromRequest($this->context . '.filter.created', 'filter_created');
|
||||
$this->setState('filter.created', $created);
|
||||
|
||||
// List state information.
|
||||
parent::populateState($ordering, $direction);
|
||||
}
|
||||
@ -149,9 +162,17 @@ class ComponentbuilderModelAdmins_fields_conditions extends JModelList
|
||||
$query->select('ag.title AS access_level');
|
||||
$query->join('LEFT', '#__viewlevels AS ag ON ag.id = a.access');
|
||||
// Filter by access level.
|
||||
if ($access = $this->getState('filter.access'))
|
||||
$_access = $this->getState('filter.access');
|
||||
if ($_access && is_numeric($_access))
|
||||
{
|
||||
$query->where('a.access = ' . (int) $access);
|
||||
$query->where('a.access = ' . (int) $_access);
|
||||
}
|
||||
elseif (ComponentbuilderHelper::checkArray($_access))
|
||||
{
|
||||
// Secure the array for the query
|
||||
$_access = ArrayHelper::toInteger($_access);
|
||||
// Filter by the Access Array.
|
||||
$query->where('a.access IN (' . implode(',', $_access) . ')');
|
||||
}
|
||||
// Implement View Level Access
|
||||
if (!$user->authorise('core.options', 'com_componentbuilder'))
|
||||
@ -162,7 +183,7 @@ class ComponentbuilderModelAdmins_fields_conditions extends JModelList
|
||||
|
||||
// Add the list ordering clause.
|
||||
$orderCol = $this->state->get('list.ordering', 'a.id');
|
||||
$orderDirn = $this->state->get('list.direction', 'asc');
|
||||
$orderDirn = $this->state->get('list.direction', 'desc');
|
||||
if ($orderCol != '')
|
||||
{
|
||||
$query->order($db->escape($orderCol . ' ' . $orderDirn));
|
||||
@ -183,6 +204,18 @@ class ComponentbuilderModelAdmins_fields_conditions extends JModelList
|
||||
$id .= ':' . $this->getState('filter.id');
|
||||
$id .= ':' . $this->getState('filter.search');
|
||||
$id .= ':' . $this->getState('filter.published');
|
||||
// Check if the value is an array
|
||||
$_access = $this->getState('filter.access');
|
||||
if (ComponentbuilderHelper::checkArray($_access))
|
||||
{
|
||||
$id .= ':' . implode(':', $_access);
|
||||
}
|
||||
// Check if this is only an number or string
|
||||
elseif (is_numeric($_access)
|
||||
|| ComponentbuilderHelper::checkString($_access))
|
||||
{
|
||||
$id .= ':' . $_access;
|
||||
}
|
||||
$id .= ':' . $this->getState('filter.ordering');
|
||||
$id .= ':' . $this->getState('filter.created_by');
|
||||
$id .= ':' . $this->getState('filter.modified_by');
|
||||
|
@ -26,6 +26,7 @@ class ComponentbuilderModelAdmins_fields_relations extends JModelList
|
||||
$config['filter_fields'] = array(
|
||||
'a.id','id',
|
||||
'a.published','published',
|
||||
'a.access','access',
|
||||
'a.ordering','ordering',
|
||||
'a.created_by','created_by',
|
||||
'a.modified_by','modified_by'
|
||||
@ -34,11 +35,17 @@ class ComponentbuilderModelAdmins_fields_relations extends JModelList
|
||||
|
||||
parent::__construct($config);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Method to auto-populate the model state.
|
||||
*
|
||||
* Note. Calling getState in this method will result in recursion.
|
||||
*
|
||||
* @param string $ordering An optional ordering field.
|
||||
* @param string $direction An optional direction (asc|desc).
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
*/
|
||||
protected function populateState($ordering = null, $direction = null)
|
||||
{
|
||||
@ -48,27 +55,33 @@ class ComponentbuilderModelAdmins_fields_relations extends JModelList
|
||||
if ($layout = $app->input->get('layout'))
|
||||
{
|
||||
$this->context .= '.' . $layout;
|
||||
}
|
||||
|
||||
|
||||
$sorting = $this->getUserStateFromRequest($this->context . '.filter.sorting', 'filter_sorting', 0, 'int');
|
||||
$this->setState('filter.sorting', $sorting);
|
||||
|
||||
$access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int');
|
||||
$this->setState('filter.access', $access);
|
||||
|
||||
$search = $this->getUserStateFromRequest($this->context . '.filter.search', 'filter_search');
|
||||
}
|
||||
|
||||
// Check if the form was submitted
|
||||
$formSubmited = $app->input->post->get('form_submited');
|
||||
|
||||
$access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int');
|
||||
if ($formSubmited)
|
||||
{
|
||||
$access = $app->input->post->get('access');
|
||||
$this->setState('filter.access', $access);
|
||||
}
|
||||
|
||||
$published = $this->getUserStateFromRequest($this->context . '.filter.published', 'filter_published', '');
|
||||
$this->setState('filter.published', $published);
|
||||
|
||||
$created_by = $this->getUserStateFromRequest($this->context . '.filter.created_by', 'filter_created_by', '');
|
||||
$this->setState('filter.created_by', $created_by);
|
||||
|
||||
$created = $this->getUserStateFromRequest($this->context . '.filter.created', 'filter_created');
|
||||
$this->setState('filter.created', $created);
|
||||
|
||||
$sorting = $this->getUserStateFromRequest($this->context . '.filter.sorting', 'filter_sorting', 0, 'int');
|
||||
$this->setState('filter.sorting', $sorting);
|
||||
|
||||
$search = $this->getUserStateFromRequest($this->context . '.filter.search', 'filter_search');
|
||||
$this->setState('filter.search', $search);
|
||||
|
||||
$published = $this->getUserStateFromRequest($this->context . '.filter.published', 'filter_published', '');
|
||||
$this->setState('filter.published', $published);
|
||||
|
||||
$created_by = $this->getUserStateFromRequest($this->context . '.filter.created_by', 'filter_created_by', '');
|
||||
$this->setState('filter.created_by', $created_by);
|
||||
|
||||
$created = $this->getUserStateFromRequest($this->context . '.filter.created', 'filter_created');
|
||||
$this->setState('filter.created', $created);
|
||||
|
||||
// List state information.
|
||||
parent::populateState($ordering, $direction);
|
||||
}
|
||||
@ -149,9 +162,17 @@ class ComponentbuilderModelAdmins_fields_relations extends JModelList
|
||||
$query->select('ag.title AS access_level');
|
||||
$query->join('LEFT', '#__viewlevels AS ag ON ag.id = a.access');
|
||||
// Filter by access level.
|
||||
if ($access = $this->getState('filter.access'))
|
||||
$_access = $this->getState('filter.access');
|
||||
if ($_access && is_numeric($_access))
|
||||
{
|
||||
$query->where('a.access = ' . (int) $access);
|
||||
$query->where('a.access = ' . (int) $_access);
|
||||
}
|
||||
elseif (ComponentbuilderHelper::checkArray($_access))
|
||||
{
|
||||
// Secure the array for the query
|
||||
$_access = ArrayHelper::toInteger($_access);
|
||||
// Filter by the Access Array.
|
||||
$query->where('a.access IN (' . implode(',', $_access) . ')');
|
||||
}
|
||||
// Implement View Level Access
|
||||
if (!$user->authorise('core.options', 'com_componentbuilder'))
|
||||
@ -162,7 +183,7 @@ class ComponentbuilderModelAdmins_fields_relations extends JModelList
|
||||
|
||||
// Add the list ordering clause.
|
||||
$orderCol = $this->state->get('list.ordering', 'a.id');
|
||||
$orderDirn = $this->state->get('list.direction', 'asc');
|
||||
$orderDirn = $this->state->get('list.direction', 'desc');
|
||||
if ($orderCol != '')
|
||||
{
|
||||
$query->order($db->escape($orderCol . ' ' . $orderDirn));
|
||||
@ -183,6 +204,18 @@ class ComponentbuilderModelAdmins_fields_relations extends JModelList
|
||||
$id .= ':' . $this->getState('filter.id');
|
||||
$id .= ':' . $this->getState('filter.search');
|
||||
$id .= ':' . $this->getState('filter.published');
|
||||
// Check if the value is an array
|
||||
$_access = $this->getState('filter.access');
|
||||
if (ComponentbuilderHelper::checkArray($_access))
|
||||
{
|
||||
$id .= ':' . implode(':', $_access);
|
||||
}
|
||||
// Check if this is only an number or string
|
||||
elseif (is_numeric($_access)
|
||||
|| ComponentbuilderHelper::checkString($_access))
|
||||
{
|
||||
$id .= ':' . $_access;
|
||||
}
|
||||
$id .= ':' . $this->getState('filter.ordering');
|
||||
$id .= ':' . $this->getState('filter.created_by');
|
||||
$id .= ':' . $this->getState('filter.modified_by');
|
||||
|
@ -26,21 +26,28 @@ class ComponentbuilderModelClass_extendings extends JModelList
|
||||
$config['filter_fields'] = array(
|
||||
'a.id','id',
|
||||
'a.published','published',
|
||||
'a.access','access',
|
||||
'a.ordering','ordering',
|
||||
'a.created_by','created_by',
|
||||
'a.modified_by','modified_by',
|
||||
'a.name','name',
|
||||
'a.extension_type','extension_type'
|
||||
'a.extension_type','extension_type',
|
||||
'a.name','name'
|
||||
);
|
||||
}
|
||||
|
||||
parent::__construct($config);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Method to auto-populate the model state.
|
||||
*
|
||||
* Note. Calling getState in this method will result in recursion.
|
||||
*
|
||||
* @param string $ordering An optional ordering field.
|
||||
* @param string $direction An optional direction (asc|desc).
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
*/
|
||||
protected function populateState($ordering = null, $direction = null)
|
||||
{
|
||||
@ -50,30 +57,46 @@ class ComponentbuilderModelClass_extendings extends JModelList
|
||||
if ($layout = $app->input->get('layout'))
|
||||
{
|
||||
$this->context .= '.' . $layout;
|
||||
}
|
||||
$name = $this->getUserStateFromRequest($this->context . '.filter.name', 'filter_name');
|
||||
$this->setState('filter.name', $name);
|
||||
}
|
||||
|
||||
// Check if the form was submitted
|
||||
$formSubmited = $app->input->post->get('form_submited');
|
||||
|
||||
$access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int');
|
||||
if ($formSubmited)
|
||||
{
|
||||
$access = $app->input->post->get('access');
|
||||
$this->setState('filter.access', $access);
|
||||
}
|
||||
|
||||
$published = $this->getUserStateFromRequest($this->context . '.filter.published', 'filter_published', '');
|
||||
$this->setState('filter.published', $published);
|
||||
|
||||
$created_by = $this->getUserStateFromRequest($this->context . '.filter.created_by', 'filter_created_by', '');
|
||||
$this->setState('filter.created_by', $created_by);
|
||||
|
||||
$created = $this->getUserStateFromRequest($this->context . '.filter.created', 'filter_created');
|
||||
$this->setState('filter.created', $created);
|
||||
|
||||
$sorting = $this->getUserStateFromRequest($this->context . '.filter.sorting', 'filter_sorting', 0, 'int');
|
||||
$this->setState('filter.sorting', $sorting);
|
||||
|
||||
$search = $this->getUserStateFromRequest($this->context . '.filter.search', 'filter_search');
|
||||
$this->setState('filter.search', $search);
|
||||
|
||||
$extension_type = $this->getUserStateFromRequest($this->context . '.filter.extension_type', 'filter_extension_type');
|
||||
$this->setState('filter.extension_type', $extension_type);
|
||||
|
||||
$sorting = $this->getUserStateFromRequest($this->context . '.filter.sorting', 'filter_sorting', 0, 'int');
|
||||
$this->setState('filter.sorting', $sorting);
|
||||
|
||||
$access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int');
|
||||
$this->setState('filter.access', $access);
|
||||
|
||||
$search = $this->getUserStateFromRequest($this->context . '.filter.search', 'filter_search');
|
||||
$this->setState('filter.search', $search);
|
||||
|
||||
$published = $this->getUserStateFromRequest($this->context . '.filter.published', 'filter_published', '');
|
||||
$this->setState('filter.published', $published);
|
||||
|
||||
$created_by = $this->getUserStateFromRequest($this->context . '.filter.created_by', 'filter_created_by', '');
|
||||
$this->setState('filter.created_by', $created_by);
|
||||
|
||||
$created = $this->getUserStateFromRequest($this->context . '.filter.created', 'filter_created');
|
||||
$this->setState('filter.created', $created);
|
||||
if ($formSubmited)
|
||||
{
|
||||
$extension_type = $app->input->post->get('extension_type');
|
||||
$this->setState('filter.extension_type', $extension_type);
|
||||
}
|
||||
|
||||
$name = $this->getUserStateFromRequest($this->context . '.filter.name', 'filter_name');
|
||||
if ($formSubmited)
|
||||
{
|
||||
$name = $app->input->post->get('name');
|
||||
$this->setState('filter.name', $name);
|
||||
}
|
||||
|
||||
// List state information.
|
||||
parent::populateState($ordering, $direction);
|
||||
@ -187,9 +210,17 @@ class ComponentbuilderModelClass_extendings extends JModelList
|
||||
$query->select('ag.title AS access_level');
|
||||
$query->join('LEFT', '#__viewlevels AS ag ON ag.id = a.access');
|
||||
// Filter by access level.
|
||||
if ($access = $this->getState('filter.access'))
|
||||
$_access = $this->getState('filter.access');
|
||||
if ($_access && is_numeric($_access))
|
||||
{
|
||||
$query->where('a.access = ' . (int) $access);
|
||||
$query->where('a.access = ' . (int) $_access);
|
||||
}
|
||||
elseif (ComponentbuilderHelper::checkArray($_access))
|
||||
{
|
||||
// Secure the array for the query
|
||||
$_access = ArrayHelper::toInteger($_access);
|
||||
// Filter by the Access Array.
|
||||
$query->where('a.access IN (' . implode(',', $_access) . ')');
|
||||
}
|
||||
// Implement View Level Access
|
||||
if (!$user->authorise('core.options', 'com_componentbuilder'))
|
||||
@ -213,14 +244,26 @@ class ComponentbuilderModelClass_extendings extends JModelList
|
||||
}
|
||||
|
||||
// Filter by Extension_type.
|
||||
if ($extension_type = $this->getState('filter.extension_type'))
|
||||
$_extension_type = $this->getState('filter.extension_type');
|
||||
if (is_numeric($_extension_type))
|
||||
{
|
||||
$query->where('a.extension_type = ' . $db->quote($db->escape($extension_type)));
|
||||
if (is_float($_extension_type))
|
||||
{
|
||||
$query->where('a.extension_type = ' . (float) $_extension_type);
|
||||
}
|
||||
else
|
||||
{
|
||||
$query->where('a.extension_type = ' . (int) $_extension_type);
|
||||
}
|
||||
}
|
||||
elseif (ComponentbuilderHelper::checkString($_extension_type))
|
||||
{
|
||||
$query->where('a.extension_type = ' . $db->quote($db->escape($_extension_type)));
|
||||
}
|
||||
|
||||
// Add the list ordering clause.
|
||||
$orderCol = $this->state->get('list.ordering', 'a.id');
|
||||
$orderDirn = $this->state->get('list.direction', 'asc');
|
||||
$orderDirn = $this->state->get('list.direction', 'desc');
|
||||
if ($orderCol != '')
|
||||
{
|
||||
$query->order($db->escape($orderCol . ' ' . $orderDirn));
|
||||
@ -241,11 +284,23 @@ class ComponentbuilderModelClass_extendings extends JModelList
|
||||
$id .= ':' . $this->getState('filter.id');
|
||||
$id .= ':' . $this->getState('filter.search');
|
||||
$id .= ':' . $this->getState('filter.published');
|
||||
// Check if the value is an array
|
||||
$_access = $this->getState('filter.access');
|
||||
if (ComponentbuilderHelper::checkArray($_access))
|
||||
{
|
||||
$id .= ':' . implode(':', $_access);
|
||||
}
|
||||
// Check if this is only an number or string
|
||||
elseif (is_numeric($_access)
|
||||
|| ComponentbuilderHelper::checkString($_access))
|
||||
{
|
||||
$id .= ':' . $_access;
|
||||
}
|
||||
$id .= ':' . $this->getState('filter.ordering');
|
||||
$id .= ':' . $this->getState('filter.created_by');
|
||||
$id .= ':' . $this->getState('filter.modified_by');
|
||||
$id .= ':' . $this->getState('filter.name');
|
||||
$id .= ':' . $this->getState('filter.extension_type');
|
||||
$id .= ':' . $this->getState('filter.extension_type');
|
||||
$id .= ':' . $this->getState('filter.name');
|
||||
|
||||
return parent::getStoreId($id);
|
||||
}
|
||||
|
@ -26,22 +26,29 @@ class ComponentbuilderModelClass_methods extends JModelList
|
||||
$config['filter_fields'] = array(
|
||||
'a.id','id',
|
||||
'a.published','published',
|
||||
'a.access','access',
|
||||
'a.ordering','ordering',
|
||||
'a.created_by','created_by',
|
||||
'a.modified_by','modified_by',
|
||||
'a.name','name',
|
||||
'a.visibility','visibility',
|
||||
'a.extension_type','extension_type'
|
||||
'a.extension_type','extension_type',
|
||||
'a.name','name'
|
||||
);
|
||||
}
|
||||
|
||||
parent::__construct($config);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Method to auto-populate the model state.
|
||||
*
|
||||
* Note. Calling getState in this method will result in recursion.
|
||||
*
|
||||
* @param string $ordering An optional ordering field.
|
||||
* @param string $direction An optional direction (asc|desc).
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
*/
|
||||
protected function populateState($ordering = null, $direction = null)
|
||||
{
|
||||
@ -51,33 +58,53 @@ class ComponentbuilderModelClass_methods extends JModelList
|
||||
if ($layout = $app->input->get('layout'))
|
||||
{
|
||||
$this->context .= '.' . $layout;
|
||||
}
|
||||
$name = $this->getUserStateFromRequest($this->context . '.filter.name', 'filter_name');
|
||||
$this->setState('filter.name', $name);
|
||||
}
|
||||
|
||||
// Check if the form was submitted
|
||||
$formSubmited = $app->input->post->get('form_submited');
|
||||
|
||||
$access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int');
|
||||
if ($formSubmited)
|
||||
{
|
||||
$access = $app->input->post->get('access');
|
||||
$this->setState('filter.access', $access);
|
||||
}
|
||||
|
||||
$published = $this->getUserStateFromRequest($this->context . '.filter.published', 'filter_published', '');
|
||||
$this->setState('filter.published', $published);
|
||||
|
||||
$created_by = $this->getUserStateFromRequest($this->context . '.filter.created_by', 'filter_created_by', '');
|
||||
$this->setState('filter.created_by', $created_by);
|
||||
|
||||
$created = $this->getUserStateFromRequest($this->context . '.filter.created', 'filter_created');
|
||||
$this->setState('filter.created', $created);
|
||||
|
||||
$sorting = $this->getUserStateFromRequest($this->context . '.filter.sorting', 'filter_sorting', 0, 'int');
|
||||
$this->setState('filter.sorting', $sorting);
|
||||
|
||||
$search = $this->getUserStateFromRequest($this->context . '.filter.search', 'filter_search');
|
||||
$this->setState('filter.search', $search);
|
||||
|
||||
$visibility = $this->getUserStateFromRequest($this->context . '.filter.visibility', 'filter_visibility');
|
||||
$this->setState('filter.visibility', $visibility);
|
||||
if ($formSubmited)
|
||||
{
|
||||
$visibility = $app->input->post->get('visibility');
|
||||
$this->setState('filter.visibility', $visibility);
|
||||
}
|
||||
|
||||
$extension_type = $this->getUserStateFromRequest($this->context . '.filter.extension_type', 'filter_extension_type');
|
||||
$this->setState('filter.extension_type', $extension_type);
|
||||
|
||||
$sorting = $this->getUserStateFromRequest($this->context . '.filter.sorting', 'filter_sorting', 0, 'int');
|
||||
$this->setState('filter.sorting', $sorting);
|
||||
|
||||
$access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int');
|
||||
$this->setState('filter.access', $access);
|
||||
|
||||
$search = $this->getUserStateFromRequest($this->context . '.filter.search', 'filter_search');
|
||||
$this->setState('filter.search', $search);
|
||||
|
||||
$published = $this->getUserStateFromRequest($this->context . '.filter.published', 'filter_published', '');
|
||||
$this->setState('filter.published', $published);
|
||||
|
||||
$created_by = $this->getUserStateFromRequest($this->context . '.filter.created_by', 'filter_created_by', '');
|
||||
$this->setState('filter.created_by', $created_by);
|
||||
|
||||
$created = $this->getUserStateFromRequest($this->context . '.filter.created', 'filter_created');
|
||||
$this->setState('filter.created', $created);
|
||||
if ($formSubmited)
|
||||
{
|
||||
$extension_type = $app->input->post->get('extension_type');
|
||||
$this->setState('filter.extension_type', $extension_type);
|
||||
}
|
||||
|
||||
$name = $this->getUserStateFromRequest($this->context . '.filter.name', 'filter_name');
|
||||
if ($formSubmited)
|
||||
{
|
||||
$name = $app->input->post->get('name');
|
||||
$this->setState('filter.name', $name);
|
||||
}
|
||||
|
||||
// List state information.
|
||||
parent::populateState($ordering, $direction);
|
||||
@ -211,9 +238,17 @@ class ComponentbuilderModelClass_methods extends JModelList
|
||||
$query->select('ag.title AS access_level');
|
||||
$query->join('LEFT', '#__viewlevels AS ag ON ag.id = a.access');
|
||||
// Filter by access level.
|
||||
if ($access = $this->getState('filter.access'))
|
||||
$_access = $this->getState('filter.access');
|
||||
if ($_access && is_numeric($_access))
|
||||
{
|
||||
$query->where('a.access = ' . (int) $access);
|
||||
$query->where('a.access = ' . (int) $_access);
|
||||
}
|
||||
elseif (ComponentbuilderHelper::checkArray($_access))
|
||||
{
|
||||
// Secure the array for the query
|
||||
$_access = ArrayHelper::toInteger($_access);
|
||||
// Filter by the Access Array.
|
||||
$query->where('a.access IN (' . implode(',', $_access) . ')');
|
||||
}
|
||||
// Implement View Level Access
|
||||
if (!$user->authorise('core.options', 'com_componentbuilder'))
|
||||
@ -237,14 +272,38 @@ class ComponentbuilderModelClass_methods extends JModelList
|
||||
}
|
||||
|
||||
// Filter by Visibility.
|
||||
if ($visibility = $this->getState('filter.visibility'))
|
||||
$_visibility = $this->getState('filter.visibility');
|
||||
if (is_numeric($_visibility))
|
||||
{
|
||||
$query->where('a.visibility = ' . $db->quote($db->escape($visibility)));
|
||||
if (is_float($_visibility))
|
||||
{
|
||||
$query->where('a.visibility = ' . (float) $_visibility);
|
||||
}
|
||||
else
|
||||
{
|
||||
$query->where('a.visibility = ' . (int) $_visibility);
|
||||
}
|
||||
}
|
||||
elseif (ComponentbuilderHelper::checkString($_visibility))
|
||||
{
|
||||
$query->where('a.visibility = ' . $db->quote($db->escape($_visibility)));
|
||||
}
|
||||
// Filter by Extension_type.
|
||||
if ($extension_type = $this->getState('filter.extension_type'))
|
||||
$_extension_type = $this->getState('filter.extension_type');
|
||||
if (is_numeric($_extension_type))
|
||||
{
|
||||
$query->where('a.extension_type = ' . $db->quote($db->escape($extension_type)));
|
||||
if (is_float($_extension_type))
|
||||
{
|
||||
$query->where('a.extension_type = ' . (float) $_extension_type);
|
||||
}
|
||||
else
|
||||
{
|
||||
$query->where('a.extension_type = ' . (int) $_extension_type);
|
||||
}
|
||||
}
|
||||
elseif (ComponentbuilderHelper::checkString($_extension_type))
|
||||
{
|
||||
$query->where('a.extension_type = ' . $db->quote($db->escape($_extension_type)));
|
||||
}
|
||||
|
||||
// Add the list ordering clause.
|
||||
@ -398,12 +457,24 @@ class ComponentbuilderModelClass_methods extends JModelList
|
||||
$id .= ':' . $this->getState('filter.id');
|
||||
$id .= ':' . $this->getState('filter.search');
|
||||
$id .= ':' . $this->getState('filter.published');
|
||||
// Check if the value is an array
|
||||
$_access = $this->getState('filter.access');
|
||||
if (ComponentbuilderHelper::checkArray($_access))
|
||||
{
|
||||
$id .= ':' . implode(':', $_access);
|
||||
}
|
||||
// Check if this is only an number or string
|
||||
elseif (is_numeric($_access)
|
||||
|| ComponentbuilderHelper::checkString($_access))
|
||||
{
|
||||
$id .= ':' . $_access;
|
||||
}
|
||||
$id .= ':' . $this->getState('filter.ordering');
|
||||
$id .= ':' . $this->getState('filter.created_by');
|
||||
$id .= ':' . $this->getState('filter.modified_by');
|
||||
$id .= ':' . $this->getState('filter.name');
|
||||
$id .= ':' . $this->getState('filter.visibility');
|
||||
$id .= ':' . $this->getState('filter.extension_type');
|
||||
$id .= ':' . $this->getState('filter.extension_type');
|
||||
$id .= ':' . $this->getState('filter.name');
|
||||
|
||||
return parent::getStoreId($id);
|
||||
}
|
||||
|
@ -26,22 +26,29 @@ class ComponentbuilderModelClass_properties extends JModelList
|
||||
$config['filter_fields'] = array(
|
||||
'a.id','id',
|
||||
'a.published','published',
|
||||
'a.access','access',
|
||||
'a.ordering','ordering',
|
||||
'a.created_by','created_by',
|
||||
'a.modified_by','modified_by',
|
||||
'a.name','name',
|
||||
'a.visibility','visibility',
|
||||
'a.extension_type','extension_type'
|
||||
'a.extension_type','extension_type',
|
||||
'a.name','name'
|
||||
);
|
||||
}
|
||||
|
||||
parent::__construct($config);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Method to auto-populate the model state.
|
||||
*
|
||||
* Note. Calling getState in this method will result in recursion.
|
||||
*
|
||||
* @param string $ordering An optional ordering field.
|
||||
* @param string $direction An optional direction (asc|desc).
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
*/
|
||||
protected function populateState($ordering = null, $direction = null)
|
||||
{
|
||||
@ -51,33 +58,53 @@ class ComponentbuilderModelClass_properties extends JModelList
|
||||
if ($layout = $app->input->get('layout'))
|
||||
{
|
||||
$this->context .= '.' . $layout;
|
||||
}
|
||||
$name = $this->getUserStateFromRequest($this->context . '.filter.name', 'filter_name');
|
||||
$this->setState('filter.name', $name);
|
||||
}
|
||||
|
||||
// Check if the form was submitted
|
||||
$formSubmited = $app->input->post->get('form_submited');
|
||||
|
||||
$access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int');
|
||||
if ($formSubmited)
|
||||
{
|
||||
$access = $app->input->post->get('access');
|
||||
$this->setState('filter.access', $access);
|
||||
}
|
||||
|
||||
$published = $this->getUserStateFromRequest($this->context . '.filter.published', 'filter_published', '');
|
||||
$this->setState('filter.published', $published);
|
||||
|
||||
$created_by = $this->getUserStateFromRequest($this->context . '.filter.created_by', 'filter_created_by', '');
|
||||
$this->setState('filter.created_by', $created_by);
|
||||
|
||||
$created = $this->getUserStateFromRequest($this->context . '.filter.created', 'filter_created');
|
||||
$this->setState('filter.created', $created);
|
||||
|
||||
$sorting = $this->getUserStateFromRequest($this->context . '.filter.sorting', 'filter_sorting', 0, 'int');
|
||||
$this->setState('filter.sorting', $sorting);
|
||||
|
||||
$search = $this->getUserStateFromRequest($this->context . '.filter.search', 'filter_search');
|
||||
$this->setState('filter.search', $search);
|
||||
|
||||
$visibility = $this->getUserStateFromRequest($this->context . '.filter.visibility', 'filter_visibility');
|
||||
$this->setState('filter.visibility', $visibility);
|
||||
if ($formSubmited)
|
||||
{
|
||||
$visibility = $app->input->post->get('visibility');
|
||||
$this->setState('filter.visibility', $visibility);
|
||||
}
|
||||
|
||||
$extension_type = $this->getUserStateFromRequest($this->context . '.filter.extension_type', 'filter_extension_type');
|
||||
$this->setState('filter.extension_type', $extension_type);
|
||||
|
||||
$sorting = $this->getUserStateFromRequest($this->context . '.filter.sorting', 'filter_sorting', 0, 'int');
|
||||
$this->setState('filter.sorting', $sorting);
|
||||
|
||||
$access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int');
|
||||
$this->setState('filter.access', $access);
|
||||
|
||||
$search = $this->getUserStateFromRequest($this->context . '.filter.search', 'filter_search');
|
||||
$this->setState('filter.search', $search);
|
||||
|
||||
$published = $this->getUserStateFromRequest($this->context . '.filter.published', 'filter_published', '');
|
||||
$this->setState('filter.published', $published);
|
||||
|
||||
$created_by = $this->getUserStateFromRequest($this->context . '.filter.created_by', 'filter_created_by', '');
|
||||
$this->setState('filter.created_by', $created_by);
|
||||
|
||||
$created = $this->getUserStateFromRequest($this->context . '.filter.created', 'filter_created');
|
||||
$this->setState('filter.created', $created);
|
||||
if ($formSubmited)
|
||||
{
|
||||
$extension_type = $app->input->post->get('extension_type');
|
||||
$this->setState('filter.extension_type', $extension_type);
|
||||
}
|
||||
|
||||
$name = $this->getUserStateFromRequest($this->context . '.filter.name', 'filter_name');
|
||||
if ($formSubmited)
|
||||
{
|
||||
$name = $app->input->post->get('name');
|
||||
$this->setState('filter.name', $name);
|
||||
}
|
||||
|
||||
// List state information.
|
||||
parent::populateState($ordering, $direction);
|
||||
@ -211,9 +238,17 @@ class ComponentbuilderModelClass_properties extends JModelList
|
||||
$query->select('ag.title AS access_level');
|
||||
$query->join('LEFT', '#__viewlevels AS ag ON ag.id = a.access');
|
||||
// Filter by access level.
|
||||
if ($access = $this->getState('filter.access'))
|
||||
$_access = $this->getState('filter.access');
|
||||
if ($_access && is_numeric($_access))
|
||||
{
|
||||
$query->where('a.access = ' . (int) $access);
|
||||
$query->where('a.access = ' . (int) $_access);
|
||||
}
|
||||
elseif (ComponentbuilderHelper::checkArray($_access))
|
||||
{
|
||||
// Secure the array for the query
|
||||
$_access = ArrayHelper::toInteger($_access);
|
||||
// Filter by the Access Array.
|
||||
$query->where('a.access IN (' . implode(',', $_access) . ')');
|
||||
}
|
||||
// Implement View Level Access
|
||||
if (!$user->authorise('core.options', 'com_componentbuilder'))
|
||||
@ -237,14 +272,38 @@ class ComponentbuilderModelClass_properties extends JModelList
|
||||
}
|
||||
|
||||
// Filter by Visibility.
|
||||
if ($visibility = $this->getState('filter.visibility'))
|
||||
$_visibility = $this->getState('filter.visibility');
|
||||
if (is_numeric($_visibility))
|
||||
{
|
||||
$query->where('a.visibility = ' . $db->quote($db->escape($visibility)));
|
||||
if (is_float($_visibility))
|
||||
{
|
||||
$query->where('a.visibility = ' . (float) $_visibility);
|
||||
}
|
||||
else
|
||||
{
|
||||
$query->where('a.visibility = ' . (int) $_visibility);
|
||||
}
|
||||
}
|
||||
elseif (ComponentbuilderHelper::checkString($_visibility))
|
||||
{
|
||||
$query->where('a.visibility = ' . $db->quote($db->escape($_visibility)));
|
||||
}
|
||||
// Filter by Extension_type.
|
||||
if ($extension_type = $this->getState('filter.extension_type'))
|
||||
$_extension_type = $this->getState('filter.extension_type');
|
||||
if (is_numeric($_extension_type))
|
||||
{
|
||||
$query->where('a.extension_type = ' . $db->quote($db->escape($extension_type)));
|
||||
if (is_float($_extension_type))
|
||||
{
|
||||
$query->where('a.extension_type = ' . (float) $_extension_type);
|
||||
}
|
||||
else
|
||||
{
|
||||
$query->where('a.extension_type = ' . (int) $_extension_type);
|
||||
}
|
||||
}
|
||||
elseif (ComponentbuilderHelper::checkString($_extension_type))
|
||||
{
|
||||
$query->where('a.extension_type = ' . $db->quote($db->escape($_extension_type)));
|
||||
}
|
||||
|
||||
// Add the list ordering clause.
|
||||
@ -396,12 +455,24 @@ class ComponentbuilderModelClass_properties extends JModelList
|
||||
$id .= ':' . $this->getState('filter.id');
|
||||
$id .= ':' . $this->getState('filter.search');
|
||||
$id .= ':' . $this->getState('filter.published');
|
||||
// Check if the value is an array
|
||||
$_access = $this->getState('filter.access');
|
||||
if (ComponentbuilderHelper::checkArray($_access))
|
||||
{
|
||||
$id .= ':' . implode(':', $_access);
|
||||
}
|
||||
// Check if this is only an number or string
|
||||
elseif (is_numeric($_access)
|
||||
|| ComponentbuilderHelper::checkString($_access))
|
||||
{
|
||||
$id .= ':' . $_access;
|
||||
}
|
||||
$id .= ':' . $this->getState('filter.ordering');
|
||||
$id .= ':' . $this->getState('filter.created_by');
|
||||
$id .= ':' . $this->getState('filter.modified_by');
|
||||
$id .= ':' . $this->getState('filter.name');
|
||||
$id .= ':' . $this->getState('filter.visibility');
|
||||
$id .= ':' . $this->getState('filter.extension_type');
|
||||
$id .= ':' . $this->getState('filter.extension_type');
|
||||
$id .= ':' . $this->getState('filter.name');
|
||||
|
||||
return parent::getStoreId($id);
|
||||
}
|
||||
|
@ -26,6 +26,7 @@ class ComponentbuilderModelComponents_admin_views extends JModelList
|
||||
$config['filter_fields'] = array(
|
||||
'a.id','id',
|
||||
'a.published','published',
|
||||
'a.access','access',
|
||||
'a.ordering','ordering',
|
||||
'a.created_by','created_by',
|
||||
'a.modified_by','modified_by'
|
||||
@ -34,11 +35,17 @@ class ComponentbuilderModelComponents_admin_views extends JModelList
|
||||
|
||||
parent::__construct($config);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Method to auto-populate the model state.
|
||||
*
|
||||
* Note. Calling getState in this method will result in recursion.
|
||||
*
|
||||
* @param string $ordering An optional ordering field.
|
||||
* @param string $direction An optional direction (asc|desc).
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
*/
|
||||
protected function populateState($ordering = null, $direction = null)
|
||||
{
|
||||
@ -48,27 +55,33 @@ class ComponentbuilderModelComponents_admin_views extends JModelList
|
||||
if ($layout = $app->input->get('layout'))
|
||||
{
|
||||
$this->context .= '.' . $layout;
|
||||
}
|
||||
|
||||
|
||||
$sorting = $this->getUserStateFromRequest($this->context . '.filter.sorting', 'filter_sorting', 0, 'int');
|
||||
$this->setState('filter.sorting', $sorting);
|
||||
|
||||
$access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int');
|
||||
$this->setState('filter.access', $access);
|
||||
|
||||
$search = $this->getUserStateFromRequest($this->context . '.filter.search', 'filter_search');
|
||||
}
|
||||
|
||||
// Check if the form was submitted
|
||||
$formSubmited = $app->input->post->get('form_submited');
|
||||
|
||||
$access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int');
|
||||
if ($formSubmited)
|
||||
{
|
||||
$access = $app->input->post->get('access');
|
||||
$this->setState('filter.access', $access);
|
||||
}
|
||||
|
||||
$published = $this->getUserStateFromRequest($this->context . '.filter.published', 'filter_published', '');
|
||||
$this->setState('filter.published', $published);
|
||||
|
||||
$created_by = $this->getUserStateFromRequest($this->context . '.filter.created_by', 'filter_created_by', '');
|
||||
$this->setState('filter.created_by', $created_by);
|
||||
|
||||
$created = $this->getUserStateFromRequest($this->context . '.filter.created', 'filter_created');
|
||||
$this->setState('filter.created', $created);
|
||||
|
||||
$sorting = $this->getUserStateFromRequest($this->context . '.filter.sorting', 'filter_sorting', 0, 'int');
|
||||
$this->setState('filter.sorting', $sorting);
|
||||
|
||||
$search = $this->getUserStateFromRequest($this->context . '.filter.search', 'filter_search');
|
||||
$this->setState('filter.search', $search);
|
||||
|
||||
$published = $this->getUserStateFromRequest($this->context . '.filter.published', 'filter_published', '');
|
||||
$this->setState('filter.published', $published);
|
||||
|
||||
$created_by = $this->getUserStateFromRequest($this->context . '.filter.created_by', 'filter_created_by', '');
|
||||
$this->setState('filter.created_by', $created_by);
|
||||
|
||||
$created = $this->getUserStateFromRequest($this->context . '.filter.created', 'filter_created');
|
||||
$this->setState('filter.created', $created);
|
||||
|
||||
// List state information.
|
||||
parent::populateState($ordering, $direction);
|
||||
}
|
||||
@ -149,9 +162,17 @@ class ComponentbuilderModelComponents_admin_views extends JModelList
|
||||
$query->select('ag.title AS access_level');
|
||||
$query->join('LEFT', '#__viewlevels AS ag ON ag.id = a.access');
|
||||
// Filter by access level.
|
||||
if ($access = $this->getState('filter.access'))
|
||||
$_access = $this->getState('filter.access');
|
||||
if ($_access && is_numeric($_access))
|
||||
{
|
||||
$query->where('a.access = ' . (int) $access);
|
||||
$query->where('a.access = ' . (int) $_access);
|
||||
}
|
||||
elseif (ComponentbuilderHelper::checkArray($_access))
|
||||
{
|
||||
// Secure the array for the query
|
||||
$_access = ArrayHelper::toInteger($_access);
|
||||
// Filter by the Access Array.
|
||||
$query->where('a.access IN (' . implode(',', $_access) . ')');
|
||||
}
|
||||
// Implement View Level Access
|
||||
if (!$user->authorise('core.options', 'com_componentbuilder'))
|
||||
@ -162,7 +183,7 @@ class ComponentbuilderModelComponents_admin_views extends JModelList
|
||||
|
||||
// Add the list ordering clause.
|
||||
$orderCol = $this->state->get('list.ordering', 'a.id');
|
||||
$orderDirn = $this->state->get('list.direction', 'asc');
|
||||
$orderDirn = $this->state->get('list.direction', 'desc');
|
||||
if ($orderCol != '')
|
||||
{
|
||||
$query->order($db->escape($orderCol . ' ' . $orderDirn));
|
||||
@ -183,6 +204,18 @@ class ComponentbuilderModelComponents_admin_views extends JModelList
|
||||
$id .= ':' . $this->getState('filter.id');
|
||||
$id .= ':' . $this->getState('filter.search');
|
||||
$id .= ':' . $this->getState('filter.published');
|
||||
// Check if the value is an array
|
||||
$_access = $this->getState('filter.access');
|
||||
if (ComponentbuilderHelper::checkArray($_access))
|
||||
{
|
||||
$id .= ':' . implode(':', $_access);
|
||||
}
|
||||
// Check if this is only an number or string
|
||||
elseif (is_numeric($_access)
|
||||
|| ComponentbuilderHelper::checkString($_access))
|
||||
{
|
||||
$id .= ':' . $_access;
|
||||
}
|
||||
$id .= ':' . $this->getState('filter.ordering');
|
||||
$id .= ':' . $this->getState('filter.created_by');
|
||||
$id .= ':' . $this->getState('filter.modified_by');
|
||||
|
@ -26,6 +26,7 @@ class ComponentbuilderModelComponents_config extends JModelList
|
||||
$config['filter_fields'] = array(
|
||||
'a.id','id',
|
||||
'a.published','published',
|
||||
'a.access','access',
|
||||
'a.ordering','ordering',
|
||||
'a.created_by','created_by',
|
||||
'a.modified_by','modified_by'
|
||||
@ -34,11 +35,17 @@ class ComponentbuilderModelComponents_config extends JModelList
|
||||
|
||||
parent::__construct($config);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Method to auto-populate the model state.
|
||||
*
|
||||
* Note. Calling getState in this method will result in recursion.
|
||||
*
|
||||
* @param string $ordering An optional ordering field.
|
||||
* @param string $direction An optional direction (asc|desc).
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
*/
|
||||
protected function populateState($ordering = null, $direction = null)
|
||||
{
|
||||
@ -48,27 +55,33 @@ class ComponentbuilderModelComponents_config extends JModelList
|
||||
if ($layout = $app->input->get('layout'))
|
||||
{
|
||||
$this->context .= '.' . $layout;
|
||||
}
|
||||
|
||||
|
||||
$sorting = $this->getUserStateFromRequest($this->context . '.filter.sorting', 'filter_sorting', 0, 'int');
|
||||
$this->setState('filter.sorting', $sorting);
|
||||
|
||||
$access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int');
|
||||
$this->setState('filter.access', $access);
|
||||
|
||||
$search = $this->getUserStateFromRequest($this->context . '.filter.search', 'filter_search');
|
||||
}
|
||||
|
||||
// Check if the form was submitted
|
||||
$formSubmited = $app->input->post->get('form_submited');
|
||||
|
||||
$access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int');
|
||||
if ($formSubmited)
|
||||
{
|
||||
$access = $app->input->post->get('access');
|
||||
$this->setState('filter.access', $access);
|
||||
}
|
||||
|
||||
$published = $this->getUserStateFromRequest($this->context . '.filter.published', 'filter_published', '');
|
||||
$this->setState('filter.published', $published);
|
||||
|
||||
$created_by = $this->getUserStateFromRequest($this->context . '.filter.created_by', 'filter_created_by', '');
|
||||
$this->setState('filter.created_by', $created_by);
|
||||
|
||||
$created = $this->getUserStateFromRequest($this->context . '.filter.created', 'filter_created');
|
||||
$this->setState('filter.created', $created);
|
||||
|
||||
$sorting = $this->getUserStateFromRequest($this->context . '.filter.sorting', 'filter_sorting', 0, 'int');
|
||||
$this->setState('filter.sorting', $sorting);
|
||||
|
||||
$search = $this->getUserStateFromRequest($this->context . '.filter.search', 'filter_search');
|
||||
$this->setState('filter.search', $search);
|
||||
|
||||
$published = $this->getUserStateFromRequest($this->context . '.filter.published', 'filter_published', '');
|
||||
$this->setState('filter.published', $published);
|
||||
|
||||
$created_by = $this->getUserStateFromRequest($this->context . '.filter.created_by', 'filter_created_by', '');
|
||||
$this->setState('filter.created_by', $created_by);
|
||||
|
||||
$created = $this->getUserStateFromRequest($this->context . '.filter.created', 'filter_created');
|
||||
$this->setState('filter.created', $created);
|
||||
|
||||
// List state information.
|
||||
parent::populateState($ordering, $direction);
|
||||
}
|
||||
@ -149,9 +162,17 @@ class ComponentbuilderModelComponents_config extends JModelList
|
||||
$query->select('ag.title AS access_level');
|
||||
$query->join('LEFT', '#__viewlevels AS ag ON ag.id = a.access');
|
||||
// Filter by access level.
|
||||
if ($access = $this->getState('filter.access'))
|
||||
$_access = $this->getState('filter.access');
|
||||
if ($_access && is_numeric($_access))
|
||||
{
|
||||
$query->where('a.access = ' . (int) $access);
|
||||
$query->where('a.access = ' . (int) $_access);
|
||||
}
|
||||
elseif (ComponentbuilderHelper::checkArray($_access))
|
||||
{
|
||||
// Secure the array for the query
|
||||
$_access = ArrayHelper::toInteger($_access);
|
||||
// Filter by the Access Array.
|
||||
$query->where('a.access IN (' . implode(',', $_access) . ')');
|
||||
}
|
||||
// Implement View Level Access
|
||||
if (!$user->authorise('core.options', 'com_componentbuilder'))
|
||||
@ -162,7 +183,7 @@ class ComponentbuilderModelComponents_config extends JModelList
|
||||
|
||||
// Add the list ordering clause.
|
||||
$orderCol = $this->state->get('list.ordering', 'a.id');
|
||||
$orderDirn = $this->state->get('list.direction', 'asc');
|
||||
$orderDirn = $this->state->get('list.direction', 'desc');
|
||||
if ($orderCol != '')
|
||||
{
|
||||
$query->order($db->escape($orderCol . ' ' . $orderDirn));
|
||||
@ -183,6 +204,18 @@ class ComponentbuilderModelComponents_config extends JModelList
|
||||
$id .= ':' . $this->getState('filter.id');
|
||||
$id .= ':' . $this->getState('filter.search');
|
||||
$id .= ':' . $this->getState('filter.published');
|
||||
// Check if the value is an array
|
||||
$_access = $this->getState('filter.access');
|
||||
if (ComponentbuilderHelper::checkArray($_access))
|
||||
{
|
||||
$id .= ':' . implode(':', $_access);
|
||||
}
|
||||
// Check if this is only an number or string
|
||||
elseif (is_numeric($_access)
|
||||
|| ComponentbuilderHelper::checkString($_access))
|
||||
{
|
||||
$id .= ':' . $_access;
|
||||
}
|
||||
$id .= ':' . $this->getState('filter.ordering');
|
||||
$id .= ':' . $this->getState('filter.created_by');
|
||||
$id .= ':' . $this->getState('filter.modified_by');
|
||||
|
@ -26,6 +26,7 @@ class ComponentbuilderModelComponents_custom_admin_menus extends JModelList
|
||||
$config['filter_fields'] = array(
|
||||
'a.id','id',
|
||||
'a.published','published',
|
||||
'a.access','access',
|
||||
'a.ordering','ordering',
|
||||
'a.created_by','created_by',
|
||||
'a.modified_by','modified_by'
|
||||
@ -34,11 +35,17 @@ class ComponentbuilderModelComponents_custom_admin_menus extends JModelList
|
||||
|
||||
parent::__construct($config);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Method to auto-populate the model state.
|
||||
*
|
||||
* Note. Calling getState in this method will result in recursion.
|
||||
*
|
||||
* @param string $ordering An optional ordering field.
|
||||
* @param string $direction An optional direction (asc|desc).
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
*/
|
||||
protected function populateState($ordering = null, $direction = null)
|
||||
{
|
||||
@ -48,27 +55,33 @@ class ComponentbuilderModelComponents_custom_admin_menus extends JModelList
|
||||
if ($layout = $app->input->get('layout'))
|
||||
{
|
||||
$this->context .= '.' . $layout;
|
||||
}
|
||||
|
||||
|
||||
$sorting = $this->getUserStateFromRequest($this->context . '.filter.sorting', 'filter_sorting', 0, 'int');
|
||||
$this->setState('filter.sorting', $sorting);
|
||||
|
||||
$access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int');
|
||||
$this->setState('filter.access', $access);
|
||||
|
||||
$search = $this->getUserStateFromRequest($this->context . '.filter.search', 'filter_search');
|
||||
}
|
||||
|
||||
// Check if the form was submitted
|
||||
$formSubmited = $app->input->post->get('form_submited');
|
||||
|
||||
$access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int');
|
||||
if ($formSubmited)
|
||||
{
|
||||
$access = $app->input->post->get('access');
|
||||
$this->setState('filter.access', $access);
|
||||
}
|
||||
|
||||
$published = $this->getUserStateFromRequest($this->context . '.filter.published', 'filter_published', '');
|
||||
$this->setState('filter.published', $published);
|
||||
|
||||
$created_by = $this->getUserStateFromRequest($this->context . '.filter.created_by', 'filter_created_by', '');
|
||||
$this->setState('filter.created_by', $created_by);
|
||||
|
||||
$created = $this->getUserStateFromRequest($this->context . '.filter.created', 'filter_created');
|
||||
$this->setState('filter.created', $created);
|
||||
|
||||
$sorting = $this->getUserStateFromRequest($this->context . '.filter.sorting', 'filter_sorting', 0, 'int');
|
||||
$this->setState('filter.sorting', $sorting);
|
||||
|
||||
$search = $this->getUserStateFromRequest($this->context . '.filter.search', 'filter_search');
|
||||
$this->setState('filter.search', $search);
|
||||
|
||||
$published = $this->getUserStateFromRequest($this->context . '.filter.published', 'filter_published', '');
|
||||
$this->setState('filter.published', $published);
|
||||
|
||||
$created_by = $this->getUserStateFromRequest($this->context . '.filter.created_by', 'filter_created_by', '');
|
||||
$this->setState('filter.created_by', $created_by);
|
||||
|
||||
$created = $this->getUserStateFromRequest($this->context . '.filter.created', 'filter_created');
|
||||
$this->setState('filter.created', $created);
|
||||
|
||||
// List state information.
|
||||
parent::populateState($ordering, $direction);
|
||||
}
|
||||
@ -149,9 +162,17 @@ class ComponentbuilderModelComponents_custom_admin_menus extends JModelList
|
||||
$query->select('ag.title AS access_level');
|
||||
$query->join('LEFT', '#__viewlevels AS ag ON ag.id = a.access');
|
||||
// Filter by access level.
|
||||
if ($access = $this->getState('filter.access'))
|
||||
$_access = $this->getState('filter.access');
|
||||
if ($_access && is_numeric($_access))
|
||||
{
|
||||
$query->where('a.access = ' . (int) $access);
|
||||
$query->where('a.access = ' . (int) $_access);
|
||||
}
|
||||
elseif (ComponentbuilderHelper::checkArray($_access))
|
||||
{
|
||||
// Secure the array for the query
|
||||
$_access = ArrayHelper::toInteger($_access);
|
||||
// Filter by the Access Array.
|
||||
$query->where('a.access IN (' . implode(',', $_access) . ')');
|
||||
}
|
||||
// Implement View Level Access
|
||||
if (!$user->authorise('core.options', 'com_componentbuilder'))
|
||||
@ -162,7 +183,7 @@ class ComponentbuilderModelComponents_custom_admin_menus extends JModelList
|
||||
|
||||
// Add the list ordering clause.
|
||||
$orderCol = $this->state->get('list.ordering', 'a.id');
|
||||
$orderDirn = $this->state->get('list.direction', 'asc');
|
||||
$orderDirn = $this->state->get('list.direction', 'desc');
|
||||
if ($orderCol != '')
|
||||
{
|
||||
$query->order($db->escape($orderCol . ' ' . $orderDirn));
|
||||
@ -183,6 +204,18 @@ class ComponentbuilderModelComponents_custom_admin_menus extends JModelList
|
||||
$id .= ':' . $this->getState('filter.id');
|
||||
$id .= ':' . $this->getState('filter.search');
|
||||
$id .= ':' . $this->getState('filter.published');
|
||||
// Check if the value is an array
|
||||
$_access = $this->getState('filter.access');
|
||||
if (ComponentbuilderHelper::checkArray($_access))
|
||||
{
|
||||
$id .= ':' . implode(':', $_access);
|
||||
}
|
||||
// Check if this is only an number or string
|
||||
elseif (is_numeric($_access)
|
||||
|| ComponentbuilderHelper::checkString($_access))
|
||||
{
|
||||
$id .= ':' . $_access;
|
||||
}
|
||||
$id .= ':' . $this->getState('filter.ordering');
|
||||
$id .= ':' . $this->getState('filter.created_by');
|
||||
$id .= ':' . $this->getState('filter.modified_by');
|
||||
|
@ -26,6 +26,7 @@ class ComponentbuilderModelComponents_custom_admin_views extends JModelList
|
||||
$config['filter_fields'] = array(
|
||||
'a.id','id',
|
||||
'a.published','published',
|
||||
'a.access','access',
|
||||
'a.ordering','ordering',
|
||||
'a.created_by','created_by',
|
||||
'a.modified_by','modified_by'
|
||||
@ -34,11 +35,17 @@ class ComponentbuilderModelComponents_custom_admin_views extends JModelList
|
||||
|
||||
parent::__construct($config);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Method to auto-populate the model state.
|
||||
*
|
||||
* Note. Calling getState in this method will result in recursion.
|
||||
*
|
||||
* @param string $ordering An optional ordering field.
|
||||
* @param string $direction An optional direction (asc|desc).
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
*/
|
||||
protected function populateState($ordering = null, $direction = null)
|
||||
{
|
||||
@ -48,27 +55,33 @@ class ComponentbuilderModelComponents_custom_admin_views extends JModelList
|
||||
if ($layout = $app->input->get('layout'))
|
||||
{
|
||||
$this->context .= '.' . $layout;
|
||||
}
|
||||
|
||||
|
||||
$sorting = $this->getUserStateFromRequest($this->context . '.filter.sorting', 'filter_sorting', 0, 'int');
|
||||
$this->setState('filter.sorting', $sorting);
|
||||
|
||||
$access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int');
|
||||
$this->setState('filter.access', $access);
|
||||
|
||||
$search = $this->getUserStateFromRequest($this->context . '.filter.search', 'filter_search');
|
||||
}
|
||||
|
||||
// Check if the form was submitted
|
||||
$formSubmited = $app->input->post->get('form_submited');
|
||||
|
||||
$access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int');
|
||||
if ($formSubmited)
|
||||
{
|
||||
$access = $app->input->post->get('access');
|
||||
$this->setState('filter.access', $access);
|
||||
}
|
||||
|
||||
$published = $this->getUserStateFromRequest($this->context . '.filter.published', 'filter_published', '');
|
||||
$this->setState('filter.published', $published);
|
||||
|
||||
$created_by = $this->getUserStateFromRequest($this->context . '.filter.created_by', 'filter_created_by', '');
|
||||
$this->setState('filter.created_by', $created_by);
|
||||
|
||||
$created = $this->getUserStateFromRequest($this->context . '.filter.created', 'filter_created');
|
||||
$this->setState('filter.created', $created);
|
||||
|
||||
$sorting = $this->getUserStateFromRequest($this->context . '.filter.sorting', 'filter_sorting', 0, 'int');
|
||||
$this->setState('filter.sorting', $sorting);
|
||||
|
||||
$search = $this->getUserStateFromRequest($this->context . '.filter.search', 'filter_search');
|
||||
$this->setState('filter.search', $search);
|
||||
|
||||
$published = $this->getUserStateFromRequest($this->context . '.filter.published', 'filter_published', '');
|
||||
$this->setState('filter.published', $published);
|
||||
|
||||
$created_by = $this->getUserStateFromRequest($this->context . '.filter.created_by', 'filter_created_by', '');
|
||||
$this->setState('filter.created_by', $created_by);
|
||||
|
||||
$created = $this->getUserStateFromRequest($this->context . '.filter.created', 'filter_created');
|
||||
$this->setState('filter.created', $created);
|
||||
|
||||
// List state information.
|
||||
parent::populateState($ordering, $direction);
|
||||
}
|
||||
@ -149,9 +162,17 @@ class ComponentbuilderModelComponents_custom_admin_views extends JModelList
|
||||
$query->select('ag.title AS access_level');
|
||||
$query->join('LEFT', '#__viewlevels AS ag ON ag.id = a.access');
|
||||
// Filter by access level.
|
||||
if ($access = $this->getState('filter.access'))
|
||||
$_access = $this->getState('filter.access');
|
||||
if ($_access && is_numeric($_access))
|
||||
{
|
||||
$query->where('a.access = ' . (int) $access);
|
||||
$query->where('a.access = ' . (int) $_access);
|
||||
}
|
||||
elseif (ComponentbuilderHelper::checkArray($_access))
|
||||
{
|
||||
// Secure the array for the query
|
||||
$_access = ArrayHelper::toInteger($_access);
|
||||
// Filter by the Access Array.
|
||||
$query->where('a.access IN (' . implode(',', $_access) . ')');
|
||||
}
|
||||
// Implement View Level Access
|
||||
if (!$user->authorise('core.options', 'com_componentbuilder'))
|
||||
@ -162,7 +183,7 @@ class ComponentbuilderModelComponents_custom_admin_views extends JModelList
|
||||
|
||||
// Add the list ordering clause.
|
||||
$orderCol = $this->state->get('list.ordering', 'a.id');
|
||||
$orderDirn = $this->state->get('list.direction', 'asc');
|
||||
$orderDirn = $this->state->get('list.direction', 'desc');
|
||||
if ($orderCol != '')
|
||||
{
|
||||
$query->order($db->escape($orderCol . ' ' . $orderDirn));
|
||||
@ -183,6 +204,18 @@ class ComponentbuilderModelComponents_custom_admin_views extends JModelList
|
||||
$id .= ':' . $this->getState('filter.id');
|
||||
$id .= ':' . $this->getState('filter.search');
|
||||
$id .= ':' . $this->getState('filter.published');
|
||||
// Check if the value is an array
|
||||
$_access = $this->getState('filter.access');
|
||||
if (ComponentbuilderHelper::checkArray($_access))
|
||||
{
|
||||
$id .= ':' . implode(':', $_access);
|
||||
}
|
||||
// Check if this is only an number or string
|
||||
elseif (is_numeric($_access)
|
||||
|| ComponentbuilderHelper::checkString($_access))
|
||||
{
|
||||
$id .= ':' . $_access;
|
||||
}
|
||||
$id .= ':' . $this->getState('filter.ordering');
|
||||
$id .= ':' . $this->getState('filter.created_by');
|
||||
$id .= ':' . $this->getState('filter.modified_by');
|
||||
|
@ -26,6 +26,7 @@ class ComponentbuilderModelComponents_dashboard extends JModelList
|
||||
$config['filter_fields'] = array(
|
||||
'a.id','id',
|
||||
'a.published','published',
|
||||
'a.access','access',
|
||||
'a.ordering','ordering',
|
||||
'a.created_by','created_by',
|
||||
'a.modified_by','modified_by'
|
||||
@ -34,11 +35,17 @@ class ComponentbuilderModelComponents_dashboard extends JModelList
|
||||
|
||||
parent::__construct($config);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Method to auto-populate the model state.
|
||||
*
|
||||
* Note. Calling getState in this method will result in recursion.
|
||||
*
|
||||
* @param string $ordering An optional ordering field.
|
||||
* @param string $direction An optional direction (asc|desc).
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
*/
|
||||
protected function populateState($ordering = null, $direction = null)
|
||||
{
|
||||
@ -48,27 +55,33 @@ class ComponentbuilderModelComponents_dashboard extends JModelList
|
||||
if ($layout = $app->input->get('layout'))
|
||||
{
|
||||
$this->context .= '.' . $layout;
|
||||
}
|
||||
|
||||
|
||||
$sorting = $this->getUserStateFromRequest($this->context . '.filter.sorting', 'filter_sorting', 0, 'int');
|
||||
$this->setState('filter.sorting', $sorting);
|
||||
|
||||
$access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int');
|
||||
$this->setState('filter.access', $access);
|
||||
|
||||
$search = $this->getUserStateFromRequest($this->context . '.filter.search', 'filter_search');
|
||||
}
|
||||
|
||||
// Check if the form was submitted
|
||||
$formSubmited = $app->input->post->get('form_submited');
|
||||
|
||||
$access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int');
|
||||
if ($formSubmited)
|
||||
{
|
||||
$access = $app->input->post->get('access');
|
||||
$this->setState('filter.access', $access);
|
||||
}
|
||||
|
||||
$published = $this->getUserStateFromRequest($this->context . '.filter.published', 'filter_published', '');
|
||||
$this->setState('filter.published', $published);
|
||||
|
||||
$created_by = $this->getUserStateFromRequest($this->context . '.filter.created_by', 'filter_created_by', '');
|
||||
$this->setState('filter.created_by', $created_by);
|
||||
|
||||
$created = $this->getUserStateFromRequest($this->context . '.filter.created', 'filter_created');
|
||||
$this->setState('filter.created', $created);
|
||||
|
||||
$sorting = $this->getUserStateFromRequest($this->context . '.filter.sorting', 'filter_sorting', 0, 'int');
|
||||
$this->setState('filter.sorting', $sorting);
|
||||
|
||||
$search = $this->getUserStateFromRequest($this->context . '.filter.search', 'filter_search');
|
||||
$this->setState('filter.search', $search);
|
||||
|
||||
$published = $this->getUserStateFromRequest($this->context . '.filter.published', 'filter_published', '');
|
||||
$this->setState('filter.published', $published);
|
||||
|
||||
$created_by = $this->getUserStateFromRequest($this->context . '.filter.created_by', 'filter_created_by', '');
|
||||
$this->setState('filter.created_by', $created_by);
|
||||
|
||||
$created = $this->getUserStateFromRequest($this->context . '.filter.created', 'filter_created');
|
||||
$this->setState('filter.created', $created);
|
||||
|
||||
// List state information.
|
||||
parent::populateState($ordering, $direction);
|
||||
}
|
||||
@ -149,9 +162,17 @@ class ComponentbuilderModelComponents_dashboard extends JModelList
|
||||
$query->select('ag.title AS access_level');
|
||||
$query->join('LEFT', '#__viewlevels AS ag ON ag.id = a.access');
|
||||
// Filter by access level.
|
||||
if ($access = $this->getState('filter.access'))
|
||||
$_access = $this->getState('filter.access');
|
||||
if ($_access && is_numeric($_access))
|
||||
{
|
||||
$query->where('a.access = ' . (int) $access);
|
||||
$query->where('a.access = ' . (int) $_access);
|
||||
}
|
||||
elseif (ComponentbuilderHelper::checkArray($_access))
|
||||
{
|
||||
// Secure the array for the query
|
||||
$_access = ArrayHelper::toInteger($_access);
|
||||
// Filter by the Access Array.
|
||||
$query->where('a.access IN (' . implode(',', $_access) . ')');
|
||||
}
|
||||
// Implement View Level Access
|
||||
if (!$user->authorise('core.options', 'com_componentbuilder'))
|
||||
@ -162,7 +183,7 @@ class ComponentbuilderModelComponents_dashboard extends JModelList
|
||||
|
||||
// Add the list ordering clause.
|
||||
$orderCol = $this->state->get('list.ordering', 'a.id');
|
||||
$orderDirn = $this->state->get('list.direction', 'asc');
|
||||
$orderDirn = $this->state->get('list.direction', 'desc');
|
||||
if ($orderCol != '')
|
||||
{
|
||||
$query->order($db->escape($orderCol . ' ' . $orderDirn));
|
||||
@ -183,6 +204,18 @@ class ComponentbuilderModelComponents_dashboard extends JModelList
|
||||
$id .= ':' . $this->getState('filter.id');
|
||||
$id .= ':' . $this->getState('filter.search');
|
||||
$id .= ':' . $this->getState('filter.published');
|
||||
// Check if the value is an array
|
||||
$_access = $this->getState('filter.access');
|
||||
if (ComponentbuilderHelper::checkArray($_access))
|
||||
{
|
||||
$id .= ':' . implode(':', $_access);
|
||||
}
|
||||
// Check if this is only an number or string
|
||||
elseif (is_numeric($_access)
|
||||
|| ComponentbuilderHelper::checkString($_access))
|
||||
{
|
||||
$id .= ':' . $_access;
|
||||
}
|
||||
$id .= ':' . $this->getState('filter.ordering');
|
||||
$id .= ':' . $this->getState('filter.created_by');
|
||||
$id .= ':' . $this->getState('filter.modified_by');
|
||||
|
@ -26,6 +26,7 @@ class ComponentbuilderModelComponents_files_folders extends JModelList
|
||||
$config['filter_fields'] = array(
|
||||
'a.id','id',
|
||||
'a.published','published',
|
||||
'a.access','access',
|
||||
'a.ordering','ordering',
|
||||
'a.created_by','created_by',
|
||||
'a.modified_by','modified_by'
|
||||
@ -34,11 +35,17 @@ class ComponentbuilderModelComponents_files_folders extends JModelList
|
||||
|
||||
parent::__construct($config);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Method to auto-populate the model state.
|
||||
*
|
||||
* Note. Calling getState in this method will result in recursion.
|
||||
*
|
||||
* @param string $ordering An optional ordering field.
|
||||
* @param string $direction An optional direction (asc|desc).
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
*/
|
||||
protected function populateState($ordering = null, $direction = null)
|
||||
{
|
||||
@ -48,27 +55,33 @@ class ComponentbuilderModelComponents_files_folders extends JModelList
|
||||
if ($layout = $app->input->get('layout'))
|
||||
{
|
||||
$this->context .= '.' . $layout;
|
||||
}
|
||||
|
||||
|
||||
$sorting = $this->getUserStateFromRequest($this->context . '.filter.sorting', 'filter_sorting', 0, 'int');
|
||||
$this->setState('filter.sorting', $sorting);
|
||||
|
||||
$access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int');
|
||||
$this->setState('filter.access', $access);
|
||||
|
||||
$search = $this->getUserStateFromRequest($this->context . '.filter.search', 'filter_search');
|
||||
}
|
||||
|
||||
// Check if the form was submitted
|
||||
$formSubmited = $app->input->post->get('form_submited');
|
||||
|
||||
$access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int');
|
||||
if ($formSubmited)
|
||||
{
|
||||
$access = $app->input->post->get('access');
|
||||
$this->setState('filter.access', $access);
|
||||
}
|
||||
|
||||
$published = $this->getUserStateFromRequest($this->context . '.filter.published', 'filter_published', '');
|
||||
$this->setState('filter.published', $published);
|
||||
|
||||
$created_by = $this->getUserStateFromRequest($this->context . '.filter.created_by', 'filter_created_by', '');
|
||||
$this->setState('filter.created_by', $created_by);
|
||||
|
||||
$created = $this->getUserStateFromRequest($this->context . '.filter.created', 'filter_created');
|
||||
$this->setState('filter.created', $created);
|
||||
|
||||
$sorting = $this->getUserStateFromRequest($this->context . '.filter.sorting', 'filter_sorting', 0, 'int');
|
||||
$this->setState('filter.sorting', $sorting);
|
||||
|
||||
$search = $this->getUserStateFromRequest($this->context . '.filter.search', 'filter_search');
|
||||
$this->setState('filter.search', $search);
|
||||
|
||||
$published = $this->getUserStateFromRequest($this->context . '.filter.published', 'filter_published', '');
|
||||
$this->setState('filter.published', $published);
|
||||
|
||||
$created_by = $this->getUserStateFromRequest($this->context . '.filter.created_by', 'filter_created_by', '');
|
||||
$this->setState('filter.created_by', $created_by);
|
||||
|
||||
$created = $this->getUserStateFromRequest($this->context . '.filter.created', 'filter_created');
|
||||
$this->setState('filter.created', $created);
|
||||
|
||||
// List state information.
|
||||
parent::populateState($ordering, $direction);
|
||||
}
|
||||
@ -149,9 +162,17 @@ class ComponentbuilderModelComponents_files_folders extends JModelList
|
||||
$query->select('ag.title AS access_level');
|
||||
$query->join('LEFT', '#__viewlevels AS ag ON ag.id = a.access');
|
||||
// Filter by access level.
|
||||
if ($access = $this->getState('filter.access'))
|
||||
$_access = $this->getState('filter.access');
|
||||
if ($_access && is_numeric($_access))
|
||||
{
|
||||
$query->where('a.access = ' . (int) $access);
|
||||
$query->where('a.access = ' . (int) $_access);
|
||||
}
|
||||
elseif (ComponentbuilderHelper::checkArray($_access))
|
||||
{
|
||||
// Secure the array for the query
|
||||
$_access = ArrayHelper::toInteger($_access);
|
||||
// Filter by the Access Array.
|
||||
$query->where('a.access IN (' . implode(',', $_access) . ')');
|
||||
}
|
||||
// Implement View Level Access
|
||||
if (!$user->authorise('core.options', 'com_componentbuilder'))
|
||||
@ -162,7 +183,7 @@ class ComponentbuilderModelComponents_files_folders extends JModelList
|
||||
|
||||
// Add the list ordering clause.
|
||||
$orderCol = $this->state->get('list.ordering', 'a.id');
|
||||
$orderDirn = $this->state->get('list.direction', 'asc');
|
||||
$orderDirn = $this->state->get('list.direction', 'desc');
|
||||
if ($orderCol != '')
|
||||
{
|
||||
$query->order($db->escape($orderCol . ' ' . $orderDirn));
|
||||
@ -183,6 +204,18 @@ class ComponentbuilderModelComponents_files_folders extends JModelList
|
||||
$id .= ':' . $this->getState('filter.id');
|
||||
$id .= ':' . $this->getState('filter.search');
|
||||
$id .= ':' . $this->getState('filter.published');
|
||||
// Check if the value is an array
|
||||
$_access = $this->getState('filter.access');
|
||||
if (ComponentbuilderHelper::checkArray($_access))
|
||||
{
|
||||
$id .= ':' . implode(':', $_access);
|
||||
}
|
||||
// Check if this is only an number or string
|
||||
elseif (is_numeric($_access)
|
||||
|| ComponentbuilderHelper::checkString($_access))
|
||||
{
|
||||
$id .= ':' . $_access;
|
||||
}
|
||||
$id .= ':' . $this->getState('filter.ordering');
|
||||
$id .= ':' . $this->getState('filter.created_by');
|
||||
$id .= ':' . $this->getState('filter.modified_by');
|
||||
|
@ -26,6 +26,7 @@ class ComponentbuilderModelComponents_modules extends JModelList
|
||||
$config['filter_fields'] = array(
|
||||
'a.id','id',
|
||||
'a.published','published',
|
||||
'a.access','access',
|
||||
'a.ordering','ordering',
|
||||
'a.created_by','created_by',
|
||||
'a.modified_by','modified_by'
|
||||
@ -34,11 +35,17 @@ class ComponentbuilderModelComponents_modules extends JModelList
|
||||
|
||||
parent::__construct($config);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Method to auto-populate the model state.
|
||||
*
|
||||
* Note. Calling getState in this method will result in recursion.
|
||||
*
|
||||
* @param string $ordering An optional ordering field.
|
||||
* @param string $direction An optional direction (asc|desc).
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
*/
|
||||
protected function populateState($ordering = null, $direction = null)
|
||||
{
|
||||
@ -48,27 +55,33 @@ class ComponentbuilderModelComponents_modules extends JModelList
|
||||
if ($layout = $app->input->get('layout'))
|
||||
{
|
||||
$this->context .= '.' . $layout;
|
||||
}
|
||||
|
||||
|
||||
$sorting = $this->getUserStateFromRequest($this->context . '.filter.sorting', 'filter_sorting', 0, 'int');
|
||||
$this->setState('filter.sorting', $sorting);
|
||||
|
||||
$access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int');
|
||||
$this->setState('filter.access', $access);
|
||||
|
||||
$search = $this->getUserStateFromRequest($this->context . '.filter.search', 'filter_search');
|
||||
}
|
||||
|
||||
// Check if the form was submitted
|
||||
$formSubmited = $app->input->post->get('form_submited');
|
||||
|
||||
$access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int');
|
||||
if ($formSubmited)
|
||||
{
|
||||
$access = $app->input->post->get('access');
|
||||
$this->setState('filter.access', $access);
|
||||
}
|
||||
|
||||
$published = $this->getUserStateFromRequest($this->context . '.filter.published', 'filter_published', '');
|
||||
$this->setState('filter.published', $published);
|
||||
|
||||
$created_by = $this->getUserStateFromRequest($this->context . '.filter.created_by', 'filter_created_by', '');
|
||||
$this->setState('filter.created_by', $created_by);
|
||||
|
||||
$created = $this->getUserStateFromRequest($this->context . '.filter.created', 'filter_created');
|
||||
$this->setState('filter.created', $created);
|
||||
|
||||
$sorting = $this->getUserStateFromRequest($this->context . '.filter.sorting', 'filter_sorting', 0, 'int');
|
||||
$this->setState('filter.sorting', $sorting);
|
||||
|
||||
$search = $this->getUserStateFromRequest($this->context . '.filter.search', 'filter_search');
|
||||
$this->setState('filter.search', $search);
|
||||
|
||||
$published = $this->getUserStateFromRequest($this->context . '.filter.published', 'filter_published', '');
|
||||
$this->setState('filter.published', $published);
|
||||
|
||||
$created_by = $this->getUserStateFromRequest($this->context . '.filter.created_by', 'filter_created_by', '');
|
||||
$this->setState('filter.created_by', $created_by);
|
||||
|
||||
$created = $this->getUserStateFromRequest($this->context . '.filter.created', 'filter_created');
|
||||
$this->setState('filter.created', $created);
|
||||
|
||||
// List state information.
|
||||
parent::populateState($ordering, $direction);
|
||||
}
|
||||
@ -149,9 +162,17 @@ class ComponentbuilderModelComponents_modules extends JModelList
|
||||
$query->select('ag.title AS access_level');
|
||||
$query->join('LEFT', '#__viewlevels AS ag ON ag.id = a.access');
|
||||
// Filter by access level.
|
||||
if ($access = $this->getState('filter.access'))
|
||||
$_access = $this->getState('filter.access');
|
||||
if ($_access && is_numeric($_access))
|
||||
{
|
||||
$query->where('a.access = ' . (int) $access);
|
||||
$query->where('a.access = ' . (int) $_access);
|
||||
}
|
||||
elseif (ComponentbuilderHelper::checkArray($_access))
|
||||
{
|
||||
// Secure the array for the query
|
||||
$_access = ArrayHelper::toInteger($_access);
|
||||
// Filter by the Access Array.
|
||||
$query->where('a.access IN (' . implode(',', $_access) . ')');
|
||||
}
|
||||
// Implement View Level Access
|
||||
if (!$user->authorise('core.options', 'com_componentbuilder'))
|
||||
@ -162,7 +183,7 @@ class ComponentbuilderModelComponents_modules extends JModelList
|
||||
|
||||
// Add the list ordering clause.
|
||||
$orderCol = $this->state->get('list.ordering', 'a.id');
|
||||
$orderDirn = $this->state->get('list.direction', 'asc');
|
||||
$orderDirn = $this->state->get('list.direction', 'desc');
|
||||
if ($orderCol != '')
|
||||
{
|
||||
$query->order($db->escape($orderCol . ' ' . $orderDirn));
|
||||
@ -183,6 +204,18 @@ class ComponentbuilderModelComponents_modules extends JModelList
|
||||
$id .= ':' . $this->getState('filter.id');
|
||||
$id .= ':' . $this->getState('filter.search');
|
||||
$id .= ':' . $this->getState('filter.published');
|
||||
// Check if the value is an array
|
||||
$_access = $this->getState('filter.access');
|
||||
if (ComponentbuilderHelper::checkArray($_access))
|
||||
{
|
||||
$id .= ':' . implode(':', $_access);
|
||||
}
|
||||
// Check if this is only an number or string
|
||||
elseif (is_numeric($_access)
|
||||
|| ComponentbuilderHelper::checkString($_access))
|
||||
{
|
||||
$id .= ':' . $_access;
|
||||
}
|
||||
$id .= ':' . $this->getState('filter.ordering');
|
||||
$id .= ':' . $this->getState('filter.created_by');
|
||||
$id .= ':' . $this->getState('filter.modified_by');
|
||||
|
@ -26,6 +26,7 @@ class ComponentbuilderModelComponents_mysql_tweaks extends JModelList
|
||||
$config['filter_fields'] = array(
|
||||
'a.id','id',
|
||||
'a.published','published',
|
||||
'a.access','access',
|
||||
'a.ordering','ordering',
|
||||
'a.created_by','created_by',
|
||||
'a.modified_by','modified_by'
|
||||
@ -34,11 +35,17 @@ class ComponentbuilderModelComponents_mysql_tweaks extends JModelList
|
||||
|
||||
parent::__construct($config);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Method to auto-populate the model state.
|
||||
*
|
||||
* Note. Calling getState in this method will result in recursion.
|
||||
*
|
||||
* @param string $ordering An optional ordering field.
|
||||
* @param string $direction An optional direction (asc|desc).
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
*/
|
||||
protected function populateState($ordering = null, $direction = null)
|
||||
{
|
||||
@ -48,27 +55,33 @@ class ComponentbuilderModelComponents_mysql_tweaks extends JModelList
|
||||
if ($layout = $app->input->get('layout'))
|
||||
{
|
||||
$this->context .= '.' . $layout;
|
||||
}
|
||||
|
||||
|
||||
$sorting = $this->getUserStateFromRequest($this->context . '.filter.sorting', 'filter_sorting', 0, 'int');
|
||||
$this->setState('filter.sorting', $sorting);
|
||||
|
||||
$access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int');
|
||||
$this->setState('filter.access', $access);
|
||||
|
||||
$search = $this->getUserStateFromRequest($this->context . '.filter.search', 'filter_search');
|
||||
}
|
||||
|
||||
// Check if the form was submitted
|
||||
$formSubmited = $app->input->post->get('form_submited');
|
||||
|
||||
$access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int');
|
||||
if ($formSubmited)
|
||||
{
|
||||
$access = $app->input->post->get('access');
|
||||
$this->setState('filter.access', $access);
|
||||
}
|
||||
|
||||
$published = $this->getUserStateFromRequest($this->context . '.filter.published', 'filter_published', '');
|
||||
$this->setState('filter.published', $published);
|
||||
|
||||
$created_by = $this->getUserStateFromRequest($this->context . '.filter.created_by', 'filter_created_by', '');
|
||||
$this->setState('filter.created_by', $created_by);
|
||||
|
||||
$created = $this->getUserStateFromRequest($this->context . '.filter.created', 'filter_created');
|
||||
$this->setState('filter.created', $created);
|
||||
|
||||
$sorting = $this->getUserStateFromRequest($this->context . '.filter.sorting', 'filter_sorting', 0, 'int');
|
||||
$this->setState('filter.sorting', $sorting);
|
||||
|
||||
$search = $this->getUserStateFromRequest($this->context . '.filter.search', 'filter_search');
|
||||
$this->setState('filter.search', $search);
|
||||
|
||||
$published = $this->getUserStateFromRequest($this->context . '.filter.published', 'filter_published', '');
|
||||
$this->setState('filter.published', $published);
|
||||
|
||||
$created_by = $this->getUserStateFromRequest($this->context . '.filter.created_by', 'filter_created_by', '');
|
||||
$this->setState('filter.created_by', $created_by);
|
||||
|
||||
$created = $this->getUserStateFromRequest($this->context . '.filter.created', 'filter_created');
|
||||
$this->setState('filter.created', $created);
|
||||
|
||||
// List state information.
|
||||
parent::populateState($ordering, $direction);
|
||||
}
|
||||
@ -149,9 +162,17 @@ class ComponentbuilderModelComponents_mysql_tweaks extends JModelList
|
||||
$query->select('ag.title AS access_level');
|
||||
$query->join('LEFT', '#__viewlevels AS ag ON ag.id = a.access');
|
||||
// Filter by access level.
|
||||
if ($access = $this->getState('filter.access'))
|
||||
$_access = $this->getState('filter.access');
|
||||
if ($_access && is_numeric($_access))
|
||||
{
|
||||
$query->where('a.access = ' . (int) $access);
|
||||
$query->where('a.access = ' . (int) $_access);
|
||||
}
|
||||
elseif (ComponentbuilderHelper::checkArray($_access))
|
||||
{
|
||||
// Secure the array for the query
|
||||
$_access = ArrayHelper::toInteger($_access);
|
||||
// Filter by the Access Array.
|
||||
$query->where('a.access IN (' . implode(',', $_access) . ')');
|
||||
}
|
||||
// Implement View Level Access
|
||||
if (!$user->authorise('core.options', 'com_componentbuilder'))
|
||||
@ -162,7 +183,7 @@ class ComponentbuilderModelComponents_mysql_tweaks extends JModelList
|
||||
|
||||
// Add the list ordering clause.
|
||||
$orderCol = $this->state->get('list.ordering', 'a.id');
|
||||
$orderDirn = $this->state->get('list.direction', 'asc');
|
||||
$orderDirn = $this->state->get('list.direction', 'desc');
|
||||
if ($orderCol != '')
|
||||
{
|
||||
$query->order($db->escape($orderCol . ' ' . $orderDirn));
|
||||
@ -183,6 +204,18 @@ class ComponentbuilderModelComponents_mysql_tweaks extends JModelList
|
||||
$id .= ':' . $this->getState('filter.id');
|
||||
$id .= ':' . $this->getState('filter.search');
|
||||
$id .= ':' . $this->getState('filter.published');
|
||||
// Check if the value is an array
|
||||
$_access = $this->getState('filter.access');
|
||||
if (ComponentbuilderHelper::checkArray($_access))
|
||||
{
|
||||
$id .= ':' . implode(':', $_access);
|
||||
}
|
||||
// Check if this is only an number or string
|
||||
elseif (is_numeric($_access)
|
||||
|| ComponentbuilderHelper::checkString($_access))
|
||||
{
|
||||
$id .= ':' . $_access;
|
||||
}
|
||||
$id .= ':' . $this->getState('filter.ordering');
|
||||
$id .= ':' . $this->getState('filter.created_by');
|
||||
$id .= ':' . $this->getState('filter.modified_by');
|
||||
|
@ -26,6 +26,7 @@ class ComponentbuilderModelComponents_placeholders extends JModelList
|
||||
$config['filter_fields'] = array(
|
||||
'a.id','id',
|
||||
'a.published','published',
|
||||
'a.access','access',
|
||||
'a.ordering','ordering',
|
||||
'a.created_by','created_by',
|
||||
'a.modified_by','modified_by'
|
||||
@ -34,11 +35,17 @@ class ComponentbuilderModelComponents_placeholders extends JModelList
|
||||
|
||||
parent::__construct($config);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Method to auto-populate the model state.
|
||||
*
|
||||
* Note. Calling getState in this method will result in recursion.
|
||||
*
|
||||
* @param string $ordering An optional ordering field.
|
||||
* @param string $direction An optional direction (asc|desc).
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
*/
|
||||
protected function populateState($ordering = null, $direction = null)
|
||||
{
|
||||
@ -48,27 +55,33 @@ class ComponentbuilderModelComponents_placeholders extends JModelList
|
||||
if ($layout = $app->input->get('layout'))
|
||||
{
|
||||
$this->context .= '.' . $layout;
|
||||
}
|
||||
|
||||
|
||||
$sorting = $this->getUserStateFromRequest($this->context . '.filter.sorting', 'filter_sorting', 0, 'int');
|
||||
$this->setState('filter.sorting', $sorting);
|
||||
|
||||
$access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int');
|
||||
$this->setState('filter.access', $access);
|
||||
|
||||
$search = $this->getUserStateFromRequest($this->context . '.filter.search', 'filter_search');
|
||||
}
|
||||
|
||||
// Check if the form was submitted
|
||||
$formSubmited = $app->input->post->get('form_submited');
|
||||
|
||||
$access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int');
|
||||
if ($formSubmited)
|
||||
{
|
||||
$access = $app->input->post->get('access');
|
||||
$this->setState('filter.access', $access);
|
||||
}
|
||||
|
||||
$published = $this->getUserStateFromRequest($this->context . '.filter.published', 'filter_published', '');
|
||||
$this->setState('filter.published', $published);
|
||||
|
||||
$created_by = $this->getUserStateFromRequest($this->context . '.filter.created_by', 'filter_created_by', '');
|
||||
$this->setState('filter.created_by', $created_by);
|
||||
|
||||
$created = $this->getUserStateFromRequest($this->context . '.filter.created', 'filter_created');
|
||||
$this->setState('filter.created', $created);
|
||||
|
||||
$sorting = $this->getUserStateFromRequest($this->context . '.filter.sorting', 'filter_sorting', 0, 'int');
|
||||
$this->setState('filter.sorting', $sorting);
|
||||
|
||||
$search = $this->getUserStateFromRequest($this->context . '.filter.search', 'filter_search');
|
||||
$this->setState('filter.search', $search);
|
||||
|
||||
$published = $this->getUserStateFromRequest($this->context . '.filter.published', 'filter_published', '');
|
||||
$this->setState('filter.published', $published);
|
||||
|
||||
$created_by = $this->getUserStateFromRequest($this->context . '.filter.created_by', 'filter_created_by', '');
|
||||
$this->setState('filter.created_by', $created_by);
|
||||
|
||||
$created = $this->getUserStateFromRequest($this->context . '.filter.created', 'filter_created');
|
||||
$this->setState('filter.created', $created);
|
||||
|
||||
// List state information.
|
||||
parent::populateState($ordering, $direction);
|
||||
}
|
||||
@ -149,9 +162,17 @@ class ComponentbuilderModelComponents_placeholders extends JModelList
|
||||
$query->select('ag.title AS access_level');
|
||||
$query->join('LEFT', '#__viewlevels AS ag ON ag.id = a.access');
|
||||
// Filter by access level.
|
||||
if ($access = $this->getState('filter.access'))
|
||||
$_access = $this->getState('filter.access');
|
||||
if ($_access && is_numeric($_access))
|
||||
{
|
||||
$query->where('a.access = ' . (int) $access);
|
||||
$query->where('a.access = ' . (int) $_access);
|
||||
}
|
||||
elseif (ComponentbuilderHelper::checkArray($_access))
|
||||
{
|
||||
// Secure the array for the query
|
||||
$_access = ArrayHelper::toInteger($_access);
|
||||
// Filter by the Access Array.
|
||||
$query->where('a.access IN (' . implode(',', $_access) . ')');
|
||||
}
|
||||
// Implement View Level Access
|
||||
if (!$user->authorise('core.options', 'com_componentbuilder'))
|
||||
@ -162,7 +183,7 @@ class ComponentbuilderModelComponents_placeholders extends JModelList
|
||||
|
||||
// Add the list ordering clause.
|
||||
$orderCol = $this->state->get('list.ordering', 'a.id');
|
||||
$orderDirn = $this->state->get('list.direction', 'asc');
|
||||
$orderDirn = $this->state->get('list.direction', 'desc');
|
||||
if ($orderCol != '')
|
||||
{
|
||||
$query->order($db->escape($orderCol . ' ' . $orderDirn));
|
||||
@ -183,6 +204,18 @@ class ComponentbuilderModelComponents_placeholders extends JModelList
|
||||
$id .= ':' . $this->getState('filter.id');
|
||||
$id .= ':' . $this->getState('filter.search');
|
||||
$id .= ':' . $this->getState('filter.published');
|
||||
// Check if the value is an array
|
||||
$_access = $this->getState('filter.access');
|
||||
if (ComponentbuilderHelper::checkArray($_access))
|
||||
{
|
||||
$id .= ':' . implode(':', $_access);
|
||||
}
|
||||
// Check if this is only an number or string
|
||||
elseif (is_numeric($_access)
|
||||
|| ComponentbuilderHelper::checkString($_access))
|
||||
{
|
||||
$id .= ':' . $_access;
|
||||
}
|
||||
$id .= ':' . $this->getState('filter.ordering');
|
||||
$id .= ':' . $this->getState('filter.created_by');
|
||||
$id .= ':' . $this->getState('filter.modified_by');
|
||||
|
@ -26,6 +26,7 @@ class ComponentbuilderModelComponents_plugins extends JModelList
|
||||
$config['filter_fields'] = array(
|
||||
'a.id','id',
|
||||
'a.published','published',
|
||||
'a.access','access',
|
||||
'a.ordering','ordering',
|
||||
'a.created_by','created_by',
|
||||
'a.modified_by','modified_by'
|
||||
@ -34,11 +35,17 @@ class ComponentbuilderModelComponents_plugins extends JModelList
|
||||
|
||||
parent::__construct($config);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Method to auto-populate the model state.
|
||||
*
|
||||
* Note. Calling getState in this method will result in recursion.
|
||||
*
|
||||
* @param string $ordering An optional ordering field.
|
||||
* @param string $direction An optional direction (asc|desc).
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
*/
|
||||
protected function populateState($ordering = null, $direction = null)
|
||||
{
|
||||
@ -48,27 +55,33 @@ class ComponentbuilderModelComponents_plugins extends JModelList
|
||||
if ($layout = $app->input->get('layout'))
|
||||
{
|
||||
$this->context .= '.' . $layout;
|
||||
}
|
||||
|
||||
|
||||
$sorting = $this->getUserStateFromRequest($this->context . '.filter.sorting', 'filter_sorting', 0, 'int');
|
||||
$this->setState('filter.sorting', $sorting);
|
||||
|
||||
$access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int');
|
||||
$this->setState('filter.access', $access);
|
||||
|
||||
$search = $this->getUserStateFromRequest($this->context . '.filter.search', 'filter_search');
|
||||
}
|
||||
|
||||
// Check if the form was submitted
|
||||
$formSubmited = $app->input->post->get('form_submited');
|
||||
|
||||
$access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int');
|
||||
if ($formSubmited)
|
||||
{
|
||||
$access = $app->input->post->get('access');
|
||||
$this->setState('filter.access', $access);
|
||||
}
|
||||
|
||||
$published = $this->getUserStateFromRequest($this->context . '.filter.published', 'filter_published', '');
|
||||
$this->setState('filter.published', $published);
|
||||
|
||||
$created_by = $this->getUserStateFromRequest($this->context . '.filter.created_by', 'filter_created_by', '');
|
||||
$this->setState('filter.created_by', $created_by);
|
||||
|
||||
$created = $this->getUserStateFromRequest($this->context . '.filter.created', 'filter_created');
|
||||
$this->setState('filter.created', $created);
|
||||
|
||||
$sorting = $this->getUserStateFromRequest($this->context . '.filter.sorting', 'filter_sorting', 0, 'int');
|
||||
$this->setState('filter.sorting', $sorting);
|
||||
|
||||
$search = $this->getUserStateFromRequest($this->context . '.filter.search', 'filter_search');
|
||||
$this->setState('filter.search', $search);
|
||||
|
||||
$published = $this->getUserStateFromRequest($this->context . '.filter.published', 'filter_published', '');
|
||||
$this->setState('filter.published', $published);
|
||||
|
||||
$created_by = $this->getUserStateFromRequest($this->context . '.filter.created_by', 'filter_created_by', '');
|
||||
$this->setState('filter.created_by', $created_by);
|
||||
|
||||
$created = $this->getUserStateFromRequest($this->context . '.filter.created', 'filter_created');
|
||||
$this->setState('filter.created', $created);
|
||||
|
||||
// List state information.
|
||||
parent::populateState($ordering, $direction);
|
||||
}
|
||||
@ -149,9 +162,17 @@ class ComponentbuilderModelComponents_plugins extends JModelList
|
||||
$query->select('ag.title AS access_level');
|
||||
$query->join('LEFT', '#__viewlevels AS ag ON ag.id = a.access');
|
||||
// Filter by access level.
|
||||
if ($access = $this->getState('filter.access'))
|
||||
$_access = $this->getState('filter.access');
|
||||
if ($_access && is_numeric($_access))
|
||||
{
|
||||
$query->where('a.access = ' . (int) $access);
|
||||
$query->where('a.access = ' . (int) $_access);
|
||||
}
|
||||
elseif (ComponentbuilderHelper::checkArray($_access))
|
||||
{
|
||||
// Secure the array for the query
|
||||
$_access = ArrayHelper::toInteger($_access);
|
||||
// Filter by the Access Array.
|
||||
$query->where('a.access IN (' . implode(',', $_access) . ')');
|
||||
}
|
||||
// Implement View Level Access
|
||||
if (!$user->authorise('core.options', 'com_componentbuilder'))
|
||||
@ -162,7 +183,7 @@ class ComponentbuilderModelComponents_plugins extends JModelList
|
||||
|
||||
// Add the list ordering clause.
|
||||
$orderCol = $this->state->get('list.ordering', 'a.id');
|
||||
$orderDirn = $this->state->get('list.direction', 'asc');
|
||||
$orderDirn = $this->state->get('list.direction', 'desc');
|
||||
if ($orderCol != '')
|
||||
{
|
||||
$query->order($db->escape($orderCol . ' ' . $orderDirn));
|
||||
@ -183,6 +204,18 @@ class ComponentbuilderModelComponents_plugins extends JModelList
|
||||
$id .= ':' . $this->getState('filter.id');
|
||||
$id .= ':' . $this->getState('filter.search');
|
||||
$id .= ':' . $this->getState('filter.published');
|
||||
// Check if the value is an array
|
||||
$_access = $this->getState('filter.access');
|
||||
if (ComponentbuilderHelper::checkArray($_access))
|
||||
{
|
||||
$id .= ':' . implode(':', $_access);
|
||||
}
|
||||
// Check if this is only an number or string
|
||||
elseif (is_numeric($_access)
|
||||
|| ComponentbuilderHelper::checkString($_access))
|
||||
{
|
||||
$id .= ':' . $_access;
|
||||
}
|
||||
$id .= ':' . $this->getState('filter.ordering');
|
||||
$id .= ':' . $this->getState('filter.created_by');
|
||||
$id .= ':' . $this->getState('filter.modified_by');
|
||||
|
@ -26,6 +26,7 @@ class ComponentbuilderModelComponents_site_views extends JModelList
|
||||
$config['filter_fields'] = array(
|
||||
'a.id','id',
|
||||
'a.published','published',
|
||||
'a.access','access',
|
||||
'a.ordering','ordering',
|
||||
'a.created_by','created_by',
|
||||
'a.modified_by','modified_by'
|
||||
@ -34,11 +35,17 @@ class ComponentbuilderModelComponents_site_views extends JModelList
|
||||
|
||||
parent::__construct($config);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Method to auto-populate the model state.
|
||||
*
|
||||
* Note. Calling getState in this method will result in recursion.
|
||||
*
|
||||
* @param string $ordering An optional ordering field.
|
||||
* @param string $direction An optional direction (asc|desc).
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
*/
|
||||
protected function populateState($ordering = null, $direction = null)
|
||||
{
|
||||
@ -48,27 +55,33 @@ class ComponentbuilderModelComponents_site_views extends JModelList
|
||||
if ($layout = $app->input->get('layout'))
|
||||
{
|
||||
$this->context .= '.' . $layout;
|
||||
}
|
||||
|
||||
|
||||
$sorting = $this->getUserStateFromRequest($this->context . '.filter.sorting', 'filter_sorting', 0, 'int');
|
||||
$this->setState('filter.sorting', $sorting);
|
||||
|
||||
$access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int');
|
||||
$this->setState('filter.access', $access);
|
||||
|
||||
$search = $this->getUserStateFromRequest($this->context . '.filter.search', 'filter_search');
|
||||
}
|
||||
|
||||
// Check if the form was submitted
|
||||
$formSubmited = $app->input->post->get('form_submited');
|
||||
|
||||
$access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int');
|
||||
if ($formSubmited)
|
||||
{
|
||||
$access = $app->input->post->get('access');
|
||||
$this->setState('filter.access', $access);
|
||||
}
|
||||
|
||||
$published = $this->getUserStateFromRequest($this->context . '.filter.published', 'filter_published', '');
|
||||
$this->setState('filter.published', $published);
|
||||
|
||||
$created_by = $this->getUserStateFromRequest($this->context . '.filter.created_by', 'filter_created_by', '');
|
||||
$this->setState('filter.created_by', $created_by);
|
||||
|
||||
$created = $this->getUserStateFromRequest($this->context . '.filter.created', 'filter_created');
|
||||
$this->setState('filter.created', $created);
|
||||
|
||||
$sorting = $this->getUserStateFromRequest($this->context . '.filter.sorting', 'filter_sorting', 0, 'int');
|
||||
$this->setState('filter.sorting', $sorting);
|
||||
|
||||
$search = $this->getUserStateFromRequest($this->context . '.filter.search', 'filter_search');
|
||||
$this->setState('filter.search', $search);
|
||||
|
||||
$published = $this->getUserStateFromRequest($this->context . '.filter.published', 'filter_published', '');
|
||||
$this->setState('filter.published', $published);
|
||||
|
||||
$created_by = $this->getUserStateFromRequest($this->context . '.filter.created_by', 'filter_created_by', '');
|
||||
$this->setState('filter.created_by', $created_by);
|
||||
|
||||
$created = $this->getUserStateFromRequest($this->context . '.filter.created', 'filter_created');
|
||||
$this->setState('filter.created', $created);
|
||||
|
||||
// List state information.
|
||||
parent::populateState($ordering, $direction);
|
||||
}
|
||||
@ -149,9 +162,17 @@ class ComponentbuilderModelComponents_site_views extends JModelList
|
||||
$query->select('ag.title AS access_level');
|
||||
$query->join('LEFT', '#__viewlevels AS ag ON ag.id = a.access');
|
||||
// Filter by access level.
|
||||
if ($access = $this->getState('filter.access'))
|
||||
$_access = $this->getState('filter.access');
|
||||
if ($_access && is_numeric($_access))
|
||||
{
|
||||
$query->where('a.access = ' . (int) $access);
|
||||
$query->where('a.access = ' . (int) $_access);
|
||||
}
|
||||
elseif (ComponentbuilderHelper::checkArray($_access))
|
||||
{
|
||||
// Secure the array for the query
|
||||
$_access = ArrayHelper::toInteger($_access);
|
||||
// Filter by the Access Array.
|
||||
$query->where('a.access IN (' . implode(',', $_access) . ')');
|
||||
}
|
||||
// Implement View Level Access
|
||||
if (!$user->authorise('core.options', 'com_componentbuilder'))
|
||||
@ -162,7 +183,7 @@ class ComponentbuilderModelComponents_site_views extends JModelList
|
||||
|
||||
// Add the list ordering clause.
|
||||
$orderCol = $this->state->get('list.ordering', 'a.id');
|
||||
$orderDirn = $this->state->get('list.direction', 'asc');
|
||||
$orderDirn = $this->state->get('list.direction', 'desc');
|
||||
if ($orderCol != '')
|
||||
{
|
||||
$query->order($db->escape($orderCol . ' ' . $orderDirn));
|
||||
@ -183,6 +204,18 @@ class ComponentbuilderModelComponents_site_views extends JModelList
|
||||
$id .= ':' . $this->getState('filter.id');
|
||||
$id .= ':' . $this->getState('filter.search');
|
||||
$id .= ':' . $this->getState('filter.published');
|
||||
// Check if the value is an array
|
||||
$_access = $this->getState('filter.access');
|
||||
if (ComponentbuilderHelper::checkArray($_access))
|
||||
{
|
||||
$id .= ':' . implode(':', $_access);
|
||||
}
|
||||
// Check if this is only an number or string
|
||||
elseif (is_numeric($_access)
|
||||
|| ComponentbuilderHelper::checkString($_access))
|
||||
{
|
||||
$id .= ':' . $_access;
|
||||
}
|
||||
$id .= ':' . $this->getState('filter.ordering');
|
||||
$id .= ':' . $this->getState('filter.created_by');
|
||||
$id .= ':' . $this->getState('filter.modified_by');
|
||||
|
@ -26,6 +26,7 @@ class ComponentbuilderModelComponents_updates extends JModelList
|
||||
$config['filter_fields'] = array(
|
||||
'a.id','id',
|
||||
'a.published','published',
|
||||
'a.access','access',
|
||||
'a.ordering','ordering',
|
||||
'a.created_by','created_by',
|
||||
'a.modified_by','modified_by'
|
||||
@ -34,11 +35,17 @@ class ComponentbuilderModelComponents_updates extends JModelList
|
||||
|
||||
parent::__construct($config);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Method to auto-populate the model state.
|
||||
*
|
||||
* Note. Calling getState in this method will result in recursion.
|
||||
*
|
||||
* @param string $ordering An optional ordering field.
|
||||
* @param string $direction An optional direction (asc|desc).
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
*/
|
||||
protected function populateState($ordering = null, $direction = null)
|
||||
{
|
||||
@ -48,27 +55,33 @@ class ComponentbuilderModelComponents_updates extends JModelList
|
||||
if ($layout = $app->input->get('layout'))
|
||||
{
|
||||
$this->context .= '.' . $layout;
|
||||
}
|
||||
|
||||
|
||||
$sorting = $this->getUserStateFromRequest($this->context . '.filter.sorting', 'filter_sorting', 0, 'int');
|
||||
$this->setState('filter.sorting', $sorting);
|
||||
|
||||
$access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int');
|
||||
$this->setState('filter.access', $access);
|
||||
|
||||
$search = $this->getUserStateFromRequest($this->context . '.filter.search', 'filter_search');
|
||||
}
|
||||
|
||||
// Check if the form was submitted
|
||||
$formSubmited = $app->input->post->get('form_submited');
|
||||
|
||||
$access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int');
|
||||
if ($formSubmited)
|
||||
{
|
||||
$access = $app->input->post->get('access');
|
||||
$this->setState('filter.access', $access);
|
||||
}
|
||||
|
||||
$published = $this->getUserStateFromRequest($this->context . '.filter.published', 'filter_published', '');
|
||||
$this->setState('filter.published', $published);
|
||||
|
||||
$created_by = $this->getUserStateFromRequest($this->context . '.filter.created_by', 'filter_created_by', '');
|
||||
$this->setState('filter.created_by', $created_by);
|
||||
|
||||
$created = $this->getUserStateFromRequest($this->context . '.filter.created', 'filter_created');
|
||||
$this->setState('filter.created', $created);
|
||||
|
||||
$sorting = $this->getUserStateFromRequest($this->context . '.filter.sorting', 'filter_sorting', 0, 'int');
|
||||
$this->setState('filter.sorting', $sorting);
|
||||
|
||||
$search = $this->getUserStateFromRequest($this->context . '.filter.search', 'filter_search');
|
||||
$this->setState('filter.search', $search);
|
||||
|
||||
$published = $this->getUserStateFromRequest($this->context . '.filter.published', 'filter_published', '');
|
||||
$this->setState('filter.published', $published);
|
||||
|
||||
$created_by = $this->getUserStateFromRequest($this->context . '.filter.created_by', 'filter_created_by', '');
|
||||
$this->setState('filter.created_by', $created_by);
|
||||
|
||||
$created = $this->getUserStateFromRequest($this->context . '.filter.created', 'filter_created');
|
||||
$this->setState('filter.created', $created);
|
||||
|
||||
// List state information.
|
||||
parent::populateState($ordering, $direction);
|
||||
}
|
||||
@ -149,9 +162,17 @@ class ComponentbuilderModelComponents_updates extends JModelList
|
||||
$query->select('ag.title AS access_level');
|
||||
$query->join('LEFT', '#__viewlevels AS ag ON ag.id = a.access');
|
||||
// Filter by access level.
|
||||
if ($access = $this->getState('filter.access'))
|
||||
$_access = $this->getState('filter.access');
|
||||
if ($_access && is_numeric($_access))
|
||||
{
|
||||
$query->where('a.access = ' . (int) $access);
|
||||
$query->where('a.access = ' . (int) $_access);
|
||||
}
|
||||
elseif (ComponentbuilderHelper::checkArray($_access))
|
||||
{
|
||||
// Secure the array for the query
|
||||
$_access = ArrayHelper::toInteger($_access);
|
||||
// Filter by the Access Array.
|
||||
$query->where('a.access IN (' . implode(',', $_access) . ')');
|
||||
}
|
||||
// Implement View Level Access
|
||||
if (!$user->authorise('core.options', 'com_componentbuilder'))
|
||||
@ -162,7 +183,7 @@ class ComponentbuilderModelComponents_updates extends JModelList
|
||||
|
||||
// Add the list ordering clause.
|
||||
$orderCol = $this->state->get('list.ordering', 'a.id');
|
||||
$orderDirn = $this->state->get('list.direction', 'asc');
|
||||
$orderDirn = $this->state->get('list.direction', 'desc');
|
||||
if ($orderCol != '')
|
||||
{
|
||||
$query->order($db->escape($orderCol . ' ' . $orderDirn));
|
||||
@ -183,6 +204,18 @@ class ComponentbuilderModelComponents_updates extends JModelList
|
||||
$id .= ':' . $this->getState('filter.id');
|
||||
$id .= ':' . $this->getState('filter.search');
|
||||
$id .= ':' . $this->getState('filter.published');
|
||||
// Check if the value is an array
|
||||
$_access = $this->getState('filter.access');
|
||||
if (ComponentbuilderHelper::checkArray($_access))
|
||||
{
|
||||
$id .= ':' . implode(':', $_access);
|
||||
}
|
||||
// Check if this is only an number or string
|
||||
elseif (is_numeric($_access)
|
||||
|| ComponentbuilderHelper::checkString($_access))
|
||||
{
|
||||
$id .= ':' . $_access;
|
||||
}
|
||||
$id .= ':' . $this->getState('filter.ordering');
|
||||
$id .= ':' . $this->getState('filter.created_by');
|
||||
$id .= ':' . $this->getState('filter.modified_by');
|
||||
|
@ -26,25 +26,32 @@ class ComponentbuilderModelCustom_admin_views extends JModelList
|
||||
$config['filter_fields'] = array(
|
||||
'a.id','id',
|
||||
'a.published','published',
|
||||
'a.access','access',
|
||||
'a.ordering','ordering',
|
||||
'a.created_by','created_by',
|
||||
'a.modified_by','modified_by',
|
||||
'g.name','main_get',
|
||||
'a.add_php_ajax','add_php_ajax',
|
||||
'a.add_custom_button','add_custom_button',
|
||||
'a.system_name','system_name',
|
||||
'a.name','name',
|
||||
'a.description','description',
|
||||
'g.name',
|
||||
'a.add_php_ajax','add_php_ajax',
|
||||
'a.add_custom_button','add_custom_button'
|
||||
'a.description','description'
|
||||
);
|
||||
}
|
||||
|
||||
parent::__construct($config);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Method to auto-populate the model state.
|
||||
*
|
||||
* Note. Calling getState in this method will result in recursion.
|
||||
*
|
||||
* @param string $ordering An optional ordering field.
|
||||
* @param string $direction An optional direction (asc|desc).
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
*/
|
||||
protected function populateState($ordering = null, $direction = null)
|
||||
{
|
||||
@ -54,42 +61,74 @@ class ComponentbuilderModelCustom_admin_views extends JModelList
|
||||
if ($layout = $app->input->get('layout'))
|
||||
{
|
||||
$this->context .= '.' . $layout;
|
||||
}
|
||||
$system_name = $this->getUserStateFromRequest($this->context . '.filter.system_name', 'filter_system_name');
|
||||
$this->setState('filter.system_name', $system_name);
|
||||
}
|
||||
|
||||
$name = $this->getUserStateFromRequest($this->context . '.filter.name', 'filter_name');
|
||||
$this->setState('filter.name', $name);
|
||||
// Check if the form was submitted
|
||||
$formSubmited = $app->input->post->get('form_submited');
|
||||
|
||||
$description = $this->getUserStateFromRequest($this->context . '.filter.description', 'filter_description');
|
||||
$this->setState('filter.description', $description);
|
||||
$access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int');
|
||||
if ($formSubmited)
|
||||
{
|
||||
$access = $app->input->post->get('access');
|
||||
$this->setState('filter.access', $access);
|
||||
}
|
||||
|
||||
$published = $this->getUserStateFromRequest($this->context . '.filter.published', 'filter_published', '');
|
||||
$this->setState('filter.published', $published);
|
||||
|
||||
$created_by = $this->getUserStateFromRequest($this->context . '.filter.created_by', 'filter_created_by', '');
|
||||
$this->setState('filter.created_by', $created_by);
|
||||
|
||||
$created = $this->getUserStateFromRequest($this->context . '.filter.created', 'filter_created');
|
||||
$this->setState('filter.created', $created);
|
||||
|
||||
$sorting = $this->getUserStateFromRequest($this->context . '.filter.sorting', 'filter_sorting', 0, 'int');
|
||||
$this->setState('filter.sorting', $sorting);
|
||||
|
||||
$search = $this->getUserStateFromRequest($this->context . '.filter.search', 'filter_search');
|
||||
$this->setState('filter.search', $search);
|
||||
|
||||
$main_get = $this->getUserStateFromRequest($this->context . '.filter.main_get', 'filter_main_get');
|
||||
$this->setState('filter.main_get', $main_get);
|
||||
if ($formSubmited)
|
||||
{
|
||||
$main_get = $app->input->post->get('main_get');
|
||||
$this->setState('filter.main_get', $main_get);
|
||||
}
|
||||
|
||||
$add_php_ajax = $this->getUserStateFromRequest($this->context . '.filter.add_php_ajax', 'filter_add_php_ajax');
|
||||
$this->setState('filter.add_php_ajax', $add_php_ajax);
|
||||
if ($formSubmited)
|
||||
{
|
||||
$add_php_ajax = $app->input->post->get('add_php_ajax');
|
||||
$this->setState('filter.add_php_ajax', $add_php_ajax);
|
||||
}
|
||||
|
||||
$add_custom_button = $this->getUserStateFromRequest($this->context . '.filter.add_custom_button', 'filter_add_custom_button');
|
||||
$this->setState('filter.add_custom_button', $add_custom_button);
|
||||
|
||||
$sorting = $this->getUserStateFromRequest($this->context . '.filter.sorting', 'filter_sorting', 0, 'int');
|
||||
$this->setState('filter.sorting', $sorting);
|
||||
|
||||
$access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int');
|
||||
$this->setState('filter.access', $access);
|
||||
|
||||
$search = $this->getUserStateFromRequest($this->context . '.filter.search', 'filter_search');
|
||||
$this->setState('filter.search', $search);
|
||||
|
||||
$published = $this->getUserStateFromRequest($this->context . '.filter.published', 'filter_published', '');
|
||||
$this->setState('filter.published', $published);
|
||||
|
||||
$created_by = $this->getUserStateFromRequest($this->context . '.filter.created_by', 'filter_created_by', '');
|
||||
$this->setState('filter.created_by', $created_by);
|
||||
|
||||
$created = $this->getUserStateFromRequest($this->context . '.filter.created', 'filter_created');
|
||||
$this->setState('filter.created', $created);
|
||||
if ($formSubmited)
|
||||
{
|
||||
$add_custom_button = $app->input->post->get('add_custom_button');
|
||||
$this->setState('filter.add_custom_button', $add_custom_button);
|
||||
}
|
||||
|
||||
$system_name = $this->getUserStateFromRequest($this->context . '.filter.system_name', 'filter_system_name');
|
||||
if ($formSubmited)
|
||||
{
|
||||
$system_name = $app->input->post->get('system_name');
|
||||
$this->setState('filter.system_name', $system_name);
|
||||
}
|
||||
|
||||
$name = $this->getUserStateFromRequest($this->context . '.filter.name', 'filter_name');
|
||||
if ($formSubmited)
|
||||
{
|
||||
$name = $app->input->post->get('name');
|
||||
$this->setState('filter.name', $name);
|
||||
}
|
||||
|
||||
$description = $this->getUserStateFromRequest($this->context . '.filter.description', 'filter_description');
|
||||
if ($formSubmited)
|
||||
{
|
||||
$description = $app->input->post->get('description');
|
||||
$this->setState('filter.description', $description);
|
||||
}
|
||||
|
||||
// List state information.
|
||||
parent::populateState($ordering, $direction);
|
||||
@ -220,9 +259,17 @@ class ComponentbuilderModelCustom_admin_views extends JModelList
|
||||
$query->select('ag.title AS access_level');
|
||||
$query->join('LEFT', '#__viewlevels AS ag ON ag.id = a.access');
|
||||
// Filter by access level.
|
||||
if ($access = $this->getState('filter.access'))
|
||||
$_access = $this->getState('filter.access');
|
||||
if ($_access && is_numeric($_access))
|
||||
{
|
||||
$query->where('a.access = ' . (int) $access);
|
||||
$query->where('a.access = ' . (int) $_access);
|
||||
}
|
||||
elseif (ComponentbuilderHelper::checkArray($_access))
|
||||
{
|
||||
// Secure the array for the query
|
||||
$_access = ArrayHelper::toInteger($_access);
|
||||
// Filter by the Access Array.
|
||||
$query->where('a.access IN (' . implode(',', $_access) . ')');
|
||||
}
|
||||
// Implement View Level Access
|
||||
if (!$user->authorise('core.options', 'com_componentbuilder'))
|
||||
@ -245,20 +292,56 @@ class ComponentbuilderModelCustom_admin_views extends JModelList
|
||||
}
|
||||
}
|
||||
|
||||
// Filter by main_get.
|
||||
if ($main_get = $this->getState('filter.main_get'))
|
||||
// Filter by Main_get.
|
||||
$_main_get = $this->getState('filter.main_get');
|
||||
if (is_numeric($_main_get))
|
||||
{
|
||||
$query->where('a.main_get = ' . $db->quote($db->escape($main_get)));
|
||||
if (is_float($_main_get))
|
||||
{
|
||||
$query->where('a.main_get = ' . (float) $_main_get);
|
||||
}
|
||||
else
|
||||
{
|
||||
$query->where('a.main_get = ' . (int) $_main_get);
|
||||
}
|
||||
}
|
||||
elseif (ComponentbuilderHelper::checkString($_main_get))
|
||||
{
|
||||
$query->where('a.main_get = ' . $db->quote($db->escape($_main_get)));
|
||||
}
|
||||
// Filter by Add_php_ajax.
|
||||
if ($add_php_ajax = $this->getState('filter.add_php_ajax'))
|
||||
$_add_php_ajax = $this->getState('filter.add_php_ajax');
|
||||
if (is_numeric($_add_php_ajax))
|
||||
{
|
||||
$query->where('a.add_php_ajax = ' . $db->quote($db->escape($add_php_ajax)));
|
||||
if (is_float($_add_php_ajax))
|
||||
{
|
||||
$query->where('a.add_php_ajax = ' . (float) $_add_php_ajax);
|
||||
}
|
||||
else
|
||||
{
|
||||
$query->where('a.add_php_ajax = ' . (int) $_add_php_ajax);
|
||||
}
|
||||
}
|
||||
elseif (ComponentbuilderHelper::checkString($_add_php_ajax))
|
||||
{
|
||||
$query->where('a.add_php_ajax = ' . $db->quote($db->escape($_add_php_ajax)));
|
||||
}
|
||||
// Filter by Add_custom_button.
|
||||
if ($add_custom_button = $this->getState('filter.add_custom_button'))
|
||||
$_add_custom_button = $this->getState('filter.add_custom_button');
|
||||
if (is_numeric($_add_custom_button))
|
||||
{
|
||||
$query->where('a.add_custom_button = ' . $db->quote($db->escape($add_custom_button)));
|
||||
if (is_float($_add_custom_button))
|
||||
{
|
||||
$query->where('a.add_custom_button = ' . (float) $_add_custom_button);
|
||||
}
|
||||
else
|
||||
{
|
||||
$query->where('a.add_custom_button = ' . (int) $_add_custom_button);
|
||||
}
|
||||
}
|
||||
elseif (ComponentbuilderHelper::checkString($_add_custom_button))
|
||||
{
|
||||
$query->where('a.add_custom_button = ' . $db->quote($db->escape($_add_custom_button)));
|
||||
}
|
||||
|
||||
// Add the list ordering clause.
|
||||
@ -430,15 +513,27 @@ class ComponentbuilderModelCustom_admin_views extends JModelList
|
||||
$id .= ':' . $this->getState('filter.id');
|
||||
$id .= ':' . $this->getState('filter.search');
|
||||
$id .= ':' . $this->getState('filter.published');
|
||||
// Check if the value is an array
|
||||
$_access = $this->getState('filter.access');
|
||||
if (ComponentbuilderHelper::checkArray($_access))
|
||||
{
|
||||
$id .= ':' . implode(':', $_access);
|
||||
}
|
||||
// Check if this is only an number or string
|
||||
elseif (is_numeric($_access)
|
||||
|| ComponentbuilderHelper::checkString($_access))
|
||||
{
|
||||
$id .= ':' . $_access;
|
||||
}
|
||||
$id .= ':' . $this->getState('filter.ordering');
|
||||
$id .= ':' . $this->getState('filter.created_by');
|
||||
$id .= ':' . $this->getState('filter.modified_by');
|
||||
$id .= ':' . $this->getState('filter.system_name');
|
||||
$id .= ':' . $this->getState('filter.name');
|
||||
$id .= ':' . $this->getState('filter.description');
|
||||
$id .= ':' . $this->getState('filter.main_get');
|
||||
$id .= ':' . $this->getState('filter.add_php_ajax');
|
||||
$id .= ':' . $this->getState('filter.add_custom_button');
|
||||
$id .= ':' . $this->getState('filter.add_custom_button');
|
||||
$id .= ':' . $this->getState('filter.system_name');
|
||||
$id .= ':' . $this->getState('filter.name');
|
||||
$id .= ':' . $this->getState('filter.description');
|
||||
|
||||
return parent::getStoreId($id);
|
||||
}
|
||||
|
@ -26,24 +26,31 @@ class ComponentbuilderModelCustom_codes extends JModelList
|
||||
$config['filter_fields'] = array(
|
||||
'a.id','id',
|
||||
'a.published','published',
|
||||
'a.access','access',
|
||||
'a.ordering','ordering',
|
||||
'a.created_by','created_by',
|
||||
'a.modified_by','modified_by',
|
||||
'g.system_name',
|
||||
'a.path','path',
|
||||
'g.system_name','component',
|
||||
'a.target','target',
|
||||
'a.type','type',
|
||||
'a.comment_type','comment_type'
|
||||
'a.comment_type','comment_type',
|
||||
'a.path','path'
|
||||
);
|
||||
}
|
||||
|
||||
parent::__construct($config);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Method to auto-populate the model state.
|
||||
*
|
||||
* Note. Calling getState in this method will result in recursion.
|
||||
*
|
||||
* @param string $ordering An optional ordering field.
|
||||
* @param string $direction An optional direction (asc|desc).
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
*/
|
||||
protected function populateState($ordering = null, $direction = null)
|
||||
{
|
||||
@ -53,39 +60,67 @@ class ComponentbuilderModelCustom_codes extends JModelList
|
||||
if ($layout = $app->input->get('layout'))
|
||||
{
|
||||
$this->context .= '.' . $layout;
|
||||
}
|
||||
$component = $this->getUserStateFromRequest($this->context . '.filter.component', 'filter_component');
|
||||
$this->setState('filter.component', $component);
|
||||
}
|
||||
|
||||
$path = $this->getUserStateFromRequest($this->context . '.filter.path', 'filter_path');
|
||||
$this->setState('filter.path', $path);
|
||||
// Check if the form was submitted
|
||||
$formSubmited = $app->input->post->get('form_submited');
|
||||
|
||||
$access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int');
|
||||
if ($formSubmited)
|
||||
{
|
||||
$access = $app->input->post->get('access');
|
||||
$this->setState('filter.access', $access);
|
||||
}
|
||||
|
||||
$published = $this->getUserStateFromRequest($this->context . '.filter.published', 'filter_published', '');
|
||||
$this->setState('filter.published', $published);
|
||||
|
||||
$created_by = $this->getUserStateFromRequest($this->context . '.filter.created_by', 'filter_created_by', '');
|
||||
$this->setState('filter.created_by', $created_by);
|
||||
|
||||
$created = $this->getUserStateFromRequest($this->context . '.filter.created', 'filter_created');
|
||||
$this->setState('filter.created', $created);
|
||||
|
||||
$sorting = $this->getUserStateFromRequest($this->context . '.filter.sorting', 'filter_sorting', 0, 'int');
|
||||
$this->setState('filter.sorting', $sorting);
|
||||
|
||||
$search = $this->getUserStateFromRequest($this->context . '.filter.search', 'filter_search');
|
||||
$this->setState('filter.search', $search);
|
||||
|
||||
$component = $this->getUserStateFromRequest($this->context . '.filter.component', 'filter_component');
|
||||
if ($formSubmited)
|
||||
{
|
||||
$component = $app->input->post->get('component');
|
||||
$this->setState('filter.component', $component);
|
||||
}
|
||||
|
||||
$target = $this->getUserStateFromRequest($this->context . '.filter.target', 'filter_target');
|
||||
$this->setState('filter.target', $target);
|
||||
if ($formSubmited)
|
||||
{
|
||||
$target = $app->input->post->get('target');
|
||||
$this->setState('filter.target', $target);
|
||||
}
|
||||
|
||||
$type = $this->getUserStateFromRequest($this->context . '.filter.type', 'filter_type');
|
||||
$this->setState('filter.type', $type);
|
||||
if ($formSubmited)
|
||||
{
|
||||
$type = $app->input->post->get('type');
|
||||
$this->setState('filter.type', $type);
|
||||
}
|
||||
|
||||
$comment_type = $this->getUserStateFromRequest($this->context . '.filter.comment_type', 'filter_comment_type');
|
||||
$this->setState('filter.comment_type', $comment_type);
|
||||
|
||||
$sorting = $this->getUserStateFromRequest($this->context . '.filter.sorting', 'filter_sorting', 0, 'int');
|
||||
$this->setState('filter.sorting', $sorting);
|
||||
|
||||
$access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int');
|
||||
$this->setState('filter.access', $access);
|
||||
|
||||
$search = $this->getUserStateFromRequest($this->context . '.filter.search', 'filter_search');
|
||||
$this->setState('filter.search', $search);
|
||||
|
||||
$published = $this->getUserStateFromRequest($this->context . '.filter.published', 'filter_published', '');
|
||||
$this->setState('filter.published', $published);
|
||||
|
||||
$created_by = $this->getUserStateFromRequest($this->context . '.filter.created_by', 'filter_created_by', '');
|
||||
$this->setState('filter.created_by', $created_by);
|
||||
|
||||
$created = $this->getUserStateFromRequest($this->context . '.filter.created', 'filter_created');
|
||||
$this->setState('filter.created', $created);
|
||||
if ($formSubmited)
|
||||
{
|
||||
$comment_type = $app->input->post->get('comment_type');
|
||||
$this->setState('filter.comment_type', $comment_type);
|
||||
}
|
||||
|
||||
$path = $this->getUserStateFromRequest($this->context . '.filter.path', 'filter_path');
|
||||
if ($formSubmited)
|
||||
{
|
||||
$path = $app->input->post->get('path');
|
||||
$this->setState('filter.path', $path);
|
||||
}
|
||||
|
||||
// List state information.
|
||||
parent::populateState($ordering, $direction);
|
||||
@ -248,9 +283,17 @@ class ComponentbuilderModelCustom_codes extends JModelList
|
||||
$query->select('ag.title AS access_level');
|
||||
$query->join('LEFT', '#__viewlevels AS ag ON ag.id = a.access');
|
||||
// Filter by access level.
|
||||
if ($access = $this->getState('filter.access'))
|
||||
$_access = $this->getState('filter.access');
|
||||
if ($_access && is_numeric($_access))
|
||||
{
|
||||
$query->where('a.access = ' . (int) $access);
|
||||
$query->where('a.access = ' . (int) $_access);
|
||||
}
|
||||
elseif (ComponentbuilderHelper::checkArray($_access))
|
||||
{
|
||||
// Secure the array for the query
|
||||
$_access = ArrayHelper::toInteger($_access);
|
||||
// Filter by the Access Array.
|
||||
$query->where('a.access IN (' . implode(',', $_access) . ')');
|
||||
}
|
||||
// Implement View Level Access
|
||||
if (!$user->authorise('core.options', 'com_componentbuilder'))
|
||||
@ -273,25 +316,73 @@ class ComponentbuilderModelCustom_codes extends JModelList
|
||||
}
|
||||
}
|
||||
|
||||
// Filter by component.
|
||||
if ($component = $this->getState('filter.component'))
|
||||
// Filter by Component.
|
||||
$_component = $this->getState('filter.component');
|
||||
if (is_numeric($_component))
|
||||
{
|
||||
$query->where('a.component = ' . $db->quote($db->escape($component)));
|
||||
if (is_float($_component))
|
||||
{
|
||||
$query->where('a.component = ' . (float) $_component);
|
||||
}
|
||||
else
|
||||
{
|
||||
$query->where('a.component = ' . (int) $_component);
|
||||
}
|
||||
}
|
||||
elseif (ComponentbuilderHelper::checkString($_component))
|
||||
{
|
||||
$query->where('a.component = ' . $db->quote($db->escape($_component)));
|
||||
}
|
||||
// Filter by Target.
|
||||
if ($target = $this->getState('filter.target'))
|
||||
$_target = $this->getState('filter.target');
|
||||
if (is_numeric($_target))
|
||||
{
|
||||
$query->where('a.target = ' . $db->quote($db->escape($target)));
|
||||
if (is_float($_target))
|
||||
{
|
||||
$query->where('a.target = ' . (float) $_target);
|
||||
}
|
||||
else
|
||||
{
|
||||
$query->where('a.target = ' . (int) $_target);
|
||||
}
|
||||
}
|
||||
elseif (ComponentbuilderHelper::checkString($_target))
|
||||
{
|
||||
$query->where('a.target = ' . $db->quote($db->escape($_target)));
|
||||
}
|
||||
// Filter by Type.
|
||||
if ($type = $this->getState('filter.type'))
|
||||
$_type = $this->getState('filter.type');
|
||||
if (is_numeric($_type))
|
||||
{
|
||||
$query->where('a.type = ' . $db->quote($db->escape($type)));
|
||||
if (is_float($_type))
|
||||
{
|
||||
$query->where('a.type = ' . (float) $_type);
|
||||
}
|
||||
else
|
||||
{
|
||||
$query->where('a.type = ' . (int) $_type);
|
||||
}
|
||||
}
|
||||
elseif (ComponentbuilderHelper::checkString($_type))
|
||||
{
|
||||
$query->where('a.type = ' . $db->quote($db->escape($_type)));
|
||||
}
|
||||
// Filter by Comment_type.
|
||||
if ($comment_type = $this->getState('filter.comment_type'))
|
||||
$_comment_type = $this->getState('filter.comment_type');
|
||||
if (is_numeric($_comment_type))
|
||||
{
|
||||
$query->where('a.comment_type = ' . $db->quote($db->escape($comment_type)));
|
||||
if (is_float($_comment_type))
|
||||
{
|
||||
$query->where('a.comment_type = ' . (float) $_comment_type);
|
||||
}
|
||||
else
|
||||
{
|
||||
$query->where('a.comment_type = ' . (int) $_comment_type);
|
||||
}
|
||||
}
|
||||
elseif (ComponentbuilderHelper::checkString($_comment_type))
|
||||
{
|
||||
$query->where('a.comment_type = ' . $db->quote($db->escape($_comment_type)));
|
||||
}
|
||||
|
||||
// Add the list ordering clause.
|
||||
@ -458,14 +549,26 @@ class ComponentbuilderModelCustom_codes extends JModelList
|
||||
$id .= ':' . $this->getState('filter.id');
|
||||
$id .= ':' . $this->getState('filter.search');
|
||||
$id .= ':' . $this->getState('filter.published');
|
||||
// Check if the value is an array
|
||||
$_access = $this->getState('filter.access');
|
||||
if (ComponentbuilderHelper::checkArray($_access))
|
||||
{
|
||||
$id .= ':' . implode(':', $_access);
|
||||
}
|
||||
// Check if this is only an number or string
|
||||
elseif (is_numeric($_access)
|
||||
|| ComponentbuilderHelper::checkString($_access))
|
||||
{
|
||||
$id .= ':' . $_access;
|
||||
}
|
||||
$id .= ':' . $this->getState('filter.ordering');
|
||||
$id .= ':' . $this->getState('filter.created_by');
|
||||
$id .= ':' . $this->getState('filter.modified_by');
|
||||
$id .= ':' . $this->getState('filter.component');
|
||||
$id .= ':' . $this->getState('filter.path');
|
||||
$id .= ':' . $this->getState('filter.target');
|
||||
$id .= ':' . $this->getState('filter.type');
|
||||
$id .= ':' . $this->getState('filter.comment_type');
|
||||
$id .= ':' . $this->getState('filter.comment_type');
|
||||
$id .= ':' . $this->getState('filter.path');
|
||||
|
||||
return parent::getStoreId($id);
|
||||
}
|
||||
|
@ -26,22 +26,29 @@ class ComponentbuilderModelDynamic_gets extends JModelList
|
||||
$config['filter_fields'] = array(
|
||||
'a.id','id',
|
||||
'a.published','published',
|
||||
'a.access','access',
|
||||
'a.ordering','ordering',
|
||||
'a.created_by','created_by',
|
||||
'a.modified_by','modified_by',
|
||||
'a.name','name',
|
||||
'a.main_source','main_source',
|
||||
'a.gettype','gettype'
|
||||
'a.gettype','gettype',
|
||||
'a.name','name'
|
||||
);
|
||||
}
|
||||
|
||||
parent::__construct($config);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Method to auto-populate the model state.
|
||||
*
|
||||
* Note. Calling getState in this method will result in recursion.
|
||||
*
|
||||
* @param string $ordering An optional ordering field.
|
||||
* @param string $direction An optional direction (asc|desc).
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
*/
|
||||
protected function populateState($ordering = null, $direction = null)
|
||||
{
|
||||
@ -51,33 +58,53 @@ class ComponentbuilderModelDynamic_gets extends JModelList
|
||||
if ($layout = $app->input->get('layout'))
|
||||
{
|
||||
$this->context .= '.' . $layout;
|
||||
}
|
||||
$name = $this->getUserStateFromRequest($this->context . '.filter.name', 'filter_name');
|
||||
$this->setState('filter.name', $name);
|
||||
}
|
||||
|
||||
// Check if the form was submitted
|
||||
$formSubmited = $app->input->post->get('form_submited');
|
||||
|
||||
$access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int');
|
||||
if ($formSubmited)
|
||||
{
|
||||
$access = $app->input->post->get('access');
|
||||
$this->setState('filter.access', $access);
|
||||
}
|
||||
|
||||
$published = $this->getUserStateFromRequest($this->context . '.filter.published', 'filter_published', '');
|
||||
$this->setState('filter.published', $published);
|
||||
|
||||
$created_by = $this->getUserStateFromRequest($this->context . '.filter.created_by', 'filter_created_by', '');
|
||||
$this->setState('filter.created_by', $created_by);
|
||||
|
||||
$created = $this->getUserStateFromRequest($this->context . '.filter.created', 'filter_created');
|
||||
$this->setState('filter.created', $created);
|
||||
|
||||
$sorting = $this->getUserStateFromRequest($this->context . '.filter.sorting', 'filter_sorting', 0, 'int');
|
||||
$this->setState('filter.sorting', $sorting);
|
||||
|
||||
$search = $this->getUserStateFromRequest($this->context . '.filter.search', 'filter_search');
|
||||
$this->setState('filter.search', $search);
|
||||
|
||||
$main_source = $this->getUserStateFromRequest($this->context . '.filter.main_source', 'filter_main_source');
|
||||
$this->setState('filter.main_source', $main_source);
|
||||
if ($formSubmited)
|
||||
{
|
||||
$main_source = $app->input->post->get('main_source');
|
||||
$this->setState('filter.main_source', $main_source);
|
||||
}
|
||||
|
||||
$gettype = $this->getUserStateFromRequest($this->context . '.filter.gettype', 'filter_gettype');
|
||||
$this->setState('filter.gettype', $gettype);
|
||||
|
||||
$sorting = $this->getUserStateFromRequest($this->context . '.filter.sorting', 'filter_sorting', 0, 'int');
|
||||
$this->setState('filter.sorting', $sorting);
|
||||
|
||||
$access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int');
|
||||
$this->setState('filter.access', $access);
|
||||
|
||||
$search = $this->getUserStateFromRequest($this->context . '.filter.search', 'filter_search');
|
||||
$this->setState('filter.search', $search);
|
||||
|
||||
$published = $this->getUserStateFromRequest($this->context . '.filter.published', 'filter_published', '');
|
||||
$this->setState('filter.published', $published);
|
||||
|
||||
$created_by = $this->getUserStateFromRequest($this->context . '.filter.created_by', 'filter_created_by', '');
|
||||
$this->setState('filter.created_by', $created_by);
|
||||
|
||||
$created = $this->getUserStateFromRequest($this->context . '.filter.created', 'filter_created');
|
||||
$this->setState('filter.created', $created);
|
||||
if ($formSubmited)
|
||||
{
|
||||
$gettype = $app->input->post->get('gettype');
|
||||
$this->setState('filter.gettype', $gettype);
|
||||
}
|
||||
|
||||
$name = $this->getUserStateFromRequest($this->context . '.filter.name', 'filter_name');
|
||||
if ($formSubmited)
|
||||
{
|
||||
$name = $app->input->post->get('name');
|
||||
$this->setState('filter.name', $name);
|
||||
}
|
||||
|
||||
// List state information.
|
||||
parent::populateState($ordering, $direction);
|
||||
@ -208,9 +235,17 @@ class ComponentbuilderModelDynamic_gets extends JModelList
|
||||
$query->select('ag.title AS access_level');
|
||||
$query->join('LEFT', '#__viewlevels AS ag ON ag.id = a.access');
|
||||
// Filter by access level.
|
||||
if ($access = $this->getState('filter.access'))
|
||||
$_access = $this->getState('filter.access');
|
||||
if ($_access && is_numeric($_access))
|
||||
{
|
||||
$query->where('a.access = ' . (int) $access);
|
||||
$query->where('a.access = ' . (int) $_access);
|
||||
}
|
||||
elseif (ComponentbuilderHelper::checkArray($_access))
|
||||
{
|
||||
// Secure the array for the query
|
||||
$_access = ArrayHelper::toInteger($_access);
|
||||
// Filter by the Access Array.
|
||||
$query->where('a.access IN (' . implode(',', $_access) . ')');
|
||||
}
|
||||
// Implement View Level Access
|
||||
if (!$user->authorise('core.options', 'com_componentbuilder'))
|
||||
@ -234,14 +269,38 @@ class ComponentbuilderModelDynamic_gets extends JModelList
|
||||
}
|
||||
|
||||
// Filter by Main_source.
|
||||
if ($main_source = $this->getState('filter.main_source'))
|
||||
$_main_source = $this->getState('filter.main_source');
|
||||
if (is_numeric($_main_source))
|
||||
{
|
||||
$query->where('a.main_source = ' . $db->quote($db->escape($main_source)));
|
||||
if (is_float($_main_source))
|
||||
{
|
||||
$query->where('a.main_source = ' . (float) $_main_source);
|
||||
}
|
||||
else
|
||||
{
|
||||
$query->where('a.main_source = ' . (int) $_main_source);
|
||||
}
|
||||
}
|
||||
elseif (ComponentbuilderHelper::checkString($_main_source))
|
||||
{
|
||||
$query->where('a.main_source = ' . $db->quote($db->escape($_main_source)));
|
||||
}
|
||||
// Filter by Gettype.
|
||||
if ($gettype = $this->getState('filter.gettype'))
|
||||
$_gettype = $this->getState('filter.gettype');
|
||||
if (is_numeric($_gettype))
|
||||
{
|
||||
$query->where('a.gettype = ' . $db->quote($db->escape($gettype)));
|
||||
if (is_float($_gettype))
|
||||
{
|
||||
$query->where('a.gettype = ' . (float) $_gettype);
|
||||
}
|
||||
else
|
||||
{
|
||||
$query->where('a.gettype = ' . (int) $_gettype);
|
||||
}
|
||||
}
|
||||
elseif (ComponentbuilderHelper::checkString($_gettype))
|
||||
{
|
||||
$query->where('a.gettype = ' . $db->quote($db->escape($_gettype)));
|
||||
}
|
||||
|
||||
// Add the list ordering clause.
|
||||
@ -405,12 +464,24 @@ class ComponentbuilderModelDynamic_gets extends JModelList
|
||||
$id .= ':' . $this->getState('filter.id');
|
||||
$id .= ':' . $this->getState('filter.search');
|
||||
$id .= ':' . $this->getState('filter.published');
|
||||
// Check if the value is an array
|
||||
$_access = $this->getState('filter.access');
|
||||
if (ComponentbuilderHelper::checkArray($_access))
|
||||
{
|
||||
$id .= ':' . implode(':', $_access);
|
||||
}
|
||||
// Check if this is only an number or string
|
||||
elseif (is_numeric($_access)
|
||||
|| ComponentbuilderHelper::checkString($_access))
|
||||
{
|
||||
$id .= ':' . $_access;
|
||||
}
|
||||
$id .= ':' . $this->getState('filter.ordering');
|
||||
$id .= ':' . $this->getState('filter.created_by');
|
||||
$id .= ':' . $this->getState('filter.modified_by');
|
||||
$id .= ':' . $this->getState('filter.name');
|
||||
$id .= ':' . $this->getState('filter.main_source');
|
||||
$id .= ':' . $this->getState('filter.gettype');
|
||||
$id .= ':' . $this->getState('filter.gettype');
|
||||
$id .= ':' . $this->getState('filter.name');
|
||||
|
||||
return parent::getStoreId($id);
|
||||
}
|
||||
|
@ -26,28 +26,35 @@ class ComponentbuilderModelFields extends JModelList
|
||||
$config['filter_fields'] = array(
|
||||
'a.id','id',
|
||||
'a.published','published',
|
||||
'a.access','access',
|
||||
'a.ordering','ordering',
|
||||
'a.created_by','created_by',
|
||||
'a.modified_by','modified_by',
|
||||
'a.name','name',
|
||||
'g.name',
|
||||
'g.name','fieldtype',
|
||||
'a.datatype','datatype',
|
||||
'a.indexes','indexes',
|
||||
'a.null_switch','null_switch',
|
||||
'a.store','store',
|
||||
'c.title','category_title',
|
||||
'c.id', 'category_id',
|
||||
'a.catid', 'catid'
|
||||
'a.catid','catid',
|
||||
'a.name','name'
|
||||
);
|
||||
}
|
||||
|
||||
parent::__construct($config);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Method to auto-populate the model state.
|
||||
*
|
||||
* Note. Calling getState in this method will result in recursion.
|
||||
*
|
||||
* @param string $ordering An optional ordering field.
|
||||
* @param string $direction An optional direction (asc|desc).
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
*/
|
||||
protected function populateState($ordering = null, $direction = null)
|
||||
{
|
||||
@ -57,24 +64,67 @@ class ComponentbuilderModelFields extends JModelList
|
||||
if ($layout = $app->input->get('layout'))
|
||||
{
|
||||
$this->context .= '.' . $layout;
|
||||
}
|
||||
$name = $this->getUserStateFromRequest($this->context . '.filter.name', 'filter_name');
|
||||
$this->setState('filter.name', $name);
|
||||
}
|
||||
|
||||
// Check if the form was submitted
|
||||
$formSubmited = $app->input->post->get('form_submited');
|
||||
|
||||
$access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int');
|
||||
if ($formSubmited)
|
||||
{
|
||||
$access = $app->input->post->get('access');
|
||||
$this->setState('filter.access', $access);
|
||||
}
|
||||
|
||||
$published = $this->getUserStateFromRequest($this->context . '.filter.published', 'filter_published', '');
|
||||
$this->setState('filter.published', $published);
|
||||
|
||||
$created_by = $this->getUserStateFromRequest($this->context . '.filter.created_by', 'filter_created_by', '');
|
||||
$this->setState('filter.created_by', $created_by);
|
||||
|
||||
$created = $this->getUserStateFromRequest($this->context . '.filter.created', 'filter_created');
|
||||
$this->setState('filter.created', $created);
|
||||
|
||||
$sorting = $this->getUserStateFromRequest($this->context . '.filter.sorting', 'filter_sorting', 0, 'int');
|
||||
$this->setState('filter.sorting', $sorting);
|
||||
|
||||
$search = $this->getUserStateFromRequest($this->context . '.filter.search', 'filter_search');
|
||||
$this->setState('filter.search', $search);
|
||||
|
||||
$fieldtype = $this->getUserStateFromRequest($this->context . '.filter.fieldtype', 'filter_fieldtype');
|
||||
$this->setState('filter.fieldtype', $fieldtype);
|
||||
if ($formSubmited)
|
||||
{
|
||||
$fieldtype = $app->input->post->get('fieldtype');
|
||||
$this->setState('filter.fieldtype', $fieldtype);
|
||||
}
|
||||
|
||||
$datatype = $this->getUserStateFromRequest($this->context . '.filter.datatype', 'filter_datatype');
|
||||
$this->setState('filter.datatype', $datatype);
|
||||
if ($formSubmited)
|
||||
{
|
||||
$datatype = $app->input->post->get('datatype');
|
||||
$this->setState('filter.datatype', $datatype);
|
||||
}
|
||||
|
||||
$indexes = $this->getUserStateFromRequest($this->context . '.filter.indexes', 'filter_indexes');
|
||||
$this->setState('filter.indexes', $indexes);
|
||||
if ($formSubmited)
|
||||
{
|
||||
$indexes = $app->input->post->get('indexes');
|
||||
$this->setState('filter.indexes', $indexes);
|
||||
}
|
||||
|
||||
$null_switch = $this->getUserStateFromRequest($this->context . '.filter.null_switch', 'filter_null_switch');
|
||||
$this->setState('filter.null_switch', $null_switch);
|
||||
if ($formSubmited)
|
||||
{
|
||||
$null_switch = $app->input->post->get('null_switch');
|
||||
$this->setState('filter.null_switch', $null_switch);
|
||||
}
|
||||
|
||||
$store = $this->getUserStateFromRequest($this->context . '.filter.store', 'filter_store');
|
||||
$this->setState('filter.store', $store);
|
||||
if ($formSubmited)
|
||||
{
|
||||
$store = $app->input->post->get('store');
|
||||
$this->setState('filter.store', $store);
|
||||
}
|
||||
|
||||
$category = $app->getUserStateFromRequest($this->context . '.filter.category', 'filter_category');
|
||||
$this->setState('filter.category', $category);
|
||||
@ -82,26 +132,19 @@ class ComponentbuilderModelFields extends JModelList
|
||||
$categoryId = $this->getUserStateFromRequest($this->context . '.filter.category_id', 'filter_category_id');
|
||||
$this->setState('filter.category_id', $categoryId);
|
||||
|
||||
$catid = $app->getUserStateFromRequest($this->context . '.filter.catid', 'filter_catid');
|
||||
$this->setState('filter.catid', $catid);
|
||||
|
||||
$sorting = $this->getUserStateFromRequest($this->context . '.filter.sorting', 'filter_sorting', 0, 'int');
|
||||
$this->setState('filter.sorting', $sorting);
|
||||
|
||||
$access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int');
|
||||
$this->setState('filter.access', $access);
|
||||
|
||||
$search = $this->getUserStateFromRequest($this->context . '.filter.search', 'filter_search');
|
||||
$this->setState('filter.search', $search);
|
||||
|
||||
$published = $this->getUserStateFromRequest($this->context . '.filter.published', 'filter_published', '');
|
||||
$this->setState('filter.published', $published);
|
||||
|
||||
$created_by = $this->getUserStateFromRequest($this->context . '.filter.created_by', 'filter_created_by', '');
|
||||
$this->setState('filter.created_by', $created_by);
|
||||
|
||||
$created = $this->getUserStateFromRequest($this->context . '.filter.created', 'filter_created');
|
||||
$this->setState('filter.created', $created);
|
||||
$catid = $this->getUserStateFromRequest($this->context . '.filter.catid', 'filter_catid');
|
||||
if ($formSubmited)
|
||||
{
|
||||
$catid = $app->input->post->get('catid');
|
||||
$this->setState('filter.catid', $catid);
|
||||
}
|
||||
|
||||
$name = $this->getUserStateFromRequest($this->context . '.filter.name', 'filter_name');
|
||||
if ($formSubmited)
|
||||
{
|
||||
$name = $app->input->post->get('name');
|
||||
$this->setState('filter.name', $name);
|
||||
}
|
||||
|
||||
// List state information.
|
||||
parent::populateState($ordering, $direction);
|
||||
@ -287,9 +330,17 @@ class ComponentbuilderModelFields extends JModelList
|
||||
$query->select('ag.title AS access_level');
|
||||
$query->join('LEFT', '#__viewlevels AS ag ON ag.id = a.access');
|
||||
// Filter by access level.
|
||||
if ($access = $this->getState('filter.access'))
|
||||
$_access = $this->getState('filter.access');
|
||||
if ($_access && is_numeric($_access))
|
||||
{
|
||||
$query->where('a.access = ' . (int) $access);
|
||||
$query->where('a.access = ' . (int) $_access);
|
||||
}
|
||||
elseif (ComponentbuilderHelper::checkArray($_access))
|
||||
{
|
||||
// Secure the array for the query
|
||||
$_access = ArrayHelper::toInteger($_access);
|
||||
// Filter by the Access Array.
|
||||
$query->where('a.access IN (' . implode(',', $_access) . ')');
|
||||
}
|
||||
// Implement View Level Access
|
||||
if (!$user->authorise('core.options', 'com_componentbuilder'))
|
||||
@ -312,30 +363,90 @@ class ComponentbuilderModelFields extends JModelList
|
||||
}
|
||||
}
|
||||
|
||||
// Filter by fieldtype.
|
||||
if ($fieldtype = $this->getState('filter.fieldtype'))
|
||||
// Filter by Fieldtype.
|
||||
$_fieldtype = $this->getState('filter.fieldtype');
|
||||
if (is_numeric($_fieldtype))
|
||||
{
|
||||
$query->where('a.fieldtype = ' . $db->quote($db->escape($fieldtype)));
|
||||
if (is_float($_fieldtype))
|
||||
{
|
||||
$query->where('a.fieldtype = ' . (float) $_fieldtype);
|
||||
}
|
||||
else
|
||||
{
|
||||
$query->where('a.fieldtype = ' . (int) $_fieldtype);
|
||||
}
|
||||
}
|
||||
elseif (ComponentbuilderHelper::checkString($_fieldtype))
|
||||
{
|
||||
$query->where('a.fieldtype = ' . $db->quote($db->escape($_fieldtype)));
|
||||
}
|
||||
// Filter by Datatype.
|
||||
if ($datatype = $this->getState('filter.datatype'))
|
||||
$_datatype = $this->getState('filter.datatype');
|
||||
if (is_numeric($_datatype))
|
||||
{
|
||||
$query->where('a.datatype = ' . $db->quote($db->escape($datatype)));
|
||||
if (is_float($_datatype))
|
||||
{
|
||||
$query->where('a.datatype = ' . (float) $_datatype);
|
||||
}
|
||||
else
|
||||
{
|
||||
$query->where('a.datatype = ' . (int) $_datatype);
|
||||
}
|
||||
}
|
||||
elseif (ComponentbuilderHelper::checkString($_datatype))
|
||||
{
|
||||
$query->where('a.datatype = ' . $db->quote($db->escape($_datatype)));
|
||||
}
|
||||
// Filter by Indexes.
|
||||
if ($indexes = $this->getState('filter.indexes'))
|
||||
$_indexes = $this->getState('filter.indexes');
|
||||
if (is_numeric($_indexes))
|
||||
{
|
||||
$query->where('a.indexes = ' . $db->quote($db->escape($indexes)));
|
||||
if (is_float($_indexes))
|
||||
{
|
||||
$query->where('a.indexes = ' . (float) $_indexes);
|
||||
}
|
||||
else
|
||||
{
|
||||
$query->where('a.indexes = ' . (int) $_indexes);
|
||||
}
|
||||
}
|
||||
elseif (ComponentbuilderHelper::checkString($_indexes))
|
||||
{
|
||||
$query->where('a.indexes = ' . $db->quote($db->escape($_indexes)));
|
||||
}
|
||||
// Filter by Null_switch.
|
||||
if ($null_switch = $this->getState('filter.null_switch'))
|
||||
$_null_switch = $this->getState('filter.null_switch');
|
||||
if (is_numeric($_null_switch))
|
||||
{
|
||||
$query->where('a.null_switch = ' . $db->quote($db->escape($null_switch)));
|
||||
if (is_float($_null_switch))
|
||||
{
|
||||
$query->where('a.null_switch = ' . (float) $_null_switch);
|
||||
}
|
||||
else
|
||||
{
|
||||
$query->where('a.null_switch = ' . (int) $_null_switch);
|
||||
}
|
||||
}
|
||||
elseif (ComponentbuilderHelper::checkString($_null_switch))
|
||||
{
|
||||
$query->where('a.null_switch = ' . $db->quote($db->escape($_null_switch)));
|
||||
}
|
||||
// Filter by Store.
|
||||
if ($store = $this->getState('filter.store'))
|
||||
$_store = $this->getState('filter.store');
|
||||
if (is_numeric($_store))
|
||||
{
|
||||
$query->where('a.store = ' . $db->quote($db->escape($store)));
|
||||
if (is_float($_store))
|
||||
{
|
||||
$query->where('a.store = ' . (float) $_store);
|
||||
}
|
||||
else
|
||||
{
|
||||
$query->where('a.store = ' . (int) $_store);
|
||||
}
|
||||
}
|
||||
elseif (ComponentbuilderHelper::checkString($_store))
|
||||
{
|
||||
$query->where('a.store = ' . $db->quote($db->escape($_store)));
|
||||
}
|
||||
|
||||
// Filter by a single or group of categories.
|
||||
@ -354,9 +465,9 @@ class ComponentbuilderModelFields extends JModelList
|
||||
}
|
||||
elseif (is_array($categoryId))
|
||||
{
|
||||
ArrayHelper::toInteger($categoryId);
|
||||
$categoryId = ArrayHelper::toInteger($categoryId);
|
||||
$categoryId = implode(',', $categoryId);
|
||||
$query->where('a.category IN (' . $categoryId . ')');
|
||||
$query->where('a.catid IN (' . $categoryId . ')');
|
||||
}
|
||||
|
||||
|
||||
@ -521,18 +632,63 @@ class ComponentbuilderModelFields extends JModelList
|
||||
$id .= ':' . $this->getState('filter.id');
|
||||
$id .= ':' . $this->getState('filter.search');
|
||||
$id .= ':' . $this->getState('filter.published');
|
||||
// Check if the value is an array
|
||||
$_access = $this->getState('filter.access');
|
||||
if (ComponentbuilderHelper::checkArray($_access))
|
||||
{
|
||||
$id .= ':' . implode(':', $_access);
|
||||
}
|
||||
// Check if this is only an number or string
|
||||
elseif (is_numeric($_access)
|
||||
|| ComponentbuilderHelper::checkString($_access))
|
||||
{
|
||||
$id .= ':' . $_access;
|
||||
}
|
||||
$id .= ':' . $this->getState('filter.ordering');
|
||||
$id .= ':' . $this->getState('filter.created_by');
|
||||
$id .= ':' . $this->getState('filter.modified_by');
|
||||
$id .= ':' . $this->getState('filter.name');
|
||||
$id .= ':' . $this->getState('filter.fieldtype');
|
||||
$id .= ':' . $this->getState('filter.datatype');
|
||||
$id .= ':' . $this->getState('filter.indexes');
|
||||
$id .= ':' . $this->getState('filter.null_switch');
|
||||
$id .= ':' . $this->getState('filter.store');
|
||||
$id .= ':' . $this->getState('filter.category');
|
||||
$id .= ':' . $this->getState('filter.category_id');
|
||||
$id .= ':' . $this->getState('filter.catid');
|
||||
// Check if the value is an array
|
||||
$_category = $this->getState('filter.category');
|
||||
if (ComponentbuilderHelper::checkArray($_category))
|
||||
{
|
||||
$id .= ':' . implode(':', $_category);
|
||||
}
|
||||
// Check if this is only an number or string
|
||||
elseif (is_numeric($_category)
|
||||
|| ComponentbuilderHelper::checkString($_category))
|
||||
{
|
||||
$id .= ':' . $_category;
|
||||
}
|
||||
// Check if the value is an array
|
||||
$_category_id = $this->getState('filter.category_id');
|
||||
if (ComponentbuilderHelper::checkArray($_category_id))
|
||||
{
|
||||
$id .= ':' . implode(':', $_category_id);
|
||||
}
|
||||
// Check if this is only an number or string
|
||||
elseif (is_numeric($_category_id)
|
||||
|| ComponentbuilderHelper::checkString($_category_id))
|
||||
{
|
||||
$id .= ':' . $_category_id;
|
||||
}
|
||||
// Check if the value is an array
|
||||
$_catid = $this->getState('filter.catid');
|
||||
if (ComponentbuilderHelper::checkArray($_catid))
|
||||
{
|
||||
$id .= ':' . implode(':', $_catid);
|
||||
}
|
||||
// Check if this is only an number or string
|
||||
elseif (is_numeric($_catid)
|
||||
|| ComponentbuilderHelper::checkString($_catid))
|
||||
{
|
||||
$id .= ':' . $_catid;
|
||||
}
|
||||
$id .= ':' . $this->getState('filter.name');
|
||||
|
||||
return parent::getStoreId($id);
|
||||
}
|
||||
|
71
admin/models/fields/adminviewsfilteraddcustombutton.php
Normal file
71
admin/models/fields/adminviewsfilteraddcustombutton.php
Normal file
@ -0,0 +1,71 @@
|
||||
<?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.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
// import the list field type
|
||||
jimport('joomla.form.helper');
|
||||
JFormHelper::loadFieldClass('list');
|
||||
|
||||
/**
|
||||
* Adminviewsfilteraddcustombutton Form Field class for the Componentbuilder component
|
||||
*/
|
||||
class JFormFieldAdminviewsfilteraddcustombutton extends JFormFieldList
|
||||
{
|
||||
/**
|
||||
* The adminviewsfilteraddcustombutton field type.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $type = 'adminviewsfilteraddcustombutton';
|
||||
|
||||
/**
|
||||
* Method to get a list of options for a list input.
|
||||
*
|
||||
* @return array An array of JHtml options.
|
||||
*/
|
||||
protected function getOptions()
|
||||
{
|
||||
// Get a db connection.
|
||||
$db = JFactory::getDbo();
|
||||
|
||||
// Create a new query object.
|
||||
$query = $db->getQuery(true);
|
||||
|
||||
// Select the text.
|
||||
$query->select($db->quoteName('add_custom_button'));
|
||||
$query->from($db->quoteName('#__componentbuilder_admin_view'));
|
||||
$query->order($db->quoteName('add_custom_button') . ' ASC');
|
||||
|
||||
// Reset the query using our newly populated query object.
|
||||
$db->setQuery($query);
|
||||
|
||||
$results = $db->loadColumn();
|
||||
$_filter = array();
|
||||
$_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_ADD_CUSTOM_BUTTON') . ' -');
|
||||
|
||||
if ($results)
|
||||
{
|
||||
// get admin_viewsmodel
|
||||
$model = ComponentbuilderHelper::getModel('admin_views');
|
||||
$results = array_unique($results);
|
||||
foreach ($results as $add_custom_button)
|
||||
{
|
||||
// Translate the add_custom_button selection
|
||||
$text = $model->selectionTranslation($add_custom_button,'add_custom_button');
|
||||
// Now add the add_custom_button and its text to the options array
|
||||
$_filter[] = JHtml::_('select.option', $add_custom_button, JText::_($text));
|
||||
}
|
||||
}
|
||||
return $_filter;
|
||||
}
|
||||
}
|
71
admin/models/fields/adminviewsfilteraddcustomimport.php
Normal file
71
admin/models/fields/adminviewsfilteraddcustomimport.php
Normal file
@ -0,0 +1,71 @@
|
||||
<?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.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
// import the list field type
|
||||
jimport('joomla.form.helper');
|
||||
JFormHelper::loadFieldClass('list');
|
||||
|
||||
/**
|
||||
* Adminviewsfilteraddcustomimport Form Field class for the Componentbuilder component
|
||||
*/
|
||||
class JFormFieldAdminviewsfilteraddcustomimport extends JFormFieldList
|
||||
{
|
||||
/**
|
||||
* The adminviewsfilteraddcustomimport field type.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $type = 'adminviewsfilteraddcustomimport';
|
||||
|
||||
/**
|
||||
* Method to get a list of options for a list input.
|
||||
*
|
||||
* @return array An array of JHtml options.
|
||||
*/
|
||||
protected function getOptions()
|
||||
{
|
||||
// Get a db connection.
|
||||
$db = JFactory::getDbo();
|
||||
|
||||
// Create a new query object.
|
||||
$query = $db->getQuery(true);
|
||||
|
||||
// Select the text.
|
||||
$query->select($db->quoteName('add_custom_import'));
|
||||
$query->from($db->quoteName('#__componentbuilder_admin_view'));
|
||||
$query->order($db->quoteName('add_custom_import') . ' ASC');
|
||||
|
||||
// Reset the query using our newly populated query object.
|
||||
$db->setQuery($query);
|
||||
|
||||
$results = $db->loadColumn();
|
||||
$_filter = array();
|
||||
$_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_ADD_CUSTOM_IMPORT') . ' -');
|
||||
|
||||
if ($results)
|
||||
{
|
||||
// get admin_viewsmodel
|
||||
$model = ComponentbuilderHelper::getModel('admin_views');
|
||||
$results = array_unique($results);
|
||||
foreach ($results as $add_custom_import)
|
||||
{
|
||||
// Translate the add_custom_import selection
|
||||
$text = $model->selectionTranslation($add_custom_import,'add_custom_import');
|
||||
// Now add the add_custom_import and its text to the options array
|
||||
$_filter[] = JHtml::_('select.option', $add_custom_import, JText::_($text));
|
||||
}
|
||||
}
|
||||
return $_filter;
|
||||
}
|
||||
}
|
71
admin/models/fields/adminviewsfilteraddfadein.php
Normal file
71
admin/models/fields/adminviewsfilteraddfadein.php
Normal file
@ -0,0 +1,71 @@
|
||||
<?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.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
// import the list field type
|
||||
jimport('joomla.form.helper');
|
||||
JFormHelper::loadFieldClass('list');
|
||||
|
||||
/**
|
||||
* Adminviewsfilteraddfadein Form Field class for the Componentbuilder component
|
||||
*/
|
||||
class JFormFieldAdminviewsfilteraddfadein extends JFormFieldList
|
||||
{
|
||||
/**
|
||||
* The adminviewsfilteraddfadein field type.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $type = 'adminviewsfilteraddfadein';
|
||||
|
||||
/**
|
||||
* Method to get a list of options for a list input.
|
||||
*
|
||||
* @return array An array of JHtml options.
|
||||
*/
|
||||
protected function getOptions()
|
||||
{
|
||||
// Get a db connection.
|
||||
$db = JFactory::getDbo();
|
||||
|
||||
// Create a new query object.
|
||||
$query = $db->getQuery(true);
|
||||
|
||||
// Select the text.
|
||||
$query->select($db->quoteName('add_fadein'));
|
||||
$query->from($db->quoteName('#__componentbuilder_admin_view'));
|
||||
$query->order($db->quoteName('add_fadein') . ' ASC');
|
||||
|
||||
// Reset the query using our newly populated query object.
|
||||
$db->setQuery($query);
|
||||
|
||||
$results = $db->loadColumn();
|
||||
$_filter = array();
|
||||
$_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_ADD_FADEIN') . ' -');
|
||||
|
||||
if ($results)
|
||||
{
|
||||
// get admin_viewsmodel
|
||||
$model = ComponentbuilderHelper::getModel('admin_views');
|
||||
$results = array_unique($results);
|
||||
foreach ($results as $add_fadein)
|
||||
{
|
||||
// Translate the add_fadein selection
|
||||
$text = $model->selectionTranslation($add_fadein,'add_fadein');
|
||||
// Now add the add_fadein and its text to the options array
|
||||
$_filter[] = JHtml::_('select.option', $add_fadein, JText::_($text));
|
||||
}
|
||||
}
|
||||
return $_filter;
|
||||
}
|
||||
}
|
71
admin/models/fields/adminviewsfilteraddphpajax.php
Normal file
71
admin/models/fields/adminviewsfilteraddphpajax.php
Normal file
@ -0,0 +1,71 @@
|
||||
<?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.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
// import the list field type
|
||||
jimport('joomla.form.helper');
|
||||
JFormHelper::loadFieldClass('list');
|
||||
|
||||
/**
|
||||
* Adminviewsfilteraddphpajax Form Field class for the Componentbuilder component
|
||||
*/
|
||||
class JFormFieldAdminviewsfilteraddphpajax extends JFormFieldList
|
||||
{
|
||||
/**
|
||||
* The adminviewsfilteraddphpajax field type.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $type = 'adminviewsfilteraddphpajax';
|
||||
|
||||
/**
|
||||
* Method to get a list of options for a list input.
|
||||
*
|
||||
* @return array An array of JHtml options.
|
||||
*/
|
||||
protected function getOptions()
|
||||
{
|
||||
// Get a db connection.
|
||||
$db = JFactory::getDbo();
|
||||
|
||||
// Create a new query object.
|
||||
$query = $db->getQuery(true);
|
||||
|
||||
// Select the text.
|
||||
$query->select($db->quoteName('add_php_ajax'));
|
||||
$query->from($db->quoteName('#__componentbuilder_admin_view'));
|
||||
$query->order($db->quoteName('add_php_ajax') . ' ASC');
|
||||
|
||||
// Reset the query using our newly populated query object.
|
||||
$db->setQuery($query);
|
||||
|
||||
$results = $db->loadColumn();
|
||||
$_filter = array();
|
||||
$_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_ADD_PHP_AJAX') . ' -');
|
||||
|
||||
if ($results)
|
||||
{
|
||||
// get admin_viewsmodel
|
||||
$model = ComponentbuilderHelper::getModel('admin_views');
|
||||
$results = array_unique($results);
|
||||
foreach ($results as $add_php_ajax)
|
||||
{
|
||||
// Translate the add_php_ajax selection
|
||||
$text = $model->selectionTranslation($add_php_ajax,'add_php_ajax');
|
||||
// Now add the add_php_ajax and its text to the options array
|
||||
$_filter[] = JHtml::_('select.option', $add_php_ajax, JText::_($text));
|
||||
}
|
||||
}
|
||||
return $_filter;
|
||||
}
|
||||
}
|
70
admin/models/fields/adminviewsfiltertype.php
Normal file
70
admin/models/fields/adminviewsfiltertype.php
Normal file
@ -0,0 +1,70 @@
|
||||
<?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.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
// import the list field type
|
||||
jimport('joomla.form.helper');
|
||||
JFormHelper::loadFieldClass('list');
|
||||
|
||||
/**
|
||||
* Adminviewsfiltertype Form Field class for the Componentbuilder component
|
||||
*/
|
||||
class JFormFieldAdminviewsfiltertype extends JFormFieldList
|
||||
{
|
||||
/**
|
||||
* The adminviewsfiltertype field type.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $type = 'adminviewsfiltertype';
|
||||
|
||||
/**
|
||||
* Method to get a list of options for a list input.
|
||||
*
|
||||
* @return array An array of JHtml options.
|
||||
*/
|
||||
protected function getOptions()
|
||||
{
|
||||
// Get a db connection.
|
||||
$db = JFactory::getDbo();
|
||||
|
||||
// Create a new query object.
|
||||
$query = $db->getQuery(true);
|
||||
|
||||
// Select the text.
|
||||
$query->select($db->quoteName('type'));
|
||||
$query->from($db->quoteName('#__componentbuilder_admin_view'));
|
||||
$query->order($db->quoteName('type') . ' ASC');
|
||||
|
||||
// Reset the query using our newly populated query object.
|
||||
$db->setQuery($query);
|
||||
|
||||
$results = $db->loadColumn();
|
||||
$_filter = array();
|
||||
|
||||
if ($results)
|
||||
{
|
||||
// get admin_viewsmodel
|
||||
$model = ComponentbuilderHelper::getModel('admin_views');
|
||||
$results = array_unique($results);
|
||||
foreach ($results as $type)
|
||||
{
|
||||
// Translate the type selection
|
||||
$text = $model->selectionTranslation($type,'type');
|
||||
// Now add the type and its text to the options array
|
||||
$_filter[] = JHtml::_('select.option', $type, JText::_($text));
|
||||
}
|
||||
}
|
||||
return $_filter;
|
||||
}
|
||||
}
|
71
admin/models/fields/classextendingsfilterextensiontype.php
Normal file
71
admin/models/fields/classextendingsfilterextensiontype.php
Normal file
@ -0,0 +1,71 @@
|
||||
<?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.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
// import the list field type
|
||||
jimport('joomla.form.helper');
|
||||
JFormHelper::loadFieldClass('list');
|
||||
|
||||
/**
|
||||
* Classextendingsfilterextensiontype Form Field class for the Componentbuilder component
|
||||
*/
|
||||
class JFormFieldClassextendingsfilterextensiontype extends JFormFieldList
|
||||
{
|
||||
/**
|
||||
* The classextendingsfilterextensiontype field type.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $type = 'classextendingsfilterextensiontype';
|
||||
|
||||
/**
|
||||
* Method to get a list of options for a list input.
|
||||
*
|
||||
* @return array An array of JHtml options.
|
||||
*/
|
||||
protected function getOptions()
|
||||
{
|
||||
// Get a db connection.
|
||||
$db = JFactory::getDbo();
|
||||
|
||||
// Create a new query object.
|
||||
$query = $db->getQuery(true);
|
||||
|
||||
// Select the text.
|
||||
$query->select($db->quoteName('extension_type'));
|
||||
$query->from($db->quoteName('#__componentbuilder_class_extends'));
|
||||
$query->order($db->quoteName('extension_type') . ' ASC');
|
||||
|
||||
// Reset the query using our newly populated query object.
|
||||
$db->setQuery($query);
|
||||
|
||||
$results = $db->loadColumn();
|
||||
$_filter = array();
|
||||
$_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_EXTENSION_TYPE') . ' -');
|
||||
|
||||
if ($results)
|
||||
{
|
||||
// get class_extendingsmodel
|
||||
$model = ComponentbuilderHelper::getModel('class_extendings');
|
||||
$results = array_unique($results);
|
||||
foreach ($results as $extension_type)
|
||||
{
|
||||
// Translate the extension_type selection
|
||||
$text = $model->selectionTranslation($extension_type,'extension_type');
|
||||
// Now add the extension_type and its text to the options array
|
||||
$_filter[] = JHtml::_('select.option', $extension_type, JText::_($text));
|
||||
}
|
||||
}
|
||||
return $_filter;
|
||||
}
|
||||
}
|
71
admin/models/fields/classmethodsfilterextensiontype.php
Normal file
71
admin/models/fields/classmethodsfilterextensiontype.php
Normal file
@ -0,0 +1,71 @@
|
||||
<?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.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
// import the list field type
|
||||
jimport('joomla.form.helper');
|
||||
JFormHelper::loadFieldClass('list');
|
||||
|
||||
/**
|
||||
* Classmethodsfilterextensiontype Form Field class for the Componentbuilder component
|
||||
*/
|
||||
class JFormFieldClassmethodsfilterextensiontype extends JFormFieldList
|
||||
{
|
||||
/**
|
||||
* The classmethodsfilterextensiontype field type.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $type = 'classmethodsfilterextensiontype';
|
||||
|
||||
/**
|
||||
* Method to get a list of options for a list input.
|
||||
*
|
||||
* @return array An array of JHtml options.
|
||||
*/
|
||||
protected function getOptions()
|
||||
{
|
||||
// Get a db connection.
|
||||
$db = JFactory::getDbo();
|
||||
|
||||
// Create a new query object.
|
||||
$query = $db->getQuery(true);
|
||||
|
||||
// Select the text.
|
||||
$query->select($db->quoteName('extension_type'));
|
||||
$query->from($db->quoteName('#__componentbuilder_class_method'));
|
||||
$query->order($db->quoteName('extension_type') . ' ASC');
|
||||
|
||||
// Reset the query using our newly populated query object.
|
||||
$db->setQuery($query);
|
||||
|
||||
$results = $db->loadColumn();
|
||||
$_filter = array();
|
||||
$_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_EXTENSION_TYPE') . ' -');
|
||||
|
||||
if ($results)
|
||||
{
|
||||
// get class_methodsmodel
|
||||
$model = ComponentbuilderHelper::getModel('class_methods');
|
||||
$results = array_unique($results);
|
||||
foreach ($results as $extension_type)
|
||||
{
|
||||
// Translate the extension_type selection
|
||||
$text = $model->selectionTranslation($extension_type,'extension_type');
|
||||
// Now add the extension_type and its text to the options array
|
||||
$_filter[] = JHtml::_('select.option', $extension_type, JText::_($text));
|
||||
}
|
||||
}
|
||||
return $_filter;
|
||||
}
|
||||
}
|
71
admin/models/fields/classmethodsfiltervisibility.php
Normal file
71
admin/models/fields/classmethodsfiltervisibility.php
Normal file
@ -0,0 +1,71 @@
|
||||
<?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.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
// import the list field type
|
||||
jimport('joomla.form.helper');
|
||||
JFormHelper::loadFieldClass('list');
|
||||
|
||||
/**
|
||||
* Classmethodsfiltervisibility Form Field class for the Componentbuilder component
|
||||
*/
|
||||
class JFormFieldClassmethodsfiltervisibility extends JFormFieldList
|
||||
{
|
||||
/**
|
||||
* The classmethodsfiltervisibility field type.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $type = 'classmethodsfiltervisibility';
|
||||
|
||||
/**
|
||||
* Method to get a list of options for a list input.
|
||||
*
|
||||
* @return array An array of JHtml options.
|
||||
*/
|
||||
protected function getOptions()
|
||||
{
|
||||
// Get a db connection.
|
||||
$db = JFactory::getDbo();
|
||||
|
||||
// Create a new query object.
|
||||
$query = $db->getQuery(true);
|
||||
|
||||
// Select the text.
|
||||
$query->select($db->quoteName('visibility'));
|
||||
$query->from($db->quoteName('#__componentbuilder_class_method'));
|
||||
$query->order($db->quoteName('visibility') . ' ASC');
|
||||
|
||||
// Reset the query using our newly populated query object.
|
||||
$db->setQuery($query);
|
||||
|
||||
$results = $db->loadColumn();
|
||||
$_filter = array();
|
||||
$_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_VISIBILITY') . ' -');
|
||||
|
||||
if ($results)
|
||||
{
|
||||
// get class_methodsmodel
|
||||
$model = ComponentbuilderHelper::getModel('class_methods');
|
||||
$results = array_unique($results);
|
||||
foreach ($results as $visibility)
|
||||
{
|
||||
// Translate the visibility selection
|
||||
$text = $model->selectionTranslation($visibility,'visibility');
|
||||
// Now add the visibility and its text to the options array
|
||||
$_filter[] = JHtml::_('select.option', $visibility, JText::_($text));
|
||||
}
|
||||
}
|
||||
return $_filter;
|
||||
}
|
||||
}
|
71
admin/models/fields/classpropertiesfilterextensiontype.php
Normal file
71
admin/models/fields/classpropertiesfilterextensiontype.php
Normal file
@ -0,0 +1,71 @@
|
||||
<?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.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
// import the list field type
|
||||
jimport('joomla.form.helper');
|
||||
JFormHelper::loadFieldClass('list');
|
||||
|
||||
/**
|
||||
* Classpropertiesfilterextensiontype Form Field class for the Componentbuilder component
|
||||
*/
|
||||
class JFormFieldClasspropertiesfilterextensiontype extends JFormFieldList
|
||||
{
|
||||
/**
|
||||
* The classpropertiesfilterextensiontype field type.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $type = 'classpropertiesfilterextensiontype';
|
||||
|
||||
/**
|
||||
* Method to get a list of options for a list input.
|
||||
*
|
||||
* @return array An array of JHtml options.
|
||||
*/
|
||||
protected function getOptions()
|
||||
{
|
||||
// Get a db connection.
|
||||
$db = JFactory::getDbo();
|
||||
|
||||
// Create a new query object.
|
||||
$query = $db->getQuery(true);
|
||||
|
||||
// Select the text.
|
||||
$query->select($db->quoteName('extension_type'));
|
||||
$query->from($db->quoteName('#__componentbuilder_class_property'));
|
||||
$query->order($db->quoteName('extension_type') . ' ASC');
|
||||
|
||||
// Reset the query using our newly populated query object.
|
||||
$db->setQuery($query);
|
||||
|
||||
$results = $db->loadColumn();
|
||||
$_filter = array();
|
||||
$_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_EXTENSION_TYPE') . ' -');
|
||||
|
||||
if ($results)
|
||||
{
|
||||
// get class_propertiesmodel
|
||||
$model = ComponentbuilderHelper::getModel('class_properties');
|
||||
$results = array_unique($results);
|
||||
foreach ($results as $extension_type)
|
||||
{
|
||||
// Translate the extension_type selection
|
||||
$text = $model->selectionTranslation($extension_type,'extension_type');
|
||||
// Now add the extension_type and its text to the options array
|
||||
$_filter[] = JHtml::_('select.option', $extension_type, JText::_($text));
|
||||
}
|
||||
}
|
||||
return $_filter;
|
||||
}
|
||||
}
|
71
admin/models/fields/classpropertiesfiltervisibility.php
Normal file
71
admin/models/fields/classpropertiesfiltervisibility.php
Normal file
@ -0,0 +1,71 @@
|
||||
<?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.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
// import the list field type
|
||||
jimport('joomla.form.helper');
|
||||
JFormHelper::loadFieldClass('list');
|
||||
|
||||
/**
|
||||
* Classpropertiesfiltervisibility Form Field class for the Componentbuilder component
|
||||
*/
|
||||
class JFormFieldClasspropertiesfiltervisibility extends JFormFieldList
|
||||
{
|
||||
/**
|
||||
* The classpropertiesfiltervisibility field type.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $type = 'classpropertiesfiltervisibility';
|
||||
|
||||
/**
|
||||
* Method to get a list of options for a list input.
|
||||
*
|
||||
* @return array An array of JHtml options.
|
||||
*/
|
||||
protected function getOptions()
|
||||
{
|
||||
// Get a db connection.
|
||||
$db = JFactory::getDbo();
|
||||
|
||||
// Create a new query object.
|
||||
$query = $db->getQuery(true);
|
||||
|
||||
// Select the text.
|
||||
$query->select($db->quoteName('visibility'));
|
||||
$query->from($db->quoteName('#__componentbuilder_class_property'));
|
||||
$query->order($db->quoteName('visibility') . ' ASC');
|
||||
|
||||
// Reset the query using our newly populated query object.
|
||||
$db->setQuery($query);
|
||||
|
||||
$results = $db->loadColumn();
|
||||
$_filter = array();
|
||||
$_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_VISIBILITY') . ' -');
|
||||
|
||||
if ($results)
|
||||
{
|
||||
// get class_propertiesmodel
|
||||
$model = ComponentbuilderHelper::getModel('class_properties');
|
||||
$results = array_unique($results);
|
||||
foreach ($results as $visibility)
|
||||
{
|
||||
// Translate the visibility selection
|
||||
$text = $model->selectionTranslation($visibility,'visibility');
|
||||
// Now add the visibility and its text to the options array
|
||||
$_filter[] = JHtml::_('select.option', $visibility, JText::_($text));
|
||||
}
|
||||
}
|
||||
return $_filter;
|
||||
}
|
||||
}
|
@ -0,0 +1,71 @@
|
||||
<?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.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
// import the list field type
|
||||
jimport('joomla.form.helper');
|
||||
JFormHelper::loadFieldClass('list');
|
||||
|
||||
/**
|
||||
* Customadminviewsfilteraddcustombutton Form Field class for the Componentbuilder component
|
||||
*/
|
||||
class JFormFieldCustomadminviewsfilteraddcustombutton extends JFormFieldList
|
||||
{
|
||||
/**
|
||||
* The customadminviewsfilteraddcustombutton field type.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $type = 'customadminviewsfilteraddcustombutton';
|
||||
|
||||
/**
|
||||
* Method to get a list of options for a list input.
|
||||
*
|
||||
* @return array An array of JHtml options.
|
||||
*/
|
||||
protected function getOptions()
|
||||
{
|
||||
// Get a db connection.
|
||||
$db = JFactory::getDbo();
|
||||
|
||||
// Create a new query object.
|
||||
$query = $db->getQuery(true);
|
||||
|
||||
// Select the text.
|
||||
$query->select($db->quoteName('add_custom_button'));
|
||||
$query->from($db->quoteName('#__componentbuilder_custom_admin_view'));
|
||||
$query->order($db->quoteName('add_custom_button') . ' ASC');
|
||||
|
||||
// Reset the query using our newly populated query object.
|
||||
$db->setQuery($query);
|
||||
|
||||
$results = $db->loadColumn();
|
||||
$_filter = array();
|
||||
$_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_ADD_CUSTOM_BUTTON') . ' -');
|
||||
|
||||
if ($results)
|
||||
{
|
||||
// get custom_admin_viewsmodel
|
||||
$model = ComponentbuilderHelper::getModel('custom_admin_views');
|
||||
$results = array_unique($results);
|
||||
foreach ($results as $add_custom_button)
|
||||
{
|
||||
// Translate the add_custom_button selection
|
||||
$text = $model->selectionTranslation($add_custom_button,'add_custom_button');
|
||||
// Now add the add_custom_button and its text to the options array
|
||||
$_filter[] = JHtml::_('select.option', $add_custom_button, JText::_($text));
|
||||
}
|
||||
}
|
||||
return $_filter;
|
||||
}
|
||||
}
|
71
admin/models/fields/customadminviewsfilteraddphpajax.php
Normal file
71
admin/models/fields/customadminviewsfilteraddphpajax.php
Normal file
@ -0,0 +1,71 @@
|
||||
<?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.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
// import the list field type
|
||||
jimport('joomla.form.helper');
|
||||
JFormHelper::loadFieldClass('list');
|
||||
|
||||
/**
|
||||
* Customadminviewsfilteraddphpajax Form Field class for the Componentbuilder component
|
||||
*/
|
||||
class JFormFieldCustomadminviewsfilteraddphpajax extends JFormFieldList
|
||||
{
|
||||
/**
|
||||
* The customadminviewsfilteraddphpajax field type.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $type = 'customadminviewsfilteraddphpajax';
|
||||
|
||||
/**
|
||||
* Method to get a list of options for a list input.
|
||||
*
|
||||
* @return array An array of JHtml options.
|
||||
*/
|
||||
protected function getOptions()
|
||||
{
|
||||
// Get a db connection.
|
||||
$db = JFactory::getDbo();
|
||||
|
||||
// Create a new query object.
|
||||
$query = $db->getQuery(true);
|
||||
|
||||
// Select the text.
|
||||
$query->select($db->quoteName('add_php_ajax'));
|
||||
$query->from($db->quoteName('#__componentbuilder_custom_admin_view'));
|
||||
$query->order($db->quoteName('add_php_ajax') . ' ASC');
|
||||
|
||||
// Reset the query using our newly populated query object.
|
||||
$db->setQuery($query);
|
||||
|
||||
$results = $db->loadColumn();
|
||||
$_filter = array();
|
||||
$_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_ADD_PHP_AJAX') . ' -');
|
||||
|
||||
if ($results)
|
||||
{
|
||||
// get custom_admin_viewsmodel
|
||||
$model = ComponentbuilderHelper::getModel('custom_admin_views');
|
||||
$results = array_unique($results);
|
||||
foreach ($results as $add_php_ajax)
|
||||
{
|
||||
// Translate the add_php_ajax selection
|
||||
$text = $model->selectionTranslation($add_php_ajax,'add_php_ajax');
|
||||
// Now add the add_php_ajax and its text to the options array
|
||||
$_filter[] = JHtml::_('select.option', $add_php_ajax, JText::_($text));
|
||||
}
|
||||
}
|
||||
return $_filter;
|
||||
}
|
||||
}
|
71
admin/models/fields/customcodesfiltercommenttype.php
Normal file
71
admin/models/fields/customcodesfiltercommenttype.php
Normal file
@ -0,0 +1,71 @@
|
||||
<?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.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
// import the list field type
|
||||
jimport('joomla.form.helper');
|
||||
JFormHelper::loadFieldClass('list');
|
||||
|
||||
/**
|
||||
* Customcodesfiltercommenttype Form Field class for the Componentbuilder component
|
||||
*/
|
||||
class JFormFieldCustomcodesfiltercommenttype extends JFormFieldList
|
||||
{
|
||||
/**
|
||||
* The customcodesfiltercommenttype field type.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $type = 'customcodesfiltercommenttype';
|
||||
|
||||
/**
|
||||
* Method to get a list of options for a list input.
|
||||
*
|
||||
* @return array An array of JHtml options.
|
||||
*/
|
||||
protected function getOptions()
|
||||
{
|
||||
// Get a db connection.
|
||||
$db = JFactory::getDbo();
|
||||
|
||||
// Create a new query object.
|
||||
$query = $db->getQuery(true);
|
||||
|
||||
// Select the text.
|
||||
$query->select($db->quoteName('comment_type'));
|
||||
$query->from($db->quoteName('#__componentbuilder_custom_code'));
|
||||
$query->order($db->quoteName('comment_type') . ' ASC');
|
||||
|
||||
// Reset the query using our newly populated query object.
|
||||
$db->setQuery($query);
|
||||
|
||||
$results = $db->loadColumn();
|
||||
$_filter = array();
|
||||
$_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_COMMENT_TYPE') . ' -');
|
||||
|
||||
if ($results)
|
||||
{
|
||||
// get custom_codesmodel
|
||||
$model = ComponentbuilderHelper::getModel('custom_codes');
|
||||
$results = array_unique($results);
|
||||
foreach ($results as $comment_type)
|
||||
{
|
||||
// Translate the comment_type selection
|
||||
$text = $model->selectionTranslation($comment_type,'comment_type');
|
||||
// Now add the comment_type and its text to the options array
|
||||
$_filter[] = JHtml::_('select.option', $comment_type, JText::_($text));
|
||||
}
|
||||
}
|
||||
return $_filter;
|
||||
}
|
||||
}
|
71
admin/models/fields/customcodesfiltertarget.php
Normal file
71
admin/models/fields/customcodesfiltertarget.php
Normal file
@ -0,0 +1,71 @@
|
||||
<?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.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
// import the list field type
|
||||
jimport('joomla.form.helper');
|
||||
JFormHelper::loadFieldClass('list');
|
||||
|
||||
/**
|
||||
* Customcodesfiltertarget Form Field class for the Componentbuilder component
|
||||
*/
|
||||
class JFormFieldCustomcodesfiltertarget extends JFormFieldList
|
||||
{
|
||||
/**
|
||||
* The customcodesfiltertarget field type.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $type = 'customcodesfiltertarget';
|
||||
|
||||
/**
|
||||
* Method to get a list of options for a list input.
|
||||
*
|
||||
* @return array An array of JHtml options.
|
||||
*/
|
||||
protected function getOptions()
|
||||
{
|
||||
// Get a db connection.
|
||||
$db = JFactory::getDbo();
|
||||
|
||||
// Create a new query object.
|
||||
$query = $db->getQuery(true);
|
||||
|
||||
// Select the text.
|
||||
$query->select($db->quoteName('target'));
|
||||
$query->from($db->quoteName('#__componentbuilder_custom_code'));
|
||||
$query->order($db->quoteName('target') . ' ASC');
|
||||
|
||||
// Reset the query using our newly populated query object.
|
||||
$db->setQuery($query);
|
||||
|
||||
$results = $db->loadColumn();
|
||||
$_filter = array();
|
||||
$_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_TARGET') . ' -');
|
||||
|
||||
if ($results)
|
||||
{
|
||||
// get custom_codesmodel
|
||||
$model = ComponentbuilderHelper::getModel('custom_codes');
|
||||
$results = array_unique($results);
|
||||
foreach ($results as $target)
|
||||
{
|
||||
// Translate the target selection
|
||||
$text = $model->selectionTranslation($target,'target');
|
||||
// Now add the target and its text to the options array
|
||||
$_filter[] = JHtml::_('select.option', $target, JText::_($text));
|
||||
}
|
||||
}
|
||||
return $_filter;
|
||||
}
|
||||
}
|
71
admin/models/fields/customcodesfiltertype.php
Normal file
71
admin/models/fields/customcodesfiltertype.php
Normal file
@ -0,0 +1,71 @@
|
||||
<?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.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
// import the list field type
|
||||
jimport('joomla.form.helper');
|
||||
JFormHelper::loadFieldClass('list');
|
||||
|
||||
/**
|
||||
* Customcodesfiltertype Form Field class for the Componentbuilder component
|
||||
*/
|
||||
class JFormFieldCustomcodesfiltertype extends JFormFieldList
|
||||
{
|
||||
/**
|
||||
* The customcodesfiltertype field type.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $type = 'customcodesfiltertype';
|
||||
|
||||
/**
|
||||
* Method to get a list of options for a list input.
|
||||
*
|
||||
* @return array An array of JHtml options.
|
||||
*/
|
||||
protected function getOptions()
|
||||
{
|
||||
// Get a db connection.
|
||||
$db = JFactory::getDbo();
|
||||
|
||||
// Create a new query object.
|
||||
$query = $db->getQuery(true);
|
||||
|
||||
// Select the text.
|
||||
$query->select($db->quoteName('type'));
|
||||
$query->from($db->quoteName('#__componentbuilder_custom_code'));
|
||||
$query->order($db->quoteName('type') . ' ASC');
|
||||
|
||||
// Reset the query using our newly populated query object.
|
||||
$db->setQuery($query);
|
||||
|
||||
$results = $db->loadColumn();
|
||||
$_filter = array();
|
||||
$_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_TYPE') . ' -');
|
||||
|
||||
if ($results)
|
||||
{
|
||||
// get custom_codesmodel
|
||||
$model = ComponentbuilderHelper::getModel('custom_codes');
|
||||
$results = array_unique($results);
|
||||
foreach ($results as $type)
|
||||
{
|
||||
// Translate the type selection
|
||||
$text = $model->selectionTranslation($type,'type');
|
||||
// Now add the type and its text to the options array
|
||||
$_filter[] = JHtml::_('select.option', $type, JText::_($text));
|
||||
}
|
||||
}
|
||||
return $_filter;
|
||||
}
|
||||
}
|
71
admin/models/fields/dynamicgetsfiltergettype.php
Normal file
71
admin/models/fields/dynamicgetsfiltergettype.php
Normal file
@ -0,0 +1,71 @@
|
||||
<?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.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
// import the list field type
|
||||
jimport('joomla.form.helper');
|
||||
JFormHelper::loadFieldClass('list');
|
||||
|
||||
/**
|
||||
* Dynamicgetsfiltergettype Form Field class for the Componentbuilder component
|
||||
*/
|
||||
class JFormFieldDynamicgetsfiltergettype extends JFormFieldList
|
||||
{
|
||||
/**
|
||||
* The dynamicgetsfiltergettype field type.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $type = 'dynamicgetsfiltergettype';
|
||||
|
||||
/**
|
||||
* Method to get a list of options for a list input.
|
||||
*
|
||||
* @return array An array of JHtml options.
|
||||
*/
|
||||
protected function getOptions()
|
||||
{
|
||||
// Get a db connection.
|
||||
$db = JFactory::getDbo();
|
||||
|
||||
// Create a new query object.
|
||||
$query = $db->getQuery(true);
|
||||
|
||||
// Select the text.
|
||||
$query->select($db->quoteName('gettype'));
|
||||
$query->from($db->quoteName('#__componentbuilder_dynamic_get'));
|
||||
$query->order($db->quoteName('gettype') . ' ASC');
|
||||
|
||||
// Reset the query using our newly populated query object.
|
||||
$db->setQuery($query);
|
||||
|
||||
$results = $db->loadColumn();
|
||||
$_filter = array();
|
||||
$_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_GETTYPE') . ' -');
|
||||
|
||||
if ($results)
|
||||
{
|
||||
// get dynamic_getsmodel
|
||||
$model = ComponentbuilderHelper::getModel('dynamic_gets');
|
||||
$results = array_unique($results);
|
||||
foreach ($results as $gettype)
|
||||
{
|
||||
// Translate the gettype selection
|
||||
$text = $model->selectionTranslation($gettype,'gettype');
|
||||
// Now add the gettype and its text to the options array
|
||||
$_filter[] = JHtml::_('select.option', $gettype, JText::_($text));
|
||||
}
|
||||
}
|
||||
return $_filter;
|
||||
}
|
||||
}
|
71
admin/models/fields/dynamicgetsfiltermainsource.php
Normal file
71
admin/models/fields/dynamicgetsfiltermainsource.php
Normal file
@ -0,0 +1,71 @@
|
||||
<?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.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
// import the list field type
|
||||
jimport('joomla.form.helper');
|
||||
JFormHelper::loadFieldClass('list');
|
||||
|
||||
/**
|
||||
* Dynamicgetsfiltermainsource Form Field class for the Componentbuilder component
|
||||
*/
|
||||
class JFormFieldDynamicgetsfiltermainsource extends JFormFieldList
|
||||
{
|
||||
/**
|
||||
* The dynamicgetsfiltermainsource field type.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $type = 'dynamicgetsfiltermainsource';
|
||||
|
||||
/**
|
||||
* Method to get a list of options for a list input.
|
||||
*
|
||||
* @return array An array of JHtml options.
|
||||
*/
|
||||
protected function getOptions()
|
||||
{
|
||||
// Get a db connection.
|
||||
$db = JFactory::getDbo();
|
||||
|
||||
// Create a new query object.
|
||||
$query = $db->getQuery(true);
|
||||
|
||||
// Select the text.
|
||||
$query->select($db->quoteName('main_source'));
|
||||
$query->from($db->quoteName('#__componentbuilder_dynamic_get'));
|
||||
$query->order($db->quoteName('main_source') . ' ASC');
|
||||
|
||||
// Reset the query using our newly populated query object.
|
||||
$db->setQuery($query);
|
||||
|
||||
$results = $db->loadColumn();
|
||||
$_filter = array();
|
||||
$_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_MAIN_SOURCE') . ' -');
|
||||
|
||||
if ($results)
|
||||
{
|
||||
// get dynamic_getsmodel
|
||||
$model = ComponentbuilderHelper::getModel('dynamic_gets');
|
||||
$results = array_unique($results);
|
||||
foreach ($results as $main_source)
|
||||
{
|
||||
// Translate the main_source selection
|
||||
$text = $model->selectionTranslation($main_source,'main_source');
|
||||
// Now add the main_source and its text to the options array
|
||||
$_filter[] = JHtml::_('select.option', $main_source, JText::_($text));
|
||||
}
|
||||
}
|
||||
return $_filter;
|
||||
}
|
||||
}
|
71
admin/models/fields/fieldsfilterdatatype.php
Normal file
71
admin/models/fields/fieldsfilterdatatype.php
Normal file
@ -0,0 +1,71 @@
|
||||
<?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.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
// import the list field type
|
||||
jimport('joomla.form.helper');
|
||||
JFormHelper::loadFieldClass('list');
|
||||
|
||||
/**
|
||||
* Fieldsfilterdatatype Form Field class for the Componentbuilder component
|
||||
*/
|
||||
class JFormFieldFieldsfilterdatatype extends JFormFieldList
|
||||
{
|
||||
/**
|
||||
* The fieldsfilterdatatype field type.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $type = 'fieldsfilterdatatype';
|
||||
|
||||
/**
|
||||
* Method to get a list of options for a list input.
|
||||
*
|
||||
* @return array An array of JHtml options.
|
||||
*/
|
||||
protected function getOptions()
|
||||
{
|
||||
// Get a db connection.
|
||||
$db = JFactory::getDbo();
|
||||
|
||||
// Create a new query object.
|
||||
$query = $db->getQuery(true);
|
||||
|
||||
// Select the text.
|
||||
$query->select($db->quoteName('datatype'));
|
||||
$query->from($db->quoteName('#__componentbuilder_field'));
|
||||
$query->order($db->quoteName('datatype') . ' ASC');
|
||||
|
||||
// Reset the query using our newly populated query object.
|
||||
$db->setQuery($query);
|
||||
|
||||
$results = $db->loadColumn();
|
||||
$_filter = array();
|
||||
$_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_DATATYPE') . ' -');
|
||||
|
||||
if ($results)
|
||||
{
|
||||
// get fieldsmodel
|
||||
$model = ComponentbuilderHelper::getModel('fields');
|
||||
$results = array_unique($results);
|
||||
foreach ($results as $datatype)
|
||||
{
|
||||
// Translate the datatype selection
|
||||
$text = $model->selectionTranslation($datatype,'datatype');
|
||||
// Now add the datatype and its text to the options array
|
||||
$_filter[] = JHtml::_('select.option', $datatype, JText::_($text));
|
||||
}
|
||||
}
|
||||
return $_filter;
|
||||
}
|
||||
}
|
71
admin/models/fields/fieldsfilterindexes.php
Normal file
71
admin/models/fields/fieldsfilterindexes.php
Normal file
@ -0,0 +1,71 @@
|
||||
<?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.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
// import the list field type
|
||||
jimport('joomla.form.helper');
|
||||
JFormHelper::loadFieldClass('list');
|
||||
|
||||
/**
|
||||
* Fieldsfilterindexes Form Field class for the Componentbuilder component
|
||||
*/
|
||||
class JFormFieldFieldsfilterindexes extends JFormFieldList
|
||||
{
|
||||
/**
|
||||
* The fieldsfilterindexes field type.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $type = 'fieldsfilterindexes';
|
||||
|
||||
/**
|
||||
* Method to get a list of options for a list input.
|
||||
*
|
||||
* @return array An array of JHtml options.
|
||||
*/
|
||||
protected function getOptions()
|
||||
{
|
||||
// Get a db connection.
|
||||
$db = JFactory::getDbo();
|
||||
|
||||
// Create a new query object.
|
||||
$query = $db->getQuery(true);
|
||||
|
||||
// Select the text.
|
||||
$query->select($db->quoteName('indexes'));
|
||||
$query->from($db->quoteName('#__componentbuilder_field'));
|
||||
$query->order($db->quoteName('indexes') . ' ASC');
|
||||
|
||||
// Reset the query using our newly populated query object.
|
||||
$db->setQuery($query);
|
||||
|
||||
$results = $db->loadColumn();
|
||||
$_filter = array();
|
||||
$_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_INDEXES') . ' -');
|
||||
|
||||
if ($results)
|
||||
{
|
||||
// get fieldsmodel
|
||||
$model = ComponentbuilderHelper::getModel('fields');
|
||||
$results = array_unique($results);
|
||||
foreach ($results as $indexes)
|
||||
{
|
||||
// Translate the indexes selection
|
||||
$text = $model->selectionTranslation($indexes,'indexes');
|
||||
// Now add the indexes and its text to the options array
|
||||
$_filter[] = JHtml::_('select.option', $indexes, JText::_($text));
|
||||
}
|
||||
}
|
||||
return $_filter;
|
||||
}
|
||||
}
|
71
admin/models/fields/fieldsfilternullswitch.php
Normal file
71
admin/models/fields/fieldsfilternullswitch.php
Normal file
@ -0,0 +1,71 @@
|
||||
<?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.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
// import the list field type
|
||||
jimport('joomla.form.helper');
|
||||
JFormHelper::loadFieldClass('list');
|
||||
|
||||
/**
|
||||
* Fieldsfilternullswitch Form Field class for the Componentbuilder component
|
||||
*/
|
||||
class JFormFieldFieldsfilternullswitch extends JFormFieldList
|
||||
{
|
||||
/**
|
||||
* The fieldsfilternullswitch field type.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $type = 'fieldsfilternullswitch';
|
||||
|
||||
/**
|
||||
* Method to get a list of options for a list input.
|
||||
*
|
||||
* @return array An array of JHtml options.
|
||||
*/
|
||||
protected function getOptions()
|
||||
{
|
||||
// Get a db connection.
|
||||
$db = JFactory::getDbo();
|
||||
|
||||
// Create a new query object.
|
||||
$query = $db->getQuery(true);
|
||||
|
||||
// Select the text.
|
||||
$query->select($db->quoteName('null_switch'));
|
||||
$query->from($db->quoteName('#__componentbuilder_field'));
|
||||
$query->order($db->quoteName('null_switch') . ' ASC');
|
||||
|
||||
// Reset the query using our newly populated query object.
|
||||
$db->setQuery($query);
|
||||
|
||||
$results = $db->loadColumn();
|
||||
$_filter = array();
|
||||
$_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_NULL_SWITCH') . ' -');
|
||||
|
||||
if ($results)
|
||||
{
|
||||
// get fieldsmodel
|
||||
$model = ComponentbuilderHelper::getModel('fields');
|
||||
$results = array_unique($results);
|
||||
foreach ($results as $null_switch)
|
||||
{
|
||||
// Translate the null_switch selection
|
||||
$text = $model->selectionTranslation($null_switch,'null_switch');
|
||||
// Now add the null_switch and its text to the options array
|
||||
$_filter[] = JHtml::_('select.option', $null_switch, JText::_($text));
|
||||
}
|
||||
}
|
||||
return $_filter;
|
||||
}
|
||||
}
|
71
admin/models/fields/fieldsfilterstore.php
Normal file
71
admin/models/fields/fieldsfilterstore.php
Normal file
@ -0,0 +1,71 @@
|
||||
<?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.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
// import the list field type
|
||||
jimport('joomla.form.helper');
|
||||
JFormHelper::loadFieldClass('list');
|
||||
|
||||
/**
|
||||
* Fieldsfilterstore Form Field class for the Componentbuilder component
|
||||
*/
|
||||
class JFormFieldFieldsfilterstore extends JFormFieldList
|
||||
{
|
||||
/**
|
||||
* The fieldsfilterstore field type.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $type = 'fieldsfilterstore';
|
||||
|
||||
/**
|
||||
* Method to get a list of options for a list input.
|
||||
*
|
||||
* @return array An array of JHtml options.
|
||||
*/
|
||||
protected function getOptions()
|
||||
{
|
||||
// Get a db connection.
|
||||
$db = JFactory::getDbo();
|
||||
|
||||
// Create a new query object.
|
||||
$query = $db->getQuery(true);
|
||||
|
||||
// Select the text.
|
||||
$query->select($db->quoteName('store'));
|
||||
$query->from($db->quoteName('#__componentbuilder_field'));
|
||||
$query->order($db->quoteName('store') . ' ASC');
|
||||
|
||||
// Reset the query using our newly populated query object.
|
||||
$db->setQuery($query);
|
||||
|
||||
$results = $db->loadColumn();
|
||||
$_filter = array();
|
||||
$_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_STORE') . ' -');
|
||||
|
||||
if ($results)
|
||||
{
|
||||
// get fieldsmodel
|
||||
$model = ComponentbuilderHelper::getModel('fields');
|
||||
$results = array_unique($results);
|
||||
foreach ($results as $store)
|
||||
{
|
||||
// Translate the store selection
|
||||
$text = $model->selectionTranslation($store,'store');
|
||||
// Now add the store and its text to the options array
|
||||
$_filter[] = JHtml::_('select.option', $store, JText::_($text));
|
||||
}
|
||||
}
|
||||
return $_filter;
|
||||
}
|
||||
}
|
71
admin/models/fields/helpdocumentsfilterlocation.php
Normal file
71
admin/models/fields/helpdocumentsfilterlocation.php
Normal file
@ -0,0 +1,71 @@
|
||||
<?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.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
// import the list field type
|
||||
jimport('joomla.form.helper');
|
||||
JFormHelper::loadFieldClass('list');
|
||||
|
||||
/**
|
||||
* Helpdocumentsfilterlocation Form Field class for the Componentbuilder component
|
||||
*/
|
||||
class JFormFieldHelpdocumentsfilterlocation extends JFormFieldList
|
||||
{
|
||||
/**
|
||||
* The helpdocumentsfilterlocation field type.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $type = 'helpdocumentsfilterlocation';
|
||||
|
||||
/**
|
||||
* Method to get a list of options for a list input.
|
||||
*
|
||||
* @return array An array of JHtml options.
|
||||
*/
|
||||
protected function getOptions()
|
||||
{
|
||||
// Get a db connection.
|
||||
$db = JFactory::getDbo();
|
||||
|
||||
// Create a new query object.
|
||||
$query = $db->getQuery(true);
|
||||
|
||||
// Select the text.
|
||||
$query->select($db->quoteName('location'));
|
||||
$query->from($db->quoteName('#__componentbuilder_help_document'));
|
||||
$query->order($db->quoteName('location') . ' ASC');
|
||||
|
||||
// Reset the query using our newly populated query object.
|
||||
$db->setQuery($query);
|
||||
|
||||
$results = $db->loadColumn();
|
||||
$_filter = array();
|
||||
$_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_LOCATION') . ' -');
|
||||
|
||||
if ($results)
|
||||
{
|
||||
// get help_documentsmodel
|
||||
$model = ComponentbuilderHelper::getModel('help_documents');
|
||||
$results = array_unique($results);
|
||||
foreach ($results as $location)
|
||||
{
|
||||
// Translate the location selection
|
||||
$text = $model->selectionTranslation($location,'location');
|
||||
// Now add the location and its text to the options array
|
||||
$_filter[] = JHtml::_('select.option', $location, JText::_($text));
|
||||
}
|
||||
}
|
||||
return $_filter;
|
||||
}
|
||||
}
|
71
admin/models/fields/helpdocumentsfiltertype.php
Normal file
71
admin/models/fields/helpdocumentsfiltertype.php
Normal file
@ -0,0 +1,71 @@
|
||||
<?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.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
// import the list field type
|
||||
jimport('joomla.form.helper');
|
||||
JFormHelper::loadFieldClass('list');
|
||||
|
||||
/**
|
||||
* Helpdocumentsfiltertype Form Field class for the Componentbuilder component
|
||||
*/
|
||||
class JFormFieldHelpdocumentsfiltertype extends JFormFieldList
|
||||
{
|
||||
/**
|
||||
* The helpdocumentsfiltertype field type.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $type = 'helpdocumentsfiltertype';
|
||||
|
||||
/**
|
||||
* Method to get a list of options for a list input.
|
||||
*
|
||||
* @return array An array of JHtml options.
|
||||
*/
|
||||
protected function getOptions()
|
||||
{
|
||||
// Get a db connection.
|
||||
$db = JFactory::getDbo();
|
||||
|
||||
// Create a new query object.
|
||||
$query = $db->getQuery(true);
|
||||
|
||||
// Select the text.
|
||||
$query->select($db->quoteName('type'));
|
||||
$query->from($db->quoteName('#__componentbuilder_help_document'));
|
||||
$query->order($db->quoteName('type') . ' ASC');
|
||||
|
||||
// Reset the query using our newly populated query object.
|
||||
$db->setQuery($query);
|
||||
|
||||
$results = $db->loadColumn();
|
||||
$_filter = array();
|
||||
$_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_TYPE') . ' -');
|
||||
|
||||
if ($results)
|
||||
{
|
||||
// get help_documentsmodel
|
||||
$model = ComponentbuilderHelper::getModel('help_documents');
|
||||
$results = array_unique($results);
|
||||
foreach ($results as $type)
|
||||
{
|
||||
// Translate the type selection
|
||||
$text = $model->selectionTranslation($type,'type');
|
||||
// Now add the type and its text to the options array
|
||||
$_filter[] = JHtml::_('select.option', $type, JText::_($text));
|
||||
}
|
||||
}
|
||||
return $_filter;
|
||||
}
|
||||
}
|
67
admin/models/fields/joomlacomponentsfilterauthor.php
Normal file
67
admin/models/fields/joomlacomponentsfilterauthor.php
Normal file
@ -0,0 +1,67 @@
|
||||
<?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.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
// import the list field type
|
||||
jimport('joomla.form.helper');
|
||||
JFormHelper::loadFieldClass('list');
|
||||
|
||||
/**
|
||||
* Joomlacomponentsfilterauthor Form Field class for the Componentbuilder component
|
||||
*/
|
||||
class JFormFieldJoomlacomponentsfilterauthor extends JFormFieldList
|
||||
{
|
||||
/**
|
||||
* The joomlacomponentsfilterauthor field type.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $type = 'joomlacomponentsfilterauthor';
|
||||
|
||||
/**
|
||||
* Method to get a list of options for a list input.
|
||||
*
|
||||
* @return array An array of JHtml options.
|
||||
*/
|
||||
protected function getOptions()
|
||||
{
|
||||
// Get a db connection.
|
||||
$db = JFactory::getDbo();
|
||||
|
||||
// Create a new query object.
|
||||
$query = $db->getQuery(true);
|
||||
|
||||
// Select the text.
|
||||
$query->select($db->quoteName('author'));
|
||||
$query->from($db->quoteName('#__componentbuilder_joomla_component'));
|
||||
$query->order($db->quoteName('author') . ' ASC');
|
||||
|
||||
// Reset the query using our newly populated query object.
|
||||
$db->setQuery($query);
|
||||
|
||||
$results = $db->loadColumn();
|
||||
$_filter = array();
|
||||
$_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_AUTHOR') . ' -');
|
||||
|
||||
if ($results)
|
||||
{
|
||||
$results = array_unique($results);
|
||||
foreach ($results as $author)
|
||||
{
|
||||
// Now add the author and its text to the options array
|
||||
$_filter[] = JHtml::_('select.option', $author, $author);
|
||||
}
|
||||
}
|
||||
return $_filter;
|
||||
}
|
||||
}
|
67
admin/models/fields/joomlacomponentsfiltercompanyname.php
Normal file
67
admin/models/fields/joomlacomponentsfiltercompanyname.php
Normal file
@ -0,0 +1,67 @@
|
||||
<?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.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
// import the list field type
|
||||
jimport('joomla.form.helper');
|
||||
JFormHelper::loadFieldClass('list');
|
||||
|
||||
/**
|
||||
* Joomlacomponentsfiltercompanyname Form Field class for the Componentbuilder component
|
||||
*/
|
||||
class JFormFieldJoomlacomponentsfiltercompanyname extends JFormFieldList
|
||||
{
|
||||
/**
|
||||
* The joomlacomponentsfiltercompanyname field type.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $type = 'joomlacomponentsfiltercompanyname';
|
||||
|
||||
/**
|
||||
* Method to get a list of options for a list input.
|
||||
*
|
||||
* @return array An array of JHtml options.
|
||||
*/
|
||||
protected function getOptions()
|
||||
{
|
||||
// Get a db connection.
|
||||
$db = JFactory::getDbo();
|
||||
|
||||
// Create a new query object.
|
||||
$query = $db->getQuery(true);
|
||||
|
||||
// Select the text.
|
||||
$query->select($db->quoteName('companyname'));
|
||||
$query->from($db->quoteName('#__componentbuilder_joomla_component'));
|
||||
$query->order($db->quoteName('companyname') . ' ASC');
|
||||
|
||||
// Reset the query using our newly populated query object.
|
||||
$db->setQuery($query);
|
||||
|
||||
$results = $db->loadColumn();
|
||||
$_filter = array();
|
||||
$_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_COMPANYNAME') . ' -');
|
||||
|
||||
if ($results)
|
||||
{
|
||||
$results = array_unique($results);
|
||||
foreach ($results as $companyname)
|
||||
{
|
||||
// Now add the companyname and its text to the options array
|
||||
$_filter[] = JHtml::_('select.option', $companyname, $companyname);
|
||||
}
|
||||
}
|
||||
return $_filter;
|
||||
}
|
||||
}
|
71
admin/models/fields/joomlamodulesfiltertarget.php
Normal file
71
admin/models/fields/joomlamodulesfiltertarget.php
Normal file
@ -0,0 +1,71 @@
|
||||
<?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.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
// import the list field type
|
||||
jimport('joomla.form.helper');
|
||||
JFormHelper::loadFieldClass('list');
|
||||
|
||||
/**
|
||||
* Joomlamodulesfiltertarget Form Field class for the Componentbuilder component
|
||||
*/
|
||||
class JFormFieldJoomlamodulesfiltertarget extends JFormFieldList
|
||||
{
|
||||
/**
|
||||
* The joomlamodulesfiltertarget field type.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $type = 'joomlamodulesfiltertarget';
|
||||
|
||||
/**
|
||||
* Method to get a list of options for a list input.
|
||||
*
|
||||
* @return array An array of JHtml options.
|
||||
*/
|
||||
protected function getOptions()
|
||||
{
|
||||
// Get a db connection.
|
||||
$db = JFactory::getDbo();
|
||||
|
||||
// Create a new query object.
|
||||
$query = $db->getQuery(true);
|
||||
|
||||
// Select the text.
|
||||
$query->select($db->quoteName('target'));
|
||||
$query->from($db->quoteName('#__componentbuilder_joomla_module'));
|
||||
$query->order($db->quoteName('target') . ' ASC');
|
||||
|
||||
// Reset the query using our newly populated query object.
|
||||
$db->setQuery($query);
|
||||
|
||||
$results = $db->loadColumn();
|
||||
$_filter = array();
|
||||
$_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_TARGET') . ' -');
|
||||
|
||||
if ($results)
|
||||
{
|
||||
// get joomla_modulesmodel
|
||||
$model = ComponentbuilderHelper::getModel('joomla_modules');
|
||||
$results = array_unique($results);
|
||||
foreach ($results as $target)
|
||||
{
|
||||
// Translate the target selection
|
||||
$text = $model->selectionTranslation($target,'target');
|
||||
// Now add the target and its text to the options array
|
||||
$_filter[] = JHtml::_('select.option', $target, JText::_($text));
|
||||
}
|
||||
}
|
||||
return $_filter;
|
||||
}
|
||||
}
|
71
admin/models/fields/layoutsfilteraddphpview.php
Normal file
71
admin/models/fields/layoutsfilteraddphpview.php
Normal file
@ -0,0 +1,71 @@
|
||||
<?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.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
// import the list field type
|
||||
jimport('joomla.form.helper');
|
||||
JFormHelper::loadFieldClass('list');
|
||||
|
||||
/**
|
||||
* Layoutsfilteraddphpview Form Field class for the Componentbuilder component
|
||||
*/
|
||||
class JFormFieldLayoutsfilteraddphpview extends JFormFieldList
|
||||
{
|
||||
/**
|
||||
* The layoutsfilteraddphpview field type.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $type = 'layoutsfilteraddphpview';
|
||||
|
||||
/**
|
||||
* Method to get a list of options for a list input.
|
||||
*
|
||||
* @return array An array of JHtml options.
|
||||
*/
|
||||
protected function getOptions()
|
||||
{
|
||||
// Get a db connection.
|
||||
$db = JFactory::getDbo();
|
||||
|
||||
// Create a new query object.
|
||||
$query = $db->getQuery(true);
|
||||
|
||||
// Select the text.
|
||||
$query->select($db->quoteName('add_php_view'));
|
||||
$query->from($db->quoteName('#__componentbuilder_layout'));
|
||||
$query->order($db->quoteName('add_php_view') . ' ASC');
|
||||
|
||||
// Reset the query using our newly populated query object.
|
||||
$db->setQuery($query);
|
||||
|
||||
$results = $db->loadColumn();
|
||||
$_filter = array();
|
||||
$_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_ADD_PHP_VIEW') . ' -');
|
||||
|
||||
if ($results)
|
||||
{
|
||||
// get layoutsmodel
|
||||
$model = ComponentbuilderHelper::getModel('layouts');
|
||||
$results = array_unique($results);
|
||||
foreach ($results as $add_php_view)
|
||||
{
|
||||
// Translate the add_php_view selection
|
||||
$text = $model->selectionTranslation($add_php_view,'add_php_view');
|
||||
// Now add the add_php_view and its text to the options array
|
||||
$_filter[] = JHtml::_('select.option', $add_php_view, JText::_($text));
|
||||
}
|
||||
}
|
||||
return $_filter;
|
||||
}
|
||||
}
|
71
admin/models/fields/librariesfiltertarget.php
Normal file
71
admin/models/fields/librariesfiltertarget.php
Normal file
@ -0,0 +1,71 @@
|
||||
<?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.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
// import the list field type
|
||||
jimport('joomla.form.helper');
|
||||
JFormHelper::loadFieldClass('list');
|
||||
|
||||
/**
|
||||
* Librariesfiltertarget Form Field class for the Componentbuilder component
|
||||
*/
|
||||
class JFormFieldLibrariesfiltertarget extends JFormFieldList
|
||||
{
|
||||
/**
|
||||
* The librariesfiltertarget field type.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $type = 'librariesfiltertarget';
|
||||
|
||||
/**
|
||||
* Method to get a list of options for a list input.
|
||||
*
|
||||
* @return array An array of JHtml options.
|
||||
*/
|
||||
protected function getOptions()
|
||||
{
|
||||
// Get a db connection.
|
||||
$db = JFactory::getDbo();
|
||||
|
||||
// Create a new query object.
|
||||
$query = $db->getQuery(true);
|
||||
|
||||
// Select the text.
|
||||
$query->select($db->quoteName('target'));
|
||||
$query->from($db->quoteName('#__componentbuilder_library'));
|
||||
$query->order($db->quoteName('target') . ' ASC');
|
||||
|
||||
// Reset the query using our newly populated query object.
|
||||
$db->setQuery($query);
|
||||
|
||||
$results = $db->loadColumn();
|
||||
$_filter = array();
|
||||
$_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_TARGET') . ' -');
|
||||
|
||||
if ($results)
|
||||
{
|
||||
// get librariesmodel
|
||||
$model = ComponentbuilderHelper::getModel('libraries');
|
||||
$results = array_unique($results);
|
||||
foreach ($results as $target)
|
||||
{
|
||||
// Translate the target selection
|
||||
$text = $model->selectionTranslation($target,'target');
|
||||
// Now add the target and its text to the options array
|
||||
$_filter[] = JHtml::_('select.option', $target, JText::_($text));
|
||||
}
|
||||
}
|
||||
return $_filter;
|
||||
}
|
||||
}
|
71
admin/models/fields/librariesfiltertype.php
Normal file
71
admin/models/fields/librariesfiltertype.php
Normal file
@ -0,0 +1,71 @@
|
||||
<?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.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
// import the list field type
|
||||
jimport('joomla.form.helper');
|
||||
JFormHelper::loadFieldClass('list');
|
||||
|
||||
/**
|
||||
* Librariesfiltertype Form Field class for the Componentbuilder component
|
||||
*/
|
||||
class JFormFieldLibrariesfiltertype extends JFormFieldList
|
||||
{
|
||||
/**
|
||||
* The librariesfiltertype field type.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $type = 'librariesfiltertype';
|
||||
|
||||
/**
|
||||
* Method to get a list of options for a list input.
|
||||
*
|
||||
* @return array An array of JHtml options.
|
||||
*/
|
||||
protected function getOptions()
|
||||
{
|
||||
// Get a db connection.
|
||||
$db = JFactory::getDbo();
|
||||
|
||||
// Create a new query object.
|
||||
$query = $db->getQuery(true);
|
||||
|
||||
// Select the text.
|
||||
$query->select($db->quoteName('type'));
|
||||
$query->from($db->quoteName('#__componentbuilder_library'));
|
||||
$query->order($db->quoteName('type') . ' ASC');
|
||||
|
||||
// Reset the query using our newly populated query object.
|
||||
$db->setQuery($query);
|
||||
|
||||
$results = $db->loadColumn();
|
||||
$_filter = array();
|
||||
$_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_TYPE') . ' -');
|
||||
|
||||
if ($results)
|
||||
{
|
||||
// get librariesmodel
|
||||
$model = ComponentbuilderHelper::getModel('libraries');
|
||||
$results = array_unique($results);
|
||||
foreach ($results as $type)
|
||||
{
|
||||
// Translate the type selection
|
||||
$text = $model->selectionTranslation($type,'type');
|
||||
// Now add the type and its text to the options array
|
||||
$_filter[] = JHtml::_('select.option', $type, JText::_($text));
|
||||
}
|
||||
}
|
||||
return $_filter;
|
||||
}
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user