Stable release of v3.2.0-beta1
Move beta to main repo. Fix #1053 so that the right and left tabs display correctly in Joomla 4&5.
This commit is contained in:
@ -12,6 +12,10 @@
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
|
||||
// import the list field type
|
||||
jimport('joomla.form.helper');
|
||||
JFormHelper::loadFieldClass('list');
|
||||
@ -24,14 +28,14 @@ class JFormFieldAdminlistvieworderfields extends JFormFieldList
|
||||
/**
|
||||
* The adminlistvieworderfields field type.
|
||||
*
|
||||
* @var string
|
||||
* @var string
|
||||
*/
|
||||
public $type = 'adminlistvieworderfields';
|
||||
|
||||
/**
|
||||
* Method to get a list of options for a list input.
|
||||
*
|
||||
* @return array An array of JHtml options.
|
||||
* @return array An array of Html options.
|
||||
*/
|
||||
protected function getOptions()
|
||||
{
|
||||
|
@ -12,6 +12,10 @@
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
|
||||
// import the list field type
|
||||
jimport('joomla.form.helper');
|
||||
JFormHelper::loadFieldClass('list');
|
||||
@ -24,14 +28,14 @@ class JFormFieldAdminsviews extends JFormFieldList
|
||||
/**
|
||||
* The adminsviews field type.
|
||||
*
|
||||
* @var string
|
||||
* @var string
|
||||
*/
|
||||
public $type = 'adminsviews';
|
||||
|
||||
/**
|
||||
* Method to get a list of options for a list input.
|
||||
*
|
||||
* @return array An array of JHtml options.
|
||||
* @return array An array of Html options.
|
||||
*/
|
||||
protected function getOptions()
|
||||
{
|
||||
|
@ -12,6 +12,11 @@
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
use VDM\Joomla\Utilities\StringHelper;
|
||||
|
||||
// import the list field type
|
||||
jimport('joomla.form.helper');
|
||||
JFormHelper::loadFieldClass('list');
|
||||
@ -24,33 +29,36 @@ class JFormFieldAdminviewfolderlist extends JFormFieldList
|
||||
/**
|
||||
* The adminviewfolderlist field type.
|
||||
*
|
||||
* @var string
|
||||
* @var string
|
||||
*/
|
||||
public $type = 'adminviewfolderlist';
|
||||
|
||||
/**
|
||||
* Method to get a list of options for a list input.
|
||||
*
|
||||
* @return array An array of JHtml options.
|
||||
* @return array An array of Html options.
|
||||
*/
|
||||
protected function getOptions()
|
||||
{
|
||||
// get custom folder files
|
||||
$localfolder = JPATH_COMPONENT_ADMINISTRATOR.'/views';
|
||||
$localfolders = [];
|
||||
$localfolders[] = JPATH_ADMINISTRATOR . '/components/com_componentbuilder/views';
|
||||
$localfolders[] = JPATH_ADMINISTRATOR . '/components/com_componentbuilder/src/View';
|
||||
// set the default
|
||||
$options = array();
|
||||
// import all needed classes
|
||||
jimport('joomla.filesystem.folder');
|
||||
$options = [];
|
||||
// now check if there are files in the folder
|
||||
if (JFolder::exists($localfolder) && $folders = JFolder::folders($localfolder))
|
||||
foreach ($localfolders as $localfolder)
|
||||
{
|
||||
if ($this->multiple === false)
|
||||
if (is_dir($localfolder) && $folders = \Joomla\Filesystem\Folder::folders($localfolder))
|
||||
{
|
||||
$options[] = JHtml::_('select.option', '', JText::_('COM_COMPONENTBUILDER_SELECT_AN_ADMIN_VIEW'));
|
||||
}
|
||||
foreach ($folders as $folder)
|
||||
{
|
||||
$options[] = JHtml::_('select.option', $folder, ComponentbuilderHelper::safeString($folder, 'W'));
|
||||
if ($this->multiple === false)
|
||||
{
|
||||
$options[] = Html::_('select.option', '', Text::_('COM_COMPONENTBUILDER_SELECT_AN_ADMIN_VIEW'));
|
||||
}
|
||||
foreach ($folders as $folder)
|
||||
{
|
||||
$options[] = Html::_('select.option', $folder, StringHelper::safe($folder, 'W'));
|
||||
}
|
||||
}
|
||||
}
|
||||
return $options;
|
||||
|
@ -12,6 +12,10 @@
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
|
||||
// import the list field type
|
||||
jimport('joomla.form.helper');
|
||||
JFormHelper::loadFieldClass('list');
|
||||
@ -24,14 +28,14 @@ class JFormFieldAdminviews extends JFormFieldList
|
||||
/**
|
||||
* The adminviews field type.
|
||||
*
|
||||
* @var string
|
||||
* @var string
|
||||
*/
|
||||
public $type = 'adminviews';
|
||||
|
||||
/**
|
||||
* Method to get a list of options for a list input.
|
||||
*
|
||||
* @return array An array of JHtml options.
|
||||
* @return array An array of Html options.
|
||||
*/
|
||||
protected function getOptions()
|
||||
{
|
||||
|
@ -12,6 +12,10 @@
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
|
||||
// import the list field type
|
||||
jimport('joomla.form.helper');
|
||||
JFormHelper::loadFieldClass('list');
|
||||
@ -24,19 +28,19 @@ class JFormFieldAdminviewsfilteraddcustombutton extends JFormFieldList
|
||||
/**
|
||||
* The adminviewsfilteraddcustombutton field type.
|
||||
*
|
||||
* @var string
|
||||
* @var string
|
||||
*/
|
||||
public $type = 'adminviewsfilteraddcustombutton';
|
||||
|
||||
/**
|
||||
* Method to get a list of options for a list input.
|
||||
*
|
||||
* @return array An array of JHtml options.
|
||||
* @return array An array of Html options.
|
||||
*/
|
||||
protected function getOptions()
|
||||
{
|
||||
// Get a db connection.
|
||||
$db = JFactory::getDbo();
|
||||
$db = Factory::getDbo();
|
||||
|
||||
// Create a new query object.
|
||||
$query = $db->getQuery(true);
|
||||
@ -50,8 +54,8 @@ class JFormFieldAdminviewsfilteraddcustombutton extends JFormFieldList
|
||||
$db->setQuery($query);
|
||||
|
||||
$_results = $db->loadColumn();
|
||||
$_filter = array();
|
||||
$_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_ADD_CUSTOM_BUTTONS') . ' -');
|
||||
$_filter = [];
|
||||
$_filter[] = Html::_('select.option', '', '- ' . Text::_('COM_COMPONENTBUILDER_FILTER_SELECT_ADD_CUSTOM_BUTTONS') . ' -');
|
||||
|
||||
if ($_results)
|
||||
{
|
||||
@ -63,7 +67,7 @@ class JFormFieldAdminviewsfilteraddcustombutton extends JFormFieldList
|
||||
// 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));
|
||||
$_filter[] = Html::_('select.option', $add_custom_button, Text::_($_text));
|
||||
}
|
||||
}
|
||||
return $_filter;
|
||||
|
@ -12,6 +12,10 @@
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
|
||||
// import the list field type
|
||||
jimport('joomla.form.helper');
|
||||
JFormHelper::loadFieldClass('list');
|
||||
@ -24,19 +28,19 @@ class JFormFieldAdminviewsfilteraddcustomimport extends JFormFieldList
|
||||
/**
|
||||
* The adminviewsfilteraddcustomimport field type.
|
||||
*
|
||||
* @var string
|
||||
* @var string
|
||||
*/
|
||||
public $type = 'adminviewsfilteraddcustomimport';
|
||||
|
||||
/**
|
||||
* Method to get a list of options for a list input.
|
||||
*
|
||||
* @return array An array of JHtml options.
|
||||
* @return array An array of Html options.
|
||||
*/
|
||||
protected function getOptions()
|
||||
{
|
||||
// Get a db connection.
|
||||
$db = JFactory::getDbo();
|
||||
$db = Factory::getDbo();
|
||||
|
||||
// Create a new query object.
|
||||
$query = $db->getQuery(true);
|
||||
@ -50,8 +54,8 @@ class JFormFieldAdminviewsfilteraddcustomimport extends JFormFieldList
|
||||
$db->setQuery($query);
|
||||
|
||||
$_results = $db->loadColumn();
|
||||
$_filter = array();
|
||||
$_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_ADD_CUSTOM_IMPORT') . ' -');
|
||||
$_filter = [];
|
||||
$_filter[] = Html::_('select.option', '', '- ' . Text::_('COM_COMPONENTBUILDER_FILTER_SELECT_ADD_CUSTOM_IMPORT') . ' -');
|
||||
|
||||
if ($_results)
|
||||
{
|
||||
@ -63,7 +67,7 @@ class JFormFieldAdminviewsfilteraddcustomimport extends JFormFieldList
|
||||
// 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));
|
||||
$_filter[] = Html::_('select.option', $add_custom_import, Text::_($_text));
|
||||
}
|
||||
}
|
||||
return $_filter;
|
||||
|
@ -12,6 +12,10 @@
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
|
||||
// import the list field type
|
||||
jimport('joomla.form.helper');
|
||||
JFormHelper::loadFieldClass('list');
|
||||
@ -24,19 +28,19 @@ class JFormFieldAdminviewsfilteraddfadein extends JFormFieldList
|
||||
/**
|
||||
* The adminviewsfilteraddfadein field type.
|
||||
*
|
||||
* @var string
|
||||
* @var string
|
||||
*/
|
||||
public $type = 'adminviewsfilteraddfadein';
|
||||
|
||||
/**
|
||||
* Method to get a list of options for a list input.
|
||||
*
|
||||
* @return array An array of JHtml options.
|
||||
* @return array An array of Html options.
|
||||
*/
|
||||
protected function getOptions()
|
||||
{
|
||||
// Get a db connection.
|
||||
$db = JFactory::getDbo();
|
||||
$db = Factory::getDbo();
|
||||
|
||||
// Create a new query object.
|
||||
$query = $db->getQuery(true);
|
||||
@ -50,8 +54,8 @@ class JFormFieldAdminviewsfilteraddfadein extends JFormFieldList
|
||||
$db->setQuery($query);
|
||||
|
||||
$_results = $db->loadColumn();
|
||||
$_filter = array();
|
||||
$_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_FADE_IN_AFFECT') . ' -');
|
||||
$_filter = [];
|
||||
$_filter[] = Html::_('select.option', '', '- ' . Text::_('COM_COMPONENTBUILDER_FILTER_SELECT_FADE_IN_AFFECT') . ' -');
|
||||
|
||||
if ($_results)
|
||||
{
|
||||
@ -63,7 +67,7 @@ class JFormFieldAdminviewsfilteraddfadein extends JFormFieldList
|
||||
// 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));
|
||||
$_filter[] = Html::_('select.option', $add_fadein, Text::_($_text));
|
||||
}
|
||||
}
|
||||
return $_filter;
|
||||
|
@ -12,6 +12,10 @@
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
|
||||
// import the list field type
|
||||
jimport('joomla.form.helper');
|
||||
JFormHelper::loadFieldClass('list');
|
||||
@ -24,19 +28,19 @@ class JFormFieldAdminviewsfilteraddphpajax extends JFormFieldList
|
||||
/**
|
||||
* The adminviewsfilteraddphpajax field type.
|
||||
*
|
||||
* @var string
|
||||
* @var string
|
||||
*/
|
||||
public $type = 'adminviewsfilteraddphpajax';
|
||||
|
||||
/**
|
||||
* Method to get a list of options for a list input.
|
||||
*
|
||||
* @return array An array of JHtml options.
|
||||
* @return array An array of Html options.
|
||||
*/
|
||||
protected function getOptions()
|
||||
{
|
||||
// Get a db connection.
|
||||
$db = JFactory::getDbo();
|
||||
$db = Factory::getDbo();
|
||||
|
||||
// Create a new query object.
|
||||
$query = $db->getQuery(true);
|
||||
@ -50,8 +54,8 @@ class JFormFieldAdminviewsfilteraddphpajax extends JFormFieldList
|
||||
$db->setQuery($query);
|
||||
|
||||
$_results = $db->loadColumn();
|
||||
$_filter = array();
|
||||
$_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_ADD_PHP_AJAX') . ' -');
|
||||
$_filter = [];
|
||||
$_filter[] = Html::_('select.option', '', '- ' . Text::_('COM_COMPONENTBUILDER_FILTER_SELECT_ADD_PHP_AJAX') . ' -');
|
||||
|
||||
if ($_results)
|
||||
{
|
||||
@ -63,7 +67,7 @@ class JFormFieldAdminviewsfilteraddphpajax extends JFormFieldList
|
||||
// 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));
|
||||
$_filter[] = Html::_('select.option', $add_php_ajax, Text::_($_text));
|
||||
}
|
||||
}
|
||||
return $_filter;
|
||||
|
@ -12,6 +12,10 @@
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
|
||||
// import the list field type
|
||||
jimport('joomla.form.helper');
|
||||
JFormHelper::loadFieldClass('list');
|
||||
@ -24,19 +28,19 @@ class JFormFieldAdminviewsfiltertype extends JFormFieldList
|
||||
/**
|
||||
* The adminviewsfiltertype field type.
|
||||
*
|
||||
* @var string
|
||||
* @var string
|
||||
*/
|
||||
public $type = 'adminviewsfiltertype';
|
||||
|
||||
/**
|
||||
* Method to get a list of options for a list input.
|
||||
*
|
||||
* @return array An array of JHtml options.
|
||||
* @return array An array of Html options.
|
||||
*/
|
||||
protected function getOptions()
|
||||
{
|
||||
// Get a db connection.
|
||||
$db = JFactory::getDbo();
|
||||
$db = Factory::getDbo();
|
||||
|
||||
// Create a new query object.
|
||||
$query = $db->getQuery(true);
|
||||
@ -50,7 +54,7 @@ class JFormFieldAdminviewsfiltertype extends JFormFieldList
|
||||
$db->setQuery($query);
|
||||
|
||||
$_results = $db->loadColumn();
|
||||
$_filter = array();
|
||||
$_filter = [];
|
||||
|
||||
if ($_results)
|
||||
{
|
||||
@ -62,7 +66,7 @@ class JFormFieldAdminviewsfiltertype extends JFormFieldList
|
||||
// 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));
|
||||
$_filter[] = Html::_('select.option', $type, Text::_($_text));
|
||||
}
|
||||
}
|
||||
return $_filter;
|
||||
|
@ -12,6 +12,10 @@
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
|
||||
// import the list field type
|
||||
jimport('joomla.form.helper');
|
||||
JFormHelper::loadFieldClass('list');
|
||||
@ -24,18 +28,18 @@ class JFormFieldAdminviewsreadonly extends JFormFieldList
|
||||
/**
|
||||
* The adminviewsreadonly field type.
|
||||
*
|
||||
* @var string
|
||||
* @var string
|
||||
*/
|
||||
public $type = 'adminviewsreadonly';
|
||||
|
||||
/**
|
||||
* Method to get a list of options for a list input.
|
||||
*
|
||||
* @return array An array of JHtml options.
|
||||
* @return array An array of Html options.
|
||||
*/
|
||||
protected function getOptions()
|
||||
{
|
||||
$db = JFactory::getDBO();
|
||||
$db = Factory::getDBO();
|
||||
$query = $db->getQuery(true);
|
||||
$query->select($db->quoteName(array('a.id','a.system_name'),array('id','admin_view_system_name')));
|
||||
$query->from($db->quoteName('#__componentbuilder_admin_view', 'a'));
|
||||
@ -45,10 +49,10 @@ $items = $db->loadObjectList();
|
||||
$options = array();
|
||||
if ($items)
|
||||
{
|
||||
$options[] = JHtml::_('select.option', '', 'Select an option');
|
||||
$options[] = Html::_('select.option', '', 'Select an option');
|
||||
foreach($items as $item)
|
||||
{
|
||||
$options[] = JHtml::_('select.option', $item->id, $item->admin_view_system_name);
|
||||
$options[] = Html::_('select.option', $item->id, $item->admin_view_system_name);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -12,6 +12,12 @@
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
use VDM\Joomla\Utilities\JsonHelper;
|
||||
use VDM\Joomla\Utilities\ArrayHelper;
|
||||
|
||||
// import the list field type
|
||||
jimport('joomla.form.helper');
|
||||
JFormHelper::loadFieldClass('list');
|
||||
@ -24,21 +30,21 @@ class JFormFieldAliasbuilder extends JFormFieldList
|
||||
/**
|
||||
* The aliasbuilder field type.
|
||||
*
|
||||
* @var string
|
||||
* @var string
|
||||
*/
|
||||
public $type = 'aliasbuilder';
|
||||
|
||||
/**
|
||||
* Method to get a list of options for a list input.
|
||||
*
|
||||
* @return array An array of JHtml options.
|
||||
* @return array An array of Html options.
|
||||
*/
|
||||
protected function getOptions()
|
||||
{
|
||||
// load the db object
|
||||
$db = JFactory::getDBO();
|
||||
$db = Factory::getDBO();
|
||||
// get the input from url
|
||||
$jinput = JFactory::getApplication()->input;
|
||||
$jinput = Factory::getApplication()->input;
|
||||
// get the id
|
||||
$adminView = $jinput->getInt('id', 0);
|
||||
// rest the fields ids
|
||||
@ -48,10 +54,10 @@ class JFormFieldAliasbuilder extends JFormFieldList
|
||||
// get all the fields linked to the admin view
|
||||
if ($addFields = ComponentbuilderHelper::getVar('admin_fields', (int) $adminView, 'admin_view', 'addfields'))
|
||||
{
|
||||
if (ComponentbuilderHelper::checkJson($addFields))
|
||||
if (JsonHelper::check($addFields))
|
||||
{
|
||||
$addFields = json_decode($addFields, true);
|
||||
if (ComponentbuilderHelper::checkArray($addFields))
|
||||
if (ArrayHelper::check($addFields))
|
||||
{
|
||||
foreach($addFields as $addField)
|
||||
{
|
||||
@ -65,7 +71,7 @@ class JFormFieldAliasbuilder extends JFormFieldList
|
||||
}
|
||||
}
|
||||
// filter by fields linked
|
||||
if (ComponentbuilderHelper::checkArray($fieldIds))
|
||||
if (ArrayHelper::check($fieldIds))
|
||||
{
|
||||
// get list of field types that does not work in list views (note, spacer)
|
||||
$spacers = ComponentbuilderHelper::getSpacerIds();
|
||||
@ -77,7 +83,7 @@ class JFormFieldAliasbuilder extends JFormFieldList
|
||||
// only load these fields
|
||||
$query->where($db->quoteName('a.id') . ' IN (' . implode(',', $fieldIds) . ')');
|
||||
// none of these field types
|
||||
if (ComponentbuilderHelper::checkArray($spacers))
|
||||
if (ArrayHelper::check($spacers))
|
||||
{
|
||||
$query->where($db->quoteName('a.fieldtype') . ' NOT IN (' . implode(',', $spacers) . ')');
|
||||
}
|
||||
@ -89,11 +95,11 @@ class JFormFieldAliasbuilder extends JFormFieldList
|
||||
{
|
||||
foreach($items as $item)
|
||||
{
|
||||
$options[] = JHtml::_('select.option', $item->id, $item->name . ' [' . $item->type . ']');
|
||||
$options[] = Html::_('select.option', $item->id, $item->name . ' [' . $item->type . ']');
|
||||
}
|
||||
return $options;
|
||||
}
|
||||
}
|
||||
return array(JHtml::_('select.option', '', JText::_('COM_COMPONENTBUILDER_ADD_MORE_FIELDS_TO_THIS_ADMIN_VIEW')));
|
||||
return array(Html::_('select.option', '', Text::_('COM_COMPONENTBUILDER_ADD_MORE_FIELDS_TO_THIS_ADMIN_VIEW')));
|
||||
}
|
||||
}
|
||||
|
@ -12,6 +12,10 @@
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
|
||||
// import the list field type
|
||||
jimport('joomla.form.helper');
|
||||
JFormHelper::loadFieldClass('list');
|
||||
@ -24,14 +28,14 @@ class JFormFieldArticles extends JFormFieldList
|
||||
/**
|
||||
* The articles field type.
|
||||
*
|
||||
* @var string
|
||||
* @var string
|
||||
*/
|
||||
public $type = 'articles';
|
||||
|
||||
/**
|
||||
* Method to get a list of options for a list input.
|
||||
*
|
||||
* @return array An array of JHtml options.
|
||||
* @return array An array of Html options.
|
||||
*/
|
||||
protected function getOptions()
|
||||
{
|
||||
|
@ -12,6 +12,10 @@
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
|
||||
// import the list field type
|
||||
jimport('joomla.form.helper');
|
||||
JFormHelper::loadFieldClass('list');
|
||||
@ -24,19 +28,19 @@ class JFormFieldClassextendingsfilterextensiontype extends JFormFieldList
|
||||
/**
|
||||
* The classextendingsfilterextensiontype field type.
|
||||
*
|
||||
* @var string
|
||||
* @var string
|
||||
*/
|
||||
public $type = 'classextendingsfilterextensiontype';
|
||||
|
||||
/**
|
||||
* Method to get a list of options for a list input.
|
||||
*
|
||||
* @return array An array of JHtml options.
|
||||
* @return array An array of Html options.
|
||||
*/
|
||||
protected function getOptions()
|
||||
{
|
||||
// Get a db connection.
|
||||
$db = JFactory::getDbo();
|
||||
$db = Factory::getDbo();
|
||||
|
||||
// Create a new query object.
|
||||
$query = $db->getQuery(true);
|
||||
@ -50,8 +54,8 @@ class JFormFieldClassextendingsfilterextensiontype extends JFormFieldList
|
||||
$db->setQuery($query);
|
||||
|
||||
$_results = $db->loadColumn();
|
||||
$_filter = array();
|
||||
$_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_TYPE') . ' -');
|
||||
$_filter = [];
|
||||
$_filter[] = Html::_('select.option', '', '- ' . Text::_('COM_COMPONENTBUILDER_FILTER_SELECT_TYPE') . ' -');
|
||||
|
||||
if ($_results)
|
||||
{
|
||||
@ -63,7 +67,7 @@ class JFormFieldClassextendingsfilterextensiontype extends JFormFieldList
|
||||
// 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));
|
||||
$_filter[] = Html::_('select.option', $extension_type, Text::_($_text));
|
||||
}
|
||||
}
|
||||
return $_filter;
|
||||
|
@ -12,6 +12,10 @@
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
|
||||
// import the list field type
|
||||
jimport('joomla.form.helper');
|
||||
JFormHelper::loadFieldClass('list');
|
||||
@ -24,7 +28,7 @@ class JFormFieldClassextends extends JFormFieldList
|
||||
/**
|
||||
* The classextends field type.
|
||||
*
|
||||
* @var string
|
||||
* @var string
|
||||
*/
|
||||
public $type = 'classextends';
|
||||
|
||||
@ -48,7 +52,7 @@ class JFormFieldClassextends extends JFormFieldList
|
||||
$script = array();
|
||||
$button_code_name = $this->getAttribute('name');
|
||||
// get the input from url
|
||||
$app = JFactory::getApplication();
|
||||
$app = Factory::getApplication();
|
||||
$jinput = $app->input;
|
||||
// get the view name & id
|
||||
$values = $jinput->getArray(array(
|
||||
@ -64,7 +68,7 @@ class JFormFieldClassextends extends JFormFieldList
|
||||
$ref = '&ref=' . $values['view'] . '&refid=' . $values['id'];
|
||||
$refJ = '&ref=' . $values['view'] . '&refid=' . $values['id'];
|
||||
// get the return value.
|
||||
$_uri = (string) JUri::getInstance();
|
||||
$_uri = (string) \Joomla\CMS\Uri\Uri::getInstance();
|
||||
$_return = urlencode(base64_encode($_uri));
|
||||
// load return value.
|
||||
$ref .= '&return=' . $_return;
|
||||
@ -77,20 +81,20 @@ class JFormFieldClassextends extends JFormFieldList
|
||||
$button_label = preg_replace("/[^A-Za-z ]/", '', $button_label);
|
||||
$button_label = ucfirst(strtolower($button_label));
|
||||
// get user object
|
||||
$user = JFactory::getUser();
|
||||
$user = Factory::getUser();
|
||||
// only add if user allowed to create class_extends
|
||||
if ($user->authorise('class_extends.create', 'com_componentbuilder') && $app->isAdmin()) // TODO for now only in admin area.
|
||||
if ($user->authorise('class_extends.create', 'com_componentbuilder') && $app->isClient('administrator')) // TODO for now only in admin area.
|
||||
{
|
||||
// build Create button
|
||||
$button[] = '<a id="'.$button_code_name.'Create" class="btn btn-small btn-success hasTooltip" title="'.JText::sprintf('COM_COMPONENTBUILDER_CREATE_NEW_S', $button_label).'" style="border-radius: 0px 4px 4px 0px; padding: 4px 4px 4px 7px;"
|
||||
$button[] = '<a id="'.$button_code_name.'Create" class="btn btn-small btn-success hasTooltip" title="'.Text::sprintf('COM_COMPONENTBUILDER_CREATE_NEW_S', $button_label).'" style="border-radius: 0px 4px 4px 0px; padding: 4px 4px 4px 7px;"
|
||||
href="index.php?option=com_componentbuilder&view=class_extends&layout=edit'.$ref.'" >
|
||||
<span class="icon-new icon-white"></span></a>';
|
||||
}
|
||||
// only add if user allowed to edit class_extends
|
||||
if ($user->authorise('class_extends.edit', 'com_componentbuilder') && $app->isAdmin()) // TODO for now only in admin area.
|
||||
if ($user->authorise('class_extends.edit', 'com_componentbuilder') && $app->isClient('administrator')) // TODO for now only in admin area.
|
||||
{
|
||||
// build edit button
|
||||
$button[] = '<a id="'.$button_code_name.'Edit" class="btn btn-small hasTooltip" title="'.JText::sprintf('COM_COMPONENTBUILDER_EDIT_S', $button_label).'" style="display: none; padding: 4px 4px 4px 7px;" href="#" >
|
||||
$button[] = '<a id="'.$button_code_name.'Edit" class="btn btn-small hasTooltip" title="'.Text::sprintf('COM_COMPONENTBUILDER_EDIT_S', $button_label).'" style="display: none; padding: 4px 4px 4px 7px;" href="#" >
|
||||
<span class="icon-edit"></span></a>';
|
||||
// build script
|
||||
$script[] = "
|
||||
@ -123,7 +127,7 @@ class JFormFieldClassextends extends JFormFieldList
|
||||
if (is_array($button) && count($button) > 0)
|
||||
{
|
||||
// Load the needed script.
|
||||
$document = JFactory::getDocument();
|
||||
$document = Factory::getDocument();
|
||||
$document->addScriptDeclaration(implode(' ',$script));
|
||||
// return the button attached to input field.
|
||||
return '<div class="input-append">' .$html . implode('',$button).'</div>';
|
||||
@ -135,7 +139,7 @@ class JFormFieldClassextends extends JFormFieldList
|
||||
/**
|
||||
* Method to get a list of options for a list input.
|
||||
*
|
||||
* @return array An array of JHtml options.
|
||||
* @return array An array of Html options.
|
||||
*/
|
||||
protected function getOptions()
|
||||
{
|
||||
|
@ -12,6 +12,10 @@
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
|
||||
// import the list field type
|
||||
jimport('joomla.form.helper');
|
||||
JFormHelper::loadFieldClass('list');
|
||||
@ -24,19 +28,19 @@ class JFormFieldClassmethodsfilterextensiontype extends JFormFieldList
|
||||
/**
|
||||
* The classmethodsfilterextensiontype field type.
|
||||
*
|
||||
* @var string
|
||||
* @var string
|
||||
*/
|
||||
public $type = 'classmethodsfilterextensiontype';
|
||||
|
||||
/**
|
||||
* Method to get a list of options for a list input.
|
||||
*
|
||||
* @return array An array of JHtml options.
|
||||
* @return array An array of Html options.
|
||||
*/
|
||||
protected function getOptions()
|
||||
{
|
||||
// Get a db connection.
|
||||
$db = JFactory::getDbo();
|
||||
$db = Factory::getDbo();
|
||||
|
||||
// Create a new query object.
|
||||
$query = $db->getQuery(true);
|
||||
@ -50,8 +54,8 @@ class JFormFieldClassmethodsfilterextensiontype extends JFormFieldList
|
||||
$db->setQuery($query);
|
||||
|
||||
$_results = $db->loadColumn();
|
||||
$_filter = array();
|
||||
$_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_TYPE') . ' -');
|
||||
$_filter = [];
|
||||
$_filter[] = Html::_('select.option', '', '- ' . Text::_('COM_COMPONENTBUILDER_FILTER_SELECT_TYPE') . ' -');
|
||||
|
||||
if ($_results)
|
||||
{
|
||||
@ -63,7 +67,7 @@ class JFormFieldClassmethodsfilterextensiontype extends JFormFieldList
|
||||
// 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));
|
||||
$_filter[] = Html::_('select.option', $extension_type, Text::_($_text));
|
||||
}
|
||||
}
|
||||
return $_filter;
|
||||
|
@ -12,6 +12,10 @@
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
|
||||
// import the list field type
|
||||
jimport('joomla.form.helper');
|
||||
JFormHelper::loadFieldClass('list');
|
||||
@ -24,19 +28,19 @@ class JFormFieldClassmethodsfiltervisibility extends JFormFieldList
|
||||
/**
|
||||
* The classmethodsfiltervisibility field type.
|
||||
*
|
||||
* @var string
|
||||
* @var string
|
||||
*/
|
||||
public $type = 'classmethodsfiltervisibility';
|
||||
|
||||
/**
|
||||
* Method to get a list of options for a list input.
|
||||
*
|
||||
* @return array An array of JHtml options.
|
||||
* @return array An array of Html options.
|
||||
*/
|
||||
protected function getOptions()
|
||||
{
|
||||
// Get a db connection.
|
||||
$db = JFactory::getDbo();
|
||||
$db = Factory::getDbo();
|
||||
|
||||
// Create a new query object.
|
||||
$query = $db->getQuery(true);
|
||||
@ -50,8 +54,8 @@ class JFormFieldClassmethodsfiltervisibility extends JFormFieldList
|
||||
$db->setQuery($query);
|
||||
|
||||
$_results = $db->loadColumn();
|
||||
$_filter = array();
|
||||
$_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_VISIBILITY') . ' -');
|
||||
$_filter = [];
|
||||
$_filter[] = Html::_('select.option', '', '- ' . Text::_('COM_COMPONENTBUILDER_FILTER_SELECT_VISIBILITY') . ' -');
|
||||
|
||||
if ($_results)
|
||||
{
|
||||
@ -63,7 +67,7 @@ class JFormFieldClassmethodsfiltervisibility extends JFormFieldList
|
||||
// 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));
|
||||
$_filter[] = Html::_('select.option', $visibility, Text::_($_text));
|
||||
}
|
||||
}
|
||||
return $_filter;
|
||||
|
@ -12,6 +12,10 @@
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
|
||||
// import the list field type
|
||||
jimport('joomla.form.helper');
|
||||
JFormHelper::loadFieldClass('list');
|
||||
@ -24,7 +28,7 @@ class JFormFieldClasspowers extends JFormFieldList
|
||||
/**
|
||||
* The classpowers field type.
|
||||
*
|
||||
* @var string
|
||||
* @var string
|
||||
*/
|
||||
public $type = 'classpowers';
|
||||
|
||||
@ -48,7 +52,7 @@ class JFormFieldClasspowers extends JFormFieldList
|
||||
$script = array();
|
||||
$button_code_name = $this->getAttribute('name');
|
||||
// get the input from url
|
||||
$app = JFactory::getApplication();
|
||||
$app = Factory::getApplication();
|
||||
$jinput = $app->input;
|
||||
// get the view name & id
|
||||
$values = $jinput->getArray(array(
|
||||
@ -64,7 +68,7 @@ class JFormFieldClasspowers extends JFormFieldList
|
||||
$ref = '&ref=' . $values['view'] . '&refid=' . $values['id'];
|
||||
$refJ = '&ref=' . $values['view'] . '&refid=' . $values['id'];
|
||||
// get the return value.
|
||||
$_uri = (string) JUri::getInstance();
|
||||
$_uri = (string) \Joomla\CMS\Uri\Uri::getInstance();
|
||||
$_return = urlencode(base64_encode($_uri));
|
||||
// load return value.
|
||||
$ref .= '&return=' . $_return;
|
||||
@ -77,20 +81,20 @@ class JFormFieldClasspowers extends JFormFieldList
|
||||
$button_label = preg_replace("/[^A-Za-z ]/", '', $button_label);
|
||||
$button_label = ucfirst(strtolower($button_label));
|
||||
// get user object
|
||||
$user = JFactory::getUser();
|
||||
$user = Factory::getUser();
|
||||
// only add if user allowed to create power
|
||||
if ($user->authorise('power.create', 'com_componentbuilder') && $app->isAdmin()) // TODO for now only in admin area.
|
||||
if ($user->authorise('power.create', 'com_componentbuilder') && $app->isClient('administrator')) // TODO for now only in admin area.
|
||||
{
|
||||
// build Create button
|
||||
$button[] = '<a id="'.$button_code_name.'Create" class="btn btn-small btn-success hasTooltip" title="'.JText::sprintf('COM_COMPONENTBUILDER_CREATE_NEW_S', $button_label).'" style="border-radius: 0px 4px 4px 0px; padding: 4px 4px 4px 7px;"
|
||||
$button[] = '<a id="'.$button_code_name.'Create" class="btn btn-small btn-success hasTooltip" title="'.Text::sprintf('COM_COMPONENTBUILDER_CREATE_NEW_S', $button_label).'" style="border-radius: 0px 4px 4px 0px; padding: 4px 4px 4px 7px;"
|
||||
href="index.php?option=com_componentbuilder&view=power&layout=edit'.$ref.'" >
|
||||
<span class="icon-new icon-white"></span></a>';
|
||||
}
|
||||
// only add if user allowed to edit power
|
||||
if ($user->authorise('power.edit', 'com_componentbuilder') && $app->isAdmin()) // TODO for now only in admin area.
|
||||
if ($user->authorise('power.edit', 'com_componentbuilder') && $app->isClient('administrator')) // TODO for now only in admin area.
|
||||
{
|
||||
// build edit button
|
||||
$button[] = '<a id="'.$button_code_name.'Edit" class="btn btn-small hasTooltip" title="'.JText::sprintf('COM_COMPONENTBUILDER_EDIT_S', $button_label).'" style="display: none; padding: 4px 4px 4px 7px;" href="#" >
|
||||
$button[] = '<a id="'.$button_code_name.'Edit" class="btn btn-small hasTooltip" title="'.Text::sprintf('COM_COMPONENTBUILDER_EDIT_S', $button_label).'" style="display: none; padding: 4px 4px 4px 7px;" href="#" >
|
||||
<span class="icon-edit"></span></a>';
|
||||
// build script
|
||||
$script[] = "
|
||||
@ -123,7 +127,7 @@ class JFormFieldClasspowers extends JFormFieldList
|
||||
if (is_array($button) && count($button) > 0)
|
||||
{
|
||||
// Load the needed script.
|
||||
$document = JFactory::getDocument();
|
||||
$document = Factory::getDocument();
|
||||
$document->addScriptDeclaration(implode(' ',$script));
|
||||
// return the button attached to input field.
|
||||
return '<div class="input-append">' .$html . implode('',$button).'</div>';
|
||||
@ -135,7 +139,7 @@ class JFormFieldClasspowers extends JFormFieldList
|
||||
/**
|
||||
* Method to get a list of options for a list input.
|
||||
*
|
||||
* @return array An array of JHtml options.
|
||||
* @return array An array of Html options.
|
||||
*/
|
||||
protected function getOptions()
|
||||
{
|
||||
|
@ -12,6 +12,10 @@
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
|
||||
// import the list field type
|
||||
jimport('joomla.form.helper');
|
||||
JFormHelper::loadFieldClass('list');
|
||||
@ -24,19 +28,19 @@ class JFormFieldClasspropertiesfilterextensiontype extends JFormFieldList
|
||||
/**
|
||||
* The classpropertiesfilterextensiontype field type.
|
||||
*
|
||||
* @var string
|
||||
* @var string
|
||||
*/
|
||||
public $type = 'classpropertiesfilterextensiontype';
|
||||
|
||||
/**
|
||||
* Method to get a list of options for a list input.
|
||||
*
|
||||
* @return array An array of JHtml options.
|
||||
* @return array An array of Html options.
|
||||
*/
|
||||
protected function getOptions()
|
||||
{
|
||||
// Get a db connection.
|
||||
$db = JFactory::getDbo();
|
||||
$db = Factory::getDbo();
|
||||
|
||||
// Create a new query object.
|
||||
$query = $db->getQuery(true);
|
||||
@ -50,8 +54,8 @@ class JFormFieldClasspropertiesfilterextensiontype extends JFormFieldList
|
||||
$db->setQuery($query);
|
||||
|
||||
$_results = $db->loadColumn();
|
||||
$_filter = array();
|
||||
$_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_TYPE') . ' -');
|
||||
$_filter = [];
|
||||
$_filter[] = Html::_('select.option', '', '- ' . Text::_('COM_COMPONENTBUILDER_FILTER_SELECT_TYPE') . ' -');
|
||||
|
||||
if ($_results)
|
||||
{
|
||||
@ -63,7 +67,7 @@ class JFormFieldClasspropertiesfilterextensiontype extends JFormFieldList
|
||||
// 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));
|
||||
$_filter[] = Html::_('select.option', $extension_type, Text::_($_text));
|
||||
}
|
||||
}
|
||||
return $_filter;
|
||||
|
@ -12,6 +12,10 @@
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
|
||||
// import the list field type
|
||||
jimport('joomla.form.helper');
|
||||
JFormHelper::loadFieldClass('list');
|
||||
@ -24,19 +28,19 @@ class JFormFieldClasspropertiesfiltervisibility extends JFormFieldList
|
||||
/**
|
||||
* The classpropertiesfiltervisibility field type.
|
||||
*
|
||||
* @var string
|
||||
* @var string
|
||||
*/
|
||||
public $type = 'classpropertiesfiltervisibility';
|
||||
|
||||
/**
|
||||
* Method to get a list of options for a list input.
|
||||
*
|
||||
* @return array An array of JHtml options.
|
||||
* @return array An array of Html options.
|
||||
*/
|
||||
protected function getOptions()
|
||||
{
|
||||
// Get a db connection.
|
||||
$db = JFactory::getDbo();
|
||||
$db = Factory::getDbo();
|
||||
|
||||
// Create a new query object.
|
||||
$query = $db->getQuery(true);
|
||||
@ -50,8 +54,8 @@ class JFormFieldClasspropertiesfiltervisibility extends JFormFieldList
|
||||
$db->setQuery($query);
|
||||
|
||||
$_results = $db->loadColumn();
|
||||
$_filter = array();
|
||||
$_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_VISIBILITY') . ' -');
|
||||
$_filter = [];
|
||||
$_filter[] = Html::_('select.option', '', '- ' . Text::_('COM_COMPONENTBUILDER_FILTER_SELECT_VISIBILITY') . ' -');
|
||||
|
||||
if ($_results)
|
||||
{
|
||||
@ -63,7 +67,7 @@ class JFormFieldClasspropertiesfiltervisibility extends JFormFieldList
|
||||
// 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));
|
||||
$_filter[] = Html::_('select.option', $visibility, Text::_($_text));
|
||||
}
|
||||
}
|
||||
return $_filter;
|
||||
|
@ -12,6 +12,10 @@
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
|
||||
// import the list field type
|
||||
jimport('joomla.form.helper');
|
||||
JFormHelper::loadFieldClass('list');
|
||||
@ -24,14 +28,14 @@ class JFormFieldComponentadminmenus extends JFormFieldList
|
||||
/**
|
||||
* The componentadminmenus field type.
|
||||
*
|
||||
* @var string
|
||||
* @var string
|
||||
*/
|
||||
public $type = 'componentadminmenus';
|
||||
|
||||
/**
|
||||
* Method to get a list of options for a list input.
|
||||
*
|
||||
* @return array An array of JHtml options.
|
||||
* @return array An array of Html options.
|
||||
*/
|
||||
protected function getOptions()
|
||||
{
|
||||
|
@ -12,6 +12,10 @@
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
|
||||
// import the list field type
|
||||
jimport('joomla.form.helper');
|
||||
JFormHelper::loadFieldClass('list');
|
||||
@ -24,14 +28,14 @@ class JFormFieldComponentadminviews extends JFormFieldList
|
||||
/**
|
||||
* The componentadminviews field type.
|
||||
*
|
||||
* @var string
|
||||
* @var string
|
||||
*/
|
||||
public $type = 'componentadminviews';
|
||||
|
||||
/**
|
||||
* Method to get a list of options for a list input.
|
||||
*
|
||||
* @return array An array of JHtml options.
|
||||
* @return array An array of Html options.
|
||||
*/
|
||||
protected function getOptions()
|
||||
{
|
||||
|
@ -0,0 +1,75 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Component.Builder
|
||||
*
|
||||
* @created 30th April, 2015
|
||||
* @author Llewellyn van der Merwe <https://dev.vdm.io>
|
||||
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
|
||||
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
|
||||
// import the list field type
|
||||
jimport('joomla.form.helper');
|
||||
JFormHelper::loadFieldClass('list');
|
||||
|
||||
/**
|
||||
* Componentsroutersfiltermodeconstructorafterparent Form Field class for the Componentbuilder component
|
||||
*/
|
||||
class JFormFieldComponentsroutersfiltermodeconstructorafterparent extends JFormFieldList
|
||||
{
|
||||
/**
|
||||
* The componentsroutersfiltermodeconstructorafterparent field type.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $type = 'componentsroutersfiltermodeconstructorafterparent';
|
||||
|
||||
/**
|
||||
* Method to get a list of options for a list input.
|
||||
*
|
||||
* @return array An array of Html options.
|
||||
*/
|
||||
protected function getOptions()
|
||||
{
|
||||
// Get a db connection.
|
||||
$db = Factory::getDbo();
|
||||
|
||||
// Create a new query object.
|
||||
$query = $db->getQuery(true);
|
||||
|
||||
// Select the text.
|
||||
$query->select($db->quoteName('mode_constructor_after_parent'));
|
||||
$query->from($db->quoteName('#__componentbuilder_component_router'));
|
||||
$query->order($db->quoteName('mode_constructor_after_parent') . ' ASC');
|
||||
|
||||
// Reset the query using our newly populated query object.
|
||||
$db->setQuery($query);
|
||||
|
||||
$_results = $db->loadColumn();
|
||||
$_filter = [];
|
||||
$_filter[] = Html::_('select.option', '', '- ' . Text::_('COM_COMPONENTBUILDER_FILTER_SELECT_ROUTER_MODECONSTRUCTOR_AFTER_PARENT') . ' -');
|
||||
|
||||
if ($_results)
|
||||
{
|
||||
// get components_routersmodel
|
||||
$_model = ComponentbuilderHelper::getModel('components_routers');
|
||||
$_results = array_unique($_results);
|
||||
foreach ($_results as $mode_constructor_after_parent)
|
||||
{
|
||||
// Translate the mode_constructor_after_parent selection
|
||||
$_text = $_model->selectionTranslation($mode_constructor_after_parent,'mode_constructor_after_parent');
|
||||
// Now add the mode_constructor_after_parent and its text to the options array
|
||||
$_filter[] = Html::_('select.option', $mode_constructor_after_parent, Text::_($_text));
|
||||
}
|
||||
}
|
||||
return $_filter;
|
||||
}
|
||||
}
|
@ -0,0 +1,75 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Component.Builder
|
||||
*
|
||||
* @created 30th April, 2015
|
||||
* @author Llewellyn van der Merwe <https://dev.vdm.io>
|
||||
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
|
||||
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
|
||||
// import the list field type
|
||||
jimport('joomla.form.helper');
|
||||
JFormHelper::loadFieldClass('list');
|
||||
|
||||
/**
|
||||
* Componentsroutersfiltermodeconstructorbeforeparent Form Field class for the Componentbuilder component
|
||||
*/
|
||||
class JFormFieldComponentsroutersfiltermodeconstructorbeforeparent extends JFormFieldList
|
||||
{
|
||||
/**
|
||||
* The componentsroutersfiltermodeconstructorbeforeparent field type.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $type = 'componentsroutersfiltermodeconstructorbeforeparent';
|
||||
|
||||
/**
|
||||
* Method to get a list of options for a list input.
|
||||
*
|
||||
* @return array An array of Html options.
|
||||
*/
|
||||
protected function getOptions()
|
||||
{
|
||||
// Get a db connection.
|
||||
$db = Factory::getDbo();
|
||||
|
||||
// Create a new query object.
|
||||
$query = $db->getQuery(true);
|
||||
|
||||
// Select the text.
|
||||
$query->select($db->quoteName('mode_constructor_before_parent'));
|
||||
$query->from($db->quoteName('#__componentbuilder_component_router'));
|
||||
$query->order($db->quoteName('mode_constructor_before_parent') . ' ASC');
|
||||
|
||||
// Reset the query using our newly populated query object.
|
||||
$db->setQuery($query);
|
||||
|
||||
$_results = $db->loadColumn();
|
||||
$_filter = [];
|
||||
$_filter[] = Html::_('select.option', '', '- ' . Text::_('COM_COMPONENTBUILDER_FILTER_SELECT_ROUTER_MODECONSTRUCTOR_BEFORE_PARENT') . ' -');
|
||||
|
||||
if ($_results)
|
||||
{
|
||||
// get components_routersmodel
|
||||
$_model = ComponentbuilderHelper::getModel('components_routers');
|
||||
$_results = array_unique($_results);
|
||||
foreach ($_results as $mode_constructor_before_parent)
|
||||
{
|
||||
// Translate the mode_constructor_before_parent selection
|
||||
$_text = $_model->selectionTranslation($mode_constructor_before_parent,'mode_constructor_before_parent');
|
||||
// Now add the mode_constructor_before_parent and its text to the options array
|
||||
$_filter[] = Html::_('select.option', $mode_constructor_before_parent, Text::_($_text));
|
||||
}
|
||||
}
|
||||
return $_filter;
|
||||
}
|
||||
}
|
75
admin/models/fields/componentsroutersfiltermodemethods.php
Normal file
75
admin/models/fields/componentsroutersfiltermodemethods.php
Normal file
@ -0,0 +1,75 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Component.Builder
|
||||
*
|
||||
* @created 30th April, 2015
|
||||
* @author Llewellyn van der Merwe <https://dev.vdm.io>
|
||||
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
|
||||
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
|
||||
// import the list field type
|
||||
jimport('joomla.form.helper');
|
||||
JFormHelper::loadFieldClass('list');
|
||||
|
||||
/**
|
||||
* Componentsroutersfiltermodemethods Form Field class for the Componentbuilder component
|
||||
*/
|
||||
class JFormFieldComponentsroutersfiltermodemethods extends JFormFieldList
|
||||
{
|
||||
/**
|
||||
* The componentsroutersfiltermodemethods field type.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $type = 'componentsroutersfiltermodemethods';
|
||||
|
||||
/**
|
||||
* Method to get a list of options for a list input.
|
||||
*
|
||||
* @return array An array of Html options.
|
||||
*/
|
||||
protected function getOptions()
|
||||
{
|
||||
// Get a db connection.
|
||||
$db = Factory::getDbo();
|
||||
|
||||
// Create a new query object.
|
||||
$query = $db->getQuery(true);
|
||||
|
||||
// Select the text.
|
||||
$query->select($db->quoteName('mode_methods'));
|
||||
$query->from($db->quoteName('#__componentbuilder_component_router'));
|
||||
$query->order($db->quoteName('mode_methods') . ' ASC');
|
||||
|
||||
// Reset the query using our newly populated query object.
|
||||
$db->setQuery($query);
|
||||
|
||||
$_results = $db->loadColumn();
|
||||
$_filter = [];
|
||||
$_filter[] = Html::_('select.option', '', '- ' . Text::_('COM_COMPONENTBUILDER_FILTER_SELECT_ROUTER_MODEMETHODS') . ' -');
|
||||
|
||||
if ($_results)
|
||||
{
|
||||
// get components_routersmodel
|
||||
$_model = ComponentbuilderHelper::getModel('components_routers');
|
||||
$_results = array_unique($_results);
|
||||
foreach ($_results as $mode_methods)
|
||||
{
|
||||
// Translate the mode_methods selection
|
||||
$_text = $_model->selectionTranslation($mode_methods,'mode_methods');
|
||||
// Now add the mode_methods and its text to the options array
|
||||
$_filter[] = Html::_('select.option', $mode_methods, Text::_($_text));
|
||||
}
|
||||
}
|
||||
return $_filter;
|
||||
}
|
||||
}
|
@ -12,6 +12,10 @@
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
|
||||
// import the list field type
|
||||
jimport('joomla.form.helper');
|
||||
JFormHelper::loadFieldClass('list');
|
||||
@ -24,14 +28,14 @@ class JFormFieldCustomadminviews extends JFormFieldList
|
||||
/**
|
||||
* The customadminviews field type.
|
||||
*
|
||||
* @var string
|
||||
* @var string
|
||||
*/
|
||||
public $type = 'customadminviews';
|
||||
|
||||
/**
|
||||
* Method to get a list of options for a list input.
|
||||
*
|
||||
* @return array An array of JHtml options.
|
||||
* @return array An array of Html options.
|
||||
*/
|
||||
protected function getOptions()
|
||||
{
|
||||
|
@ -12,6 +12,10 @@
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
|
||||
// import the list field type
|
||||
jimport('joomla.form.helper');
|
||||
JFormHelper::loadFieldClass('list');
|
||||
@ -24,19 +28,19 @@ class JFormFieldCustomadminviewsfilteraddcustombutton extends JFormFieldList
|
||||
/**
|
||||
* The customadminviewsfilteraddcustombutton field type.
|
||||
*
|
||||
* @var string
|
||||
* @var string
|
||||
*/
|
||||
public $type = 'customadminviewsfilteraddcustombutton';
|
||||
|
||||
/**
|
||||
* Method to get a list of options for a list input.
|
||||
*
|
||||
* @return array An array of JHtml options.
|
||||
* @return array An array of Html options.
|
||||
*/
|
||||
protected function getOptions()
|
||||
{
|
||||
// Get a db connection.
|
||||
$db = JFactory::getDbo();
|
||||
$db = Factory::getDbo();
|
||||
|
||||
// Create a new query object.
|
||||
$query = $db->getQuery(true);
|
||||
@ -50,8 +54,8 @@ class JFormFieldCustomadminviewsfilteraddcustombutton extends JFormFieldList
|
||||
$db->setQuery($query);
|
||||
|
||||
$_results = $db->loadColumn();
|
||||
$_filter = array();
|
||||
$_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_ADD_CUSTOM_BUTTONS') . ' -');
|
||||
$_filter = [];
|
||||
$_filter[] = Html::_('select.option', '', '- ' . Text::_('COM_COMPONENTBUILDER_FILTER_SELECT_ADD_CUSTOM_BUTTONS') . ' -');
|
||||
|
||||
if ($_results)
|
||||
{
|
||||
@ -63,7 +67,7 @@ class JFormFieldCustomadminviewsfilteraddcustombutton extends JFormFieldList
|
||||
// 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));
|
||||
$_filter[] = Html::_('select.option', $add_custom_button, Text::_($_text));
|
||||
}
|
||||
}
|
||||
return $_filter;
|
||||
|
@ -12,6 +12,10 @@
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
|
||||
// import the list field type
|
||||
jimport('joomla.form.helper');
|
||||
JFormHelper::loadFieldClass('list');
|
||||
@ -24,19 +28,19 @@ class JFormFieldCustomadminviewsfilteraddphpajax extends JFormFieldList
|
||||
/**
|
||||
* The customadminviewsfilteraddphpajax field type.
|
||||
*
|
||||
* @var string
|
||||
* @var string
|
||||
*/
|
||||
public $type = 'customadminviewsfilteraddphpajax';
|
||||
|
||||
/**
|
||||
* Method to get a list of options for a list input.
|
||||
*
|
||||
* @return array An array of JHtml options.
|
||||
* @return array An array of Html options.
|
||||
*/
|
||||
protected function getOptions()
|
||||
{
|
||||
// Get a db connection.
|
||||
$db = JFactory::getDbo();
|
||||
$db = Factory::getDbo();
|
||||
|
||||
// Create a new query object.
|
||||
$query = $db->getQuery(true);
|
||||
@ -50,8 +54,8 @@ class JFormFieldCustomadminviewsfilteraddphpajax extends JFormFieldList
|
||||
$db->setQuery($query);
|
||||
|
||||
$_results = $db->loadColumn();
|
||||
$_filter = array();
|
||||
$_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_ADD_PHP_AJAX') . ' -');
|
||||
$_filter = [];
|
||||
$_filter[] = Html::_('select.option', '', '- ' . Text::_('COM_COMPONENTBUILDER_FILTER_SELECT_ADD_PHP_AJAX') . ' -');
|
||||
|
||||
if ($_results)
|
||||
{
|
||||
@ -63,7 +67,7 @@ class JFormFieldCustomadminviewsfilteraddphpajax extends JFormFieldList
|
||||
// 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));
|
||||
$_filter[] = Html::_('select.option', $add_php_ajax, Text::_($_text));
|
||||
}
|
||||
}
|
||||
return $_filter;
|
||||
|
@ -12,6 +12,10 @@
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
|
||||
// import the list field type
|
||||
jimport('joomla.form.helper');
|
||||
JFormHelper::loadFieldClass('list');
|
||||
@ -24,19 +28,19 @@ class JFormFieldCustomcodesfiltercommenttype extends JFormFieldList
|
||||
/**
|
||||
* The customcodesfiltercommenttype field type.
|
||||
*
|
||||
* @var string
|
||||
* @var string
|
||||
*/
|
||||
public $type = 'customcodesfiltercommenttype';
|
||||
|
||||
/**
|
||||
* Method to get a list of options for a list input.
|
||||
*
|
||||
* @return array An array of JHtml options.
|
||||
* @return array An array of Html options.
|
||||
*/
|
||||
protected function getOptions()
|
||||
{
|
||||
// Get a db connection.
|
||||
$db = JFactory::getDbo();
|
||||
$db = Factory::getDbo();
|
||||
|
||||
// Create a new query object.
|
||||
$query = $db->getQuery(true);
|
||||
@ -50,8 +54,8 @@ class JFormFieldCustomcodesfiltercommenttype extends JFormFieldList
|
||||
$db->setQuery($query);
|
||||
|
||||
$_results = $db->loadColumn();
|
||||
$_filter = array();
|
||||
$_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_COMMENT_TYPE_USED_IN_PLACEHOLDER') . ' -');
|
||||
$_filter = [];
|
||||
$_filter[] = Html::_('select.option', '', '- ' . Text::_('COM_COMPONENTBUILDER_FILTER_SELECT_COMMENT_TYPE_USED_IN_PLACEHOLDER') . ' -');
|
||||
|
||||
if ($_results)
|
||||
{
|
||||
@ -63,7 +67,7 @@ class JFormFieldCustomcodesfiltercommenttype extends JFormFieldList
|
||||
// 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));
|
||||
$_filter[] = Html::_('select.option', $comment_type, Text::_($_text));
|
||||
}
|
||||
}
|
||||
return $_filter;
|
||||
|
@ -12,6 +12,10 @@
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
|
||||
// import the list field type
|
||||
jimport('joomla.form.helper');
|
||||
JFormHelper::loadFieldClass('list');
|
||||
@ -24,19 +28,19 @@ class JFormFieldCustomcodesfiltertarget extends JFormFieldList
|
||||
/**
|
||||
* The customcodesfiltertarget field type.
|
||||
*
|
||||
* @var string
|
||||
* @var string
|
||||
*/
|
||||
public $type = 'customcodesfiltertarget';
|
||||
|
||||
/**
|
||||
* Method to get a list of options for a list input.
|
||||
*
|
||||
* @return array An array of JHtml options.
|
||||
* @return array An array of Html options.
|
||||
*/
|
||||
protected function getOptions()
|
||||
{
|
||||
// Get a db connection.
|
||||
$db = JFactory::getDbo();
|
||||
$db = Factory::getDbo();
|
||||
|
||||
// Create a new query object.
|
||||
$query = $db->getQuery(true);
|
||||
@ -50,8 +54,8 @@ class JFormFieldCustomcodesfiltertarget extends JFormFieldList
|
||||
$db->setQuery($query);
|
||||
|
||||
$_results = $db->loadColumn();
|
||||
$_filter = array();
|
||||
$_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_TARGET') . ' -');
|
||||
$_filter = [];
|
||||
$_filter[] = Html::_('select.option', '', '- ' . Text::_('COM_COMPONENTBUILDER_FILTER_SELECT_TARGET') . ' -');
|
||||
|
||||
if ($_results)
|
||||
{
|
||||
@ -63,7 +67,7 @@ class JFormFieldCustomcodesfiltertarget extends JFormFieldList
|
||||
// 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));
|
||||
$_filter[] = Html::_('select.option', $target, Text::_($_text));
|
||||
}
|
||||
}
|
||||
return $_filter;
|
||||
|
@ -12,6 +12,10 @@
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
|
||||
// import the list field type
|
||||
jimport('joomla.form.helper');
|
||||
JFormHelper::loadFieldClass('list');
|
||||
@ -24,19 +28,19 @@ class JFormFieldCustomcodesfiltertype extends JFormFieldList
|
||||
/**
|
||||
* The customcodesfiltertype field type.
|
||||
*
|
||||
* @var string
|
||||
* @var string
|
||||
*/
|
||||
public $type = 'customcodesfiltertype';
|
||||
|
||||
/**
|
||||
* Method to get a list of options for a list input.
|
||||
*
|
||||
* @return array An array of JHtml options.
|
||||
* @return array An array of Html options.
|
||||
*/
|
||||
protected function getOptions()
|
||||
{
|
||||
// Get a db connection.
|
||||
$db = JFactory::getDbo();
|
||||
$db = Factory::getDbo();
|
||||
|
||||
// Create a new query object.
|
||||
$query = $db->getQuery(true);
|
||||
@ -50,8 +54,8 @@ class JFormFieldCustomcodesfiltertype extends JFormFieldList
|
||||
$db->setQuery($query);
|
||||
|
||||
$_results = $db->loadColumn();
|
||||
$_filter = array();
|
||||
$_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_ADD_TYPE') . ' -');
|
||||
$_filter = [];
|
||||
$_filter[] = Html::_('select.option', '', '- ' . Text::_('COM_COMPONENTBUILDER_FILTER_SELECT_ADD_TYPE') . ' -');
|
||||
|
||||
if ($_results)
|
||||
{
|
||||
@ -63,7 +67,7 @@ class JFormFieldCustomcodesfiltertype extends JFormFieldList
|
||||
// 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));
|
||||
$_filter[] = Html::_('select.option', $type, Text::_($_text));
|
||||
}
|
||||
}
|
||||
return $_filter;
|
||||
|
@ -12,6 +12,10 @@
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
|
||||
// import the list field type
|
||||
jimport('joomla.form.helper');
|
||||
JFormHelper::loadFieldClass('list');
|
||||
@ -24,14 +28,14 @@ class JFormFieldCustomfilelist extends JFormFieldList
|
||||
/**
|
||||
* The customfilelist field type.
|
||||
*
|
||||
* @var string
|
||||
* @var string
|
||||
*/
|
||||
public $type = 'customfilelist';
|
||||
|
||||
/**
|
||||
* Method to get a list of options for a list input.
|
||||
*
|
||||
* @return array An array of JHtml options.
|
||||
* @return array An array of Html options.
|
||||
*/
|
||||
protected function getOptions()
|
||||
{
|
||||
|
@ -12,6 +12,10 @@
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
|
||||
// import the list field type
|
||||
jimport('joomla.form.helper');
|
||||
JFormHelper::loadFieldClass('list');
|
||||
@ -24,14 +28,14 @@ class JFormFieldCustomfolderlist extends JFormFieldList
|
||||
/**
|
||||
* The customfolderlist field type.
|
||||
*
|
||||
* @var string
|
||||
* @var string
|
||||
*/
|
||||
public $type = 'customfolderlist';
|
||||
|
||||
/**
|
||||
* Method to get a list of options for a list input.
|
||||
*
|
||||
* @return array An array of JHtml options.
|
||||
* @return array An array of Html options.
|
||||
*/
|
||||
protected function getOptions()
|
||||
{
|
||||
|
@ -12,6 +12,10 @@
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
|
||||
// import the list field type
|
||||
jimport('joomla.form.helper');
|
||||
JFormHelper::loadFieldClass('list');
|
||||
@ -24,14 +28,14 @@ class JFormFieldCustomgets extends JFormFieldList
|
||||
/**
|
||||
* The customgets field type.
|
||||
*
|
||||
* @var string
|
||||
* @var string
|
||||
*/
|
||||
public $type = 'customgets';
|
||||
|
||||
/**
|
||||
* Method to get a list of options for a list input.
|
||||
*
|
||||
* @return array An array of JHtml options.
|
||||
* @return array An array of Html options.
|
||||
*/
|
||||
protected function getOptions()
|
||||
{
|
||||
|
@ -12,6 +12,10 @@
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
|
||||
// import the list field type
|
||||
jimport('joomla.form.helper');
|
||||
JFormHelper::loadFieldClass('list');
|
||||
@ -24,14 +28,14 @@ class JFormFieldDbtables extends JFormFieldList
|
||||
/**
|
||||
* The dbtables field type.
|
||||
*
|
||||
* @var string
|
||||
* @var string
|
||||
*/
|
||||
public $type = 'dbtables';
|
||||
|
||||
/**
|
||||
* Method to get a list of options for a list input.
|
||||
*
|
||||
* @return array An array of JHtml options.
|
||||
* @return array An array of Html options.
|
||||
*/
|
||||
protected function getOptions()
|
||||
{
|
||||
|
@ -12,6 +12,14 @@
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
use VDM\Joomla\Utilities\GetHelper;
|
||||
use VDM\Joomla\Utilities\ArrayHelper;
|
||||
use VDM\Joomla\Utilities\JsonHelper;
|
||||
use VDM\Joomla\Utilities\StringHelper;
|
||||
|
||||
// import the list field type
|
||||
jimport('joomla.form.helper');
|
||||
JFormHelper::loadFieldClass('list');
|
||||
@ -24,28 +32,28 @@ class JFormFieldDynamicdashboard extends JFormFieldList
|
||||
/**
|
||||
* The dynamicdashboard field type.
|
||||
*
|
||||
* @var string
|
||||
* @var string
|
||||
*/
|
||||
public $type = 'dynamicdashboard';
|
||||
|
||||
/**
|
||||
* Method to get a list of options for a list input.
|
||||
*
|
||||
* @return array An array of JHtml options.
|
||||
* @return array An array of Html options.
|
||||
*/
|
||||
protected function getOptions()
|
||||
{
|
||||
// load the db opbject
|
||||
$db = JFactory::getDBO();
|
||||
$db = Factory::getDBO();
|
||||
// get the input from url
|
||||
$jinput = JFactory::getApplication()->input;
|
||||
$jinput = Factory::getApplication()->input;
|
||||
// get the id
|
||||
$ID = $jinput->getInt('id', 0);
|
||||
// set the targets
|
||||
$targets = array('adminview' => 'admin_view', 'customadminview' => 'custom_admin_view');
|
||||
$t = array('adminview' => 'A', 'customadminview' => 'C');
|
||||
$targets = ['adminview' => 'admin_view', 'customadminview' => 'custom_admin_view'];
|
||||
$t = ['adminview' => 'A', 'customadminview' => 'C'];
|
||||
// rest the options
|
||||
$options = array();
|
||||
$options = [];
|
||||
// reset the custom admin views array
|
||||
$views = false;
|
||||
if (is_numeric($ID) && $ID >= 1)
|
||||
@ -53,7 +61,7 @@ class JFormFieldDynamicdashboard extends JFormFieldList
|
||||
// get the linked back-end views
|
||||
foreach ($targets as $target => $view)
|
||||
{
|
||||
if ($result = ComponentbuilderHelper::getVar('component_'.$view.'s', (int) $ID, 'joomla_component', 'add'.$view.'s'))
|
||||
if ($result = GetHelper::var('component_'.$view.'s', (int) $ID, 'joomla_component', 'add'.$view.'s'))
|
||||
{
|
||||
$views[$target] = $result;
|
||||
}
|
||||
@ -62,28 +70,28 @@ class JFormFieldDynamicdashboard extends JFormFieldList
|
||||
else
|
||||
{
|
||||
// not linked so there is none available
|
||||
return array(JHtml::_('select.option', '', JText::_('COM_COMPONENTBUILDER_YOU_MUST_FIRST_LINK_AN_ADMIN_OR_A_CUSTOM_ADMIN_VIEW_TO_THIS_COMPONENT_THEN_YOU_CAN_SELECT_IT_HERE')));
|
||||
return [Html::_('select.option', '', Text::_('COM_COMPONENTBUILDER_YOU_MUST_FIRST_LINK_AN_ADMIN_OR_A_CUSTOM_ADMIN_VIEW_TO_THIS_COMPONENT_THEN_YOU_CAN_SELECT_IT_HERE'))];
|
||||
}
|
||||
// check if we found any values
|
||||
if (ComponentbuilderHelper::checkArray($views))
|
||||
if (ArrayHelper::check($views))
|
||||
{
|
||||
foreach ($targets as $target => $view)
|
||||
{
|
||||
if (isset($views[$target]) && ComponentbuilderHelper::checkJson($views[$target]))
|
||||
if (isset($views[$target]) && JsonHelper::check($views[$target]))
|
||||
{
|
||||
// convert to an array
|
||||
$value = json_decode($views[$target], true);
|
||||
$type = ComponentbuilderHelper::safeString($view, 'w');
|
||||
if (ComponentbuilderHelper::checkArray($value))
|
||||
$type = StringHelper::safe($view, 'w');
|
||||
if (ArrayHelper::check($value))
|
||||
{
|
||||
foreach ($value as $_view)
|
||||
{
|
||||
if (isset($_view[$target]) && is_numeric($_view[$target]))
|
||||
{
|
||||
// set the view to the selections if found
|
||||
if ($name = ComponentbuilderHelper::getVar($view, (int) $_view[$target], 'id', 'system_name'))
|
||||
if ($name = GetHelper::var($view, (int) $_view[$target], 'id', 'system_name'))
|
||||
{
|
||||
$options[] = JHtml::_('select.option', $t[$target].'_'.$_view[$target], $name.' ['.$type.']');
|
||||
$options[] = Html::_('select.option', $t[$target].'_'.$_view[$target], $name.' ['.$type.']');
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -92,12 +100,12 @@ class JFormFieldDynamicdashboard extends JFormFieldList
|
||||
}
|
||||
}
|
||||
// return found options
|
||||
if (ComponentbuilderHelper::checkArray($options))
|
||||
if (ArrayHelper::check($options))
|
||||
{
|
||||
array_unshift($options , JHtml::_('select.option', '', JText::_('COM_COMPONENTBUILDER_SELECT_AN_OPTION')));
|
||||
array_unshift($options , Html::_('select.option', '', Text::_('COM_COMPONENTBUILDER_SELECT_AN_OPTION')));
|
||||
return $options;
|
||||
}
|
||||
// not linked so there is none available
|
||||
return array(JHtml::_('select.option', '', JText::_('COM_COMPONENTBUILDER_YOU_MUST_FIRST_LINK_AN_ADMIN_OR_A_CUSTOM_ADMIN_VIEW_TO_THIS_COMPONENT_THEN_YOU_CAN_SELECT_IT_HERE')));
|
||||
return [Html::_('select.option', '', Text::_('COM_COMPONENTBUILDER_YOU_MUST_FIRST_LINK_AN_ADMIN_OR_A_CUSTOM_ADMIN_VIEW_TO_THIS_COMPONENT_THEN_YOU_CAN_SELECT_IT_HERE'))];
|
||||
}
|
||||
}
|
||||
|
@ -12,6 +12,10 @@
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
|
||||
// import the list field type
|
||||
jimport('joomla.form.helper');
|
||||
JFormHelper::loadFieldClass('list');
|
||||
@ -24,7 +28,7 @@ class JFormFieldDynamicget extends JFormFieldList
|
||||
/**
|
||||
* The dynamicget field type.
|
||||
*
|
||||
* @var string
|
||||
* @var string
|
||||
*/
|
||||
public $type = 'dynamicget';
|
||||
|
||||
@ -48,7 +52,7 @@ class JFormFieldDynamicget extends JFormFieldList
|
||||
$script = array();
|
||||
$button_code_name = $this->getAttribute('name');
|
||||
// get the input from url
|
||||
$app = JFactory::getApplication();
|
||||
$app = Factory::getApplication();
|
||||
$jinput = $app->input;
|
||||
// get the view name & id
|
||||
$values = $jinput->getArray(array(
|
||||
@ -64,7 +68,7 @@ class JFormFieldDynamicget extends JFormFieldList
|
||||
$ref = '&ref=' . $values['view'] . '&refid=' . $values['id'];
|
||||
$refJ = '&ref=' . $values['view'] . '&refid=' . $values['id'];
|
||||
// get the return value.
|
||||
$_uri = (string) JUri::getInstance();
|
||||
$_uri = (string) \Joomla\CMS\Uri\Uri::getInstance();
|
||||
$_return = urlencode(base64_encode($_uri));
|
||||
// load return value.
|
||||
$ref .= '&return=' . $_return;
|
||||
@ -77,20 +81,20 @@ class JFormFieldDynamicget extends JFormFieldList
|
||||
$button_label = preg_replace("/[^A-Za-z ]/", '', $button_label);
|
||||
$button_label = ucfirst(strtolower($button_label));
|
||||
// get user object
|
||||
$user = JFactory::getUser();
|
||||
$user = Factory::getUser();
|
||||
// only add if user allowed to create dynamic_get
|
||||
if ($user->authorise('dynamic_get.create', 'com_componentbuilder') && $app->isAdmin()) // TODO for now only in admin area.
|
||||
if ($user->authorise('dynamic_get.create', 'com_componentbuilder') && $app->isClient('administrator')) // TODO for now only in admin area.
|
||||
{
|
||||
// build Create button
|
||||
$button[] = '<a id="'.$button_code_name.'Create" class="btn btn-small btn-success hasTooltip" title="'.JText::sprintf('COM_COMPONENTBUILDER_CREATE_NEW_S', $button_label).'" style="border-radius: 0px 4px 4px 0px; padding: 4px 4px 4px 7px;"
|
||||
$button[] = '<a id="'.$button_code_name.'Create" class="btn btn-small btn-success hasTooltip" title="'.Text::sprintf('COM_COMPONENTBUILDER_CREATE_NEW_S', $button_label).'" style="border-radius: 0px 4px 4px 0px; padding: 4px 4px 4px 7px;"
|
||||
href="index.php?option=com_componentbuilder&view=dynamic_get&layout=edit'.$ref.'" >
|
||||
<span class="icon-new icon-white"></span></a>';
|
||||
}
|
||||
// only add if user allowed to edit dynamic_get
|
||||
if ($user->authorise('dynamic_get.edit', 'com_componentbuilder') && $app->isAdmin()) // TODO for now only in admin area.
|
||||
if ($user->authorise('dynamic_get.edit', 'com_componentbuilder') && $app->isClient('administrator')) // TODO for now only in admin area.
|
||||
{
|
||||
// build edit button
|
||||
$button[] = '<a id="'.$button_code_name.'Edit" class="btn btn-small hasTooltip" title="'.JText::sprintf('COM_COMPONENTBUILDER_EDIT_S', $button_label).'" style="display: none; padding: 4px 4px 4px 7px;" href="#" >
|
||||
$button[] = '<a id="'.$button_code_name.'Edit" class="btn btn-small hasTooltip" title="'.Text::sprintf('COM_COMPONENTBUILDER_EDIT_S', $button_label).'" style="display: none; padding: 4px 4px 4px 7px;" href="#" >
|
||||
<span class="icon-edit"></span></a>';
|
||||
// build script
|
||||
$script[] = "
|
||||
@ -123,7 +127,7 @@ class JFormFieldDynamicget extends JFormFieldList
|
||||
if (is_array($button) && count($button) > 0)
|
||||
{
|
||||
// Load the needed script.
|
||||
$document = JFactory::getDocument();
|
||||
$document = Factory::getDocument();
|
||||
$document->addScriptDeclaration(implode(' ',$script));
|
||||
// return the button attached to input field.
|
||||
return '<div class="input-append">' .$html . implode('',$button).'</div>';
|
||||
@ -135,7 +139,7 @@ class JFormFieldDynamicget extends JFormFieldList
|
||||
/**
|
||||
* Method to get a list of options for a list input.
|
||||
*
|
||||
* @return array An array of JHtml options.
|
||||
* @return array An array of Html options.
|
||||
*/
|
||||
protected function getOptions()
|
||||
{
|
||||
|
@ -12,6 +12,10 @@
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
|
||||
// import the list field type
|
||||
jimport('joomla.form.helper');
|
||||
JFormHelper::loadFieldClass('list');
|
||||
@ -24,14 +28,14 @@ class JFormFieldDynamicgets extends JFormFieldList
|
||||
/**
|
||||
* The dynamicgets field type.
|
||||
*
|
||||
* @var string
|
||||
* @var string
|
||||
*/
|
||||
public $type = 'dynamicgets';
|
||||
|
||||
/**
|
||||
* Method to get a list of options for a list input.
|
||||
*
|
||||
* @return array An array of JHtml options.
|
||||
* @return array An array of Html options.
|
||||
*/
|
||||
protected function getOptions()
|
||||
{
|
||||
|
@ -12,6 +12,10 @@
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
|
||||
// import the list field type
|
||||
jimport('joomla.form.helper');
|
||||
JFormHelper::loadFieldClass('list');
|
||||
@ -24,19 +28,19 @@ class JFormFieldDynamicgetsfiltergettype extends JFormFieldList
|
||||
/**
|
||||
* The dynamicgetsfiltergettype field type.
|
||||
*
|
||||
* @var string
|
||||
* @var string
|
||||
*/
|
||||
public $type = 'dynamicgetsfiltergettype';
|
||||
|
||||
/**
|
||||
* Method to get a list of options for a list input.
|
||||
*
|
||||
* @return array An array of JHtml options.
|
||||
* @return array An array of Html options.
|
||||
*/
|
||||
protected function getOptions()
|
||||
{
|
||||
// Get a db connection.
|
||||
$db = JFactory::getDbo();
|
||||
$db = Factory::getDbo();
|
||||
|
||||
// Create a new query object.
|
||||
$query = $db->getQuery(true);
|
||||
@ -50,8 +54,8 @@ class JFormFieldDynamicgetsfiltergettype extends JFormFieldList
|
||||
$db->setQuery($query);
|
||||
|
||||
$_results = $db->loadColumn();
|
||||
$_filter = array();
|
||||
$_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_GETTYPE') . ' -');
|
||||
$_filter = [];
|
||||
$_filter[] = Html::_('select.option', '', '- ' . Text::_('COM_COMPONENTBUILDER_FILTER_SELECT_GETTYPE') . ' -');
|
||||
|
||||
if ($_results)
|
||||
{
|
||||
@ -63,7 +67,7 @@ class JFormFieldDynamicgetsfiltergettype extends JFormFieldList
|
||||
// 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));
|
||||
$_filter[] = Html::_('select.option', $gettype, Text::_($_text));
|
||||
}
|
||||
}
|
||||
return $_filter;
|
||||
|
@ -12,6 +12,10 @@
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
|
||||
// import the list field type
|
||||
jimport('joomla.form.helper');
|
||||
JFormHelper::loadFieldClass('list');
|
||||
@ -24,19 +28,19 @@ class JFormFieldDynamicgetsfiltermainsource extends JFormFieldList
|
||||
/**
|
||||
* The dynamicgetsfiltermainsource field type.
|
||||
*
|
||||
* @var string
|
||||
* @var string
|
||||
*/
|
||||
public $type = 'dynamicgetsfiltermainsource';
|
||||
|
||||
/**
|
||||
* Method to get a list of options for a list input.
|
||||
*
|
||||
* @return array An array of JHtml options.
|
||||
* @return array An array of Html options.
|
||||
*/
|
||||
protected function getOptions()
|
||||
{
|
||||
// Get a db connection.
|
||||
$db = JFactory::getDbo();
|
||||
$db = Factory::getDbo();
|
||||
|
||||
// Create a new query object.
|
||||
$query = $db->getQuery(true);
|
||||
@ -50,8 +54,8 @@ class JFormFieldDynamicgetsfiltermainsource extends JFormFieldList
|
||||
$db->setQuery($query);
|
||||
|
||||
$_results = $db->loadColumn();
|
||||
$_filter = array();
|
||||
$_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_MAIN_SOURCE') . ' -');
|
||||
$_filter = [];
|
||||
$_filter[] = Html::_('select.option', '', '- ' . Text::_('COM_COMPONENTBUILDER_FILTER_SELECT_MAIN_SOURCE') . ' -');
|
||||
|
||||
if ($_results)
|
||||
{
|
||||
@ -63,7 +67,7 @@ class JFormFieldDynamicgetsfiltermainsource extends JFormFieldList
|
||||
// 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));
|
||||
$_filter[] = Html::_('select.option', $main_source, Text::_($_text));
|
||||
}
|
||||
}
|
||||
return $_filter;
|
||||
|
@ -12,6 +12,10 @@
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
|
||||
// import the list field type
|
||||
jimport('joomla.form.helper');
|
||||
JFormHelper::loadFieldClass('list');
|
||||
@ -24,7 +28,7 @@ class JFormFieldExcludedlanguages extends JFormFieldList
|
||||
/**
|
||||
* The excludedlanguages field type.
|
||||
*
|
||||
* @var string
|
||||
* @var string
|
||||
*/
|
||||
public $type = 'excludedlanguages';
|
||||
|
||||
@ -48,7 +52,7 @@ class JFormFieldExcludedlanguages extends JFormFieldList
|
||||
$script = array();
|
||||
$button_code_name = $this->getAttribute('name');
|
||||
// get the input from url
|
||||
$app = JFactory::getApplication();
|
||||
$app = Factory::getApplication();
|
||||
$jinput = $app->input;
|
||||
// get the view name & id
|
||||
$values = $jinput->getArray(array(
|
||||
@ -64,7 +68,7 @@ class JFormFieldExcludedlanguages extends JFormFieldList
|
||||
$ref = '&ref=' . $values['view'] . '&refid=' . $values['id'];
|
||||
$refJ = '&ref=' . $values['view'] . '&refid=' . $values['id'];
|
||||
// get the return value.
|
||||
$_uri = (string) JUri::getInstance();
|
||||
$_uri = (string) \Joomla\CMS\Uri\Uri::getInstance();
|
||||
$_return = urlencode(base64_encode($_uri));
|
||||
// load return value.
|
||||
$ref .= '&return=' . $_return;
|
||||
@ -77,20 +81,20 @@ class JFormFieldExcludedlanguages extends JFormFieldList
|
||||
$button_label = preg_replace("/[^A-Za-z ]/", '', $button_label);
|
||||
$button_label = ucfirst(strtolower($button_label));
|
||||
// get user object
|
||||
$user = JFactory::getUser();
|
||||
$user = Factory::getUser();
|
||||
// only add if user allowed to create language
|
||||
if ($user->authorise('language.create', 'com_componentbuilder') && $app->isAdmin()) // TODO for now only in admin area.
|
||||
if ($user->authorise('language.create', 'com_componentbuilder') && $app->isClient('administrator')) // TODO for now only in admin area.
|
||||
{
|
||||
// build Create button
|
||||
$button[] = '<a id="'.$button_code_name.'Create" class="btn btn-small btn-success hasTooltip" title="'.JText::sprintf('PLG_CONTENT_COMPONENTBUILDERLANGUAGETABS_CREATE_NEW_S', $button_label).'" style="border-radius: 0px 4px 4px 0px; padding: 4px 4px 4px 7px;"
|
||||
$button[] = '<a id="'.$button_code_name.'Create" class="btn btn-small btn-success hasTooltip" title="'.Text::sprintf('PLG_CONTENT_COMPONENTBUILDERLANGUAGETABS_CREATE_NEW_S', $button_label).'" style="border-radius: 0px 4px 4px 0px; padding: 4px 4px 4px 7px;"
|
||||
href="index.php?option=com_componentbuilder&view=language&layout=edit'.$ref.'" >
|
||||
<span class="icon-new icon-white"></span></a>';
|
||||
}
|
||||
// only add if user allowed to edit language
|
||||
if ($user->authorise('language.edit', 'com_componentbuilder') && $app->isAdmin()) // TODO for now only in admin area.
|
||||
if ($user->authorise('language.edit', 'com_componentbuilder') && $app->isClient('administrator')) // TODO for now only in admin area.
|
||||
{
|
||||
// build edit button
|
||||
$button[] = '<a id="'.$button_code_name.'Edit" class="btn btn-small hasTooltip" title="'.JText::sprintf('PLG_CONTENT_COMPONENTBUILDERLANGUAGETABS_EDIT_S', $button_label).'" style="display: none; padding: 4px 4px 4px 7px;" href="#" >
|
||||
$button[] = '<a id="'.$button_code_name.'Edit" class="btn btn-small hasTooltip" title="'.Text::sprintf('PLG_CONTENT_COMPONENTBUILDERLANGUAGETABS_EDIT_S', $button_label).'" style="display: none; padding: 4px 4px 4px 7px;" href="#" >
|
||||
<span class="icon-edit"></span></a>';
|
||||
// build script
|
||||
$script[] = "
|
||||
@ -123,7 +127,7 @@ class JFormFieldExcludedlanguages extends JFormFieldList
|
||||
if (is_array($button) && count($button) > 0)
|
||||
{
|
||||
// Load the needed script.
|
||||
$document = JFactory::getDocument();
|
||||
$document = Factory::getDocument();
|
||||
$document->addScriptDeclaration(implode(' ',$script));
|
||||
// return the button attached to input field.
|
||||
return '<div class="input-append">' .$html . implode('',$button).'</div>';
|
||||
@ -135,7 +139,7 @@ class JFormFieldExcludedlanguages extends JFormFieldList
|
||||
/**
|
||||
* Method to get a list of options for a list input.
|
||||
*
|
||||
* @return array An array of JHtml options.
|
||||
* @return array An array of Html options.
|
||||
*/
|
||||
protected function getOptions()
|
||||
{
|
||||
|
@ -12,6 +12,10 @@
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
|
||||
// import the list field type
|
||||
jimport('joomla.form.helper');
|
||||
JFormHelper::loadFieldClass('list');
|
||||
@ -24,14 +28,14 @@ class JFormFieldExistingvalidationrules extends JFormFieldList
|
||||
/**
|
||||
* The existingvalidationrules field type.
|
||||
*
|
||||
* @var string
|
||||
* @var string
|
||||
*/
|
||||
public $type = 'existingvalidationrules';
|
||||
|
||||
/**
|
||||
* Method to get a list of options for a list input.
|
||||
*
|
||||
* @return array An array of JHtml options.
|
||||
* @return array An array of Html options.
|
||||
*/
|
||||
protected function getOptions()
|
||||
{
|
||||
|
@ -12,6 +12,10 @@
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
|
||||
// import the list field type
|
||||
jimport('joomla.form.helper');
|
||||
JFormHelper::loadFieldClass('list');
|
||||
@ -24,14 +28,14 @@ class JFormFieldFields extends JFormFieldList
|
||||
/**
|
||||
* The fields field type.
|
||||
*
|
||||
* @var string
|
||||
* @var string
|
||||
*/
|
||||
public $type = 'fields';
|
||||
|
||||
/**
|
||||
* Method to get a list of options for a list input.
|
||||
*
|
||||
* @return array An array of JHtml options.
|
||||
* @return array An array of Html options.
|
||||
*/
|
||||
protected function getOptions()
|
||||
{
|
||||
|
@ -12,6 +12,10 @@
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
|
||||
// import the list field type
|
||||
jimport('joomla.form.helper');
|
||||
JFormHelper::loadFieldClass('list');
|
||||
@ -24,19 +28,19 @@ class JFormFieldFieldsfilterdatatype extends JFormFieldList
|
||||
/**
|
||||
* The fieldsfilterdatatype field type.
|
||||
*
|
||||
* @var string
|
||||
* @var string
|
||||
*/
|
||||
public $type = 'fieldsfilterdatatype';
|
||||
|
||||
/**
|
||||
* Method to get a list of options for a list input.
|
||||
*
|
||||
* @return array An array of JHtml options.
|
||||
* @return array An array of Html options.
|
||||
*/
|
||||
protected function getOptions()
|
||||
{
|
||||
// Get a db connection.
|
||||
$db = JFactory::getDbo();
|
||||
$db = Factory::getDbo();
|
||||
|
||||
// Create a new query object.
|
||||
$query = $db->getQuery(true);
|
||||
@ -50,8 +54,8 @@ class JFormFieldFieldsfilterdatatype extends JFormFieldList
|
||||
$db->setQuery($query);
|
||||
|
||||
$_results = $db->loadColumn();
|
||||
$_filter = array();
|
||||
$_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_DATA_TYPE') . ' -');
|
||||
$_filter = [];
|
||||
$_filter[] = Html::_('select.option', '', '- ' . Text::_('COM_COMPONENTBUILDER_FILTER_SELECT_DATA_TYPE') . ' -');
|
||||
|
||||
if ($_results)
|
||||
{
|
||||
@ -63,7 +67,7 @@ class JFormFieldFieldsfilterdatatype extends JFormFieldList
|
||||
// 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));
|
||||
$_filter[] = Html::_('select.option', $datatype, Text::_($_text));
|
||||
}
|
||||
}
|
||||
return $_filter;
|
||||
|
@ -12,6 +12,10 @@
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
|
||||
// import the list field type
|
||||
jimport('joomla.form.helper');
|
||||
JFormHelper::loadFieldClass('list');
|
||||
@ -24,19 +28,19 @@ class JFormFieldFieldsfilterindexes extends JFormFieldList
|
||||
/**
|
||||
* The fieldsfilterindexes field type.
|
||||
*
|
||||
* @var string
|
||||
* @var string
|
||||
*/
|
||||
public $type = 'fieldsfilterindexes';
|
||||
|
||||
/**
|
||||
* Method to get a list of options for a list input.
|
||||
*
|
||||
* @return array An array of JHtml options.
|
||||
* @return array An array of Html options.
|
||||
*/
|
||||
protected function getOptions()
|
||||
{
|
||||
// Get a db connection.
|
||||
$db = JFactory::getDbo();
|
||||
$db = Factory::getDbo();
|
||||
|
||||
// Create a new query object.
|
||||
$query = $db->getQuery(true);
|
||||
@ -50,8 +54,8 @@ class JFormFieldFieldsfilterindexes extends JFormFieldList
|
||||
$db->setQuery($query);
|
||||
|
||||
$_results = $db->loadColumn();
|
||||
$_filter = array();
|
||||
$_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_INDEXES_TYPE') . ' -');
|
||||
$_filter = [];
|
||||
$_filter[] = Html::_('select.option', '', '- ' . Text::_('COM_COMPONENTBUILDER_FILTER_SELECT_INDEXES_TYPE') . ' -');
|
||||
|
||||
if ($_results)
|
||||
{
|
||||
@ -63,7 +67,7 @@ class JFormFieldFieldsfilterindexes extends JFormFieldList
|
||||
// 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));
|
||||
$_filter[] = Html::_('select.option', $indexes, Text::_($_text));
|
||||
}
|
||||
}
|
||||
return $_filter;
|
||||
|
@ -12,6 +12,10 @@
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
|
||||
// import the list field type
|
||||
jimport('joomla.form.helper');
|
||||
JFormHelper::loadFieldClass('list');
|
||||
@ -24,19 +28,19 @@ class JFormFieldFieldsfilternullswitch extends JFormFieldList
|
||||
/**
|
||||
* The fieldsfilternullswitch field type.
|
||||
*
|
||||
* @var string
|
||||
* @var string
|
||||
*/
|
||||
public $type = 'fieldsfilternullswitch';
|
||||
|
||||
/**
|
||||
* Method to get a list of options for a list input.
|
||||
*
|
||||
* @return array An array of JHtml options.
|
||||
* @return array An array of Html options.
|
||||
*/
|
||||
protected function getOptions()
|
||||
{
|
||||
// Get a db connection.
|
||||
$db = JFactory::getDbo();
|
||||
$db = Factory::getDbo();
|
||||
|
||||
// Create a new query object.
|
||||
$query = $db->getQuery(true);
|
||||
@ -50,8 +54,8 @@ class JFormFieldFieldsfilternullswitch extends JFormFieldList
|
||||
$db->setQuery($query);
|
||||
|
||||
$_results = $db->loadColumn();
|
||||
$_filter = array();
|
||||
$_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_NULL_SWITCH') . ' -');
|
||||
$_filter = [];
|
||||
$_filter[] = Html::_('select.option', '', '- ' . Text::_('COM_COMPONENTBUILDER_FILTER_SELECT_NULL_SWITCH') . ' -');
|
||||
|
||||
if ($_results)
|
||||
{
|
||||
@ -63,7 +67,7 @@ class JFormFieldFieldsfilternullswitch extends JFormFieldList
|
||||
// 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));
|
||||
$_filter[] = Html::_('select.option', $null_switch, Text::_($_text));
|
||||
}
|
||||
}
|
||||
return $_filter;
|
||||
|
@ -12,6 +12,10 @@
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
|
||||
// import the list field type
|
||||
jimport('joomla.form.helper');
|
||||
JFormHelper::loadFieldClass('list');
|
||||
@ -24,19 +28,19 @@ class JFormFieldFieldsfilterstore extends JFormFieldList
|
||||
/**
|
||||
* The fieldsfilterstore field type.
|
||||
*
|
||||
* @var string
|
||||
* @var string
|
||||
*/
|
||||
public $type = 'fieldsfilterstore';
|
||||
|
||||
/**
|
||||
* Method to get a list of options for a list input.
|
||||
*
|
||||
* @return array An array of JHtml options.
|
||||
* @return array An array of Html options.
|
||||
*/
|
||||
protected function getOptions()
|
||||
{
|
||||
// Get a db connection.
|
||||
$db = JFactory::getDbo();
|
||||
$db = Factory::getDbo();
|
||||
|
||||
// Create a new query object.
|
||||
$query = $db->getQuery(true);
|
||||
@ -50,8 +54,8 @@ class JFormFieldFieldsfilterstore extends JFormFieldList
|
||||
$db->setQuery($query);
|
||||
|
||||
$_results = $db->loadColumn();
|
||||
$_filter = array();
|
||||
$_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_MODELLING_METHOD') . ' -');
|
||||
$_filter = [];
|
||||
$_filter[] = Html::_('select.option', '', '- ' . Text::_('COM_COMPONENTBUILDER_FILTER_SELECT_MODELLING_METHOD') . ' -');
|
||||
|
||||
if ($_results)
|
||||
{
|
||||
@ -63,7 +67,7 @@ class JFormFieldFieldsfilterstore extends JFormFieldList
|
||||
// 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));
|
||||
$_filter[] = Html::_('select.option', $store, Text::_($_text));
|
||||
}
|
||||
}
|
||||
return $_filter;
|
||||
|
@ -12,6 +12,10 @@
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
|
||||
// import the list field type
|
||||
jimport('joomla.form.helper');
|
||||
JFormHelper::loadFieldClass('list');
|
||||
@ -24,7 +28,7 @@ class JFormFieldFieldtypes extends JFormFieldList
|
||||
/**
|
||||
* The fieldtypes field type.
|
||||
*
|
||||
* @var string
|
||||
* @var string
|
||||
*/
|
||||
public $type = 'fieldtypes';
|
||||
|
||||
@ -48,7 +52,7 @@ class JFormFieldFieldtypes extends JFormFieldList
|
||||
$script = array();
|
||||
$button_code_name = $this->getAttribute('name');
|
||||
// get the input from url
|
||||
$app = JFactory::getApplication();
|
||||
$app = Factory::getApplication();
|
||||
$jinput = $app->input;
|
||||
// get the view name & id
|
||||
$values = $jinput->getArray(array(
|
||||
@ -64,7 +68,7 @@ class JFormFieldFieldtypes extends JFormFieldList
|
||||
$ref = '&ref=' . $values['view'] . '&refid=' . $values['id'];
|
||||
$refJ = '&ref=' . $values['view'] . '&refid=' . $values['id'];
|
||||
// get the return value.
|
||||
$_uri = (string) JUri::getInstance();
|
||||
$_uri = (string) \Joomla\CMS\Uri\Uri::getInstance();
|
||||
$_return = urlencode(base64_encode($_uri));
|
||||
// load return value.
|
||||
$ref .= '&return=' . $_return;
|
||||
@ -77,20 +81,20 @@ class JFormFieldFieldtypes extends JFormFieldList
|
||||
$button_label = preg_replace("/[^A-Za-z ]/", '', $button_label);
|
||||
$button_label = ucfirst(strtolower($button_label));
|
||||
// get user object
|
||||
$user = JFactory::getUser();
|
||||
$user = Factory::getUser();
|
||||
// only add if user allowed to create fieldtype
|
||||
if ($user->authorise('fieldtype.create', 'com_componentbuilder') && $app->isAdmin()) // TODO for now only in admin area.
|
||||
if ($user->authorise('fieldtype.create', 'com_componentbuilder') && $app->isClient('administrator')) // TODO for now only in admin area.
|
||||
{
|
||||
// build Create button
|
||||
$button[] = '<a id="'.$button_code_name.'Create" class="btn btn-small btn-success hasTooltip" title="'.JText::sprintf('COM_COMPONENTBUILDER_CREATE_NEW_S', $button_label).'" style="border-radius: 0px 4px 4px 0px; padding: 4px 4px 4px 7px;"
|
||||
$button[] = '<a id="'.$button_code_name.'Create" class="btn btn-small btn-success hasTooltip" title="'.Text::sprintf('COM_COMPONENTBUILDER_CREATE_NEW_S', $button_label).'" style="border-radius: 0px 4px 4px 0px; padding: 4px 4px 4px 7px;"
|
||||
href="index.php?option=com_componentbuilder&view=fieldtype&layout=edit'.$ref.'" >
|
||||
<span class="icon-new icon-white"></span></a>';
|
||||
}
|
||||
// only add if user allowed to edit fieldtype
|
||||
if ($user->authorise('fieldtype.edit', 'com_componentbuilder') && $app->isAdmin()) // TODO for now only in admin area.
|
||||
if ($user->authorise('fieldtype.edit', 'com_componentbuilder') && $app->isClient('administrator')) // TODO for now only in admin area.
|
||||
{
|
||||
// build edit button
|
||||
$button[] = '<a id="'.$button_code_name.'Edit" class="btn btn-small hasTooltip" title="'.JText::sprintf('COM_COMPONENTBUILDER_EDIT_S', $button_label).'" style="display: none; padding: 4px 4px 4px 7px;" href="#" >
|
||||
$button[] = '<a id="'.$button_code_name.'Edit" class="btn btn-small hasTooltip" title="'.Text::sprintf('COM_COMPONENTBUILDER_EDIT_S', $button_label).'" style="display: none; padding: 4px 4px 4px 7px;" href="#" >
|
||||
<span class="icon-edit"></span></a>';
|
||||
// build script
|
||||
$script[] = "
|
||||
@ -123,7 +127,7 @@ class JFormFieldFieldtypes extends JFormFieldList
|
||||
if (is_array($button) && count($button) > 0)
|
||||
{
|
||||
// Load the needed script.
|
||||
$document = JFactory::getDocument();
|
||||
$document = Factory::getDocument();
|
||||
$document->addScriptDeclaration(implode(' ',$script));
|
||||
// return the button attached to input field.
|
||||
return '<div class="input-append">' .$html . implode('',$button).'</div>';
|
||||
@ -135,7 +139,7 @@ class JFormFieldFieldtypes extends JFormFieldList
|
||||
/**
|
||||
* Method to get a list of options for a list input.
|
||||
*
|
||||
* @return array An array of JHtml options.
|
||||
* @return array An array of Html options.
|
||||
*/
|
||||
protected function getOptions()
|
||||
{
|
||||
|
@ -12,6 +12,10 @@
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
|
||||
// import the list field type
|
||||
jimport('joomla.form.helper');
|
||||
JFormHelper::loadFieldClass('list');
|
||||
@ -24,14 +28,14 @@ class JFormFieldFilebehaviour extends JFormFieldList
|
||||
/**
|
||||
* The filebehaviour field type.
|
||||
*
|
||||
* @var string
|
||||
* @var string
|
||||
*/
|
||||
public $type = 'filebehaviour';
|
||||
|
||||
/**
|
||||
* Method to get a list of options for a list input.
|
||||
*
|
||||
* @return array An array of JHtml options.
|
||||
* @return array An array of Html options.
|
||||
*/
|
||||
protected function getOptions()
|
||||
{
|
||||
|
@ -12,6 +12,10 @@
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
|
||||
// import the list field type
|
||||
jimport('joomla.form.helper');
|
||||
JFormHelper::loadFieldClass('list');
|
||||
@ -24,19 +28,19 @@ class JFormFieldHelpdocumentsfilterlocation extends JFormFieldList
|
||||
/**
|
||||
* The helpdocumentsfilterlocation field type.
|
||||
*
|
||||
* @var string
|
||||
* @var string
|
||||
*/
|
||||
public $type = 'helpdocumentsfilterlocation';
|
||||
|
||||
/**
|
||||
* Method to get a list of options for a list input.
|
||||
*
|
||||
* @return array An array of JHtml options.
|
||||
* @return array An array of Html options.
|
||||
*/
|
||||
protected function getOptions()
|
||||
{
|
||||
// Get a db connection.
|
||||
$db = JFactory::getDbo();
|
||||
$db = Factory::getDbo();
|
||||
|
||||
// Create a new query object.
|
||||
$query = $db->getQuery(true);
|
||||
@ -50,8 +54,8 @@ class JFormFieldHelpdocumentsfilterlocation extends JFormFieldList
|
||||
$db->setQuery($query);
|
||||
|
||||
$_results = $db->loadColumn();
|
||||
$_filter = array();
|
||||
$_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_LOCATION') . ' -');
|
||||
$_filter = [];
|
||||
$_filter[] = Html::_('select.option', '', '- ' . Text::_('COM_COMPONENTBUILDER_FILTER_SELECT_LOCATION') . ' -');
|
||||
|
||||
if ($_results)
|
||||
{
|
||||
@ -63,7 +67,7 @@ class JFormFieldHelpdocumentsfilterlocation extends JFormFieldList
|
||||
// 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));
|
||||
$_filter[] = Html::_('select.option', $location, Text::_($_text));
|
||||
}
|
||||
}
|
||||
return $_filter;
|
||||
|
@ -12,6 +12,10 @@
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
|
||||
// import the list field type
|
||||
jimport('joomla.form.helper');
|
||||
JFormHelper::loadFieldClass('list');
|
||||
@ -24,19 +28,19 @@ class JFormFieldHelpdocumentsfiltertype extends JFormFieldList
|
||||
/**
|
||||
* The helpdocumentsfiltertype field type.
|
||||
*
|
||||
* @var string
|
||||
* @var string
|
||||
*/
|
||||
public $type = 'helpdocumentsfiltertype';
|
||||
|
||||
/**
|
||||
* Method to get a list of options for a list input.
|
||||
*
|
||||
* @return array An array of JHtml options.
|
||||
* @return array An array of Html options.
|
||||
*/
|
||||
protected function getOptions()
|
||||
{
|
||||
// Get a db connection.
|
||||
$db = JFactory::getDbo();
|
||||
$db = Factory::getDbo();
|
||||
|
||||
// Create a new query object.
|
||||
$query = $db->getQuery(true);
|
||||
@ -50,8 +54,8 @@ class JFormFieldHelpdocumentsfiltertype extends JFormFieldList
|
||||
$db->setQuery($query);
|
||||
|
||||
$_results = $db->loadColumn();
|
||||
$_filter = array();
|
||||
$_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_TYPE') . ' -');
|
||||
$_filter = [];
|
||||
$_filter[] = Html::_('select.option', '', '- ' . Text::_('COM_COMPONENTBUILDER_FILTER_SELECT_TYPE') . ' -');
|
||||
|
||||
if ($_results)
|
||||
{
|
||||
@ -63,7 +67,7 @@ class JFormFieldHelpdocumentsfiltertype extends JFormFieldList
|
||||
// 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));
|
||||
$_filter[] = Html::_('select.option', $type, Text::_($_text));
|
||||
}
|
||||
}
|
||||
return $_filter;
|
||||
|
@ -12,6 +12,10 @@
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
|
||||
// import the list field type
|
||||
jimport('joomla.form.helper');
|
||||
JFormHelper::loadFieldClass('list');
|
||||
@ -24,7 +28,7 @@ class JFormFieldInterfacepowers extends JFormFieldList
|
||||
/**
|
||||
* The interfacepowers field type.
|
||||
*
|
||||
* @var string
|
||||
* @var string
|
||||
*/
|
||||
public $type = 'interfacepowers';
|
||||
|
||||
@ -48,7 +52,7 @@ class JFormFieldInterfacepowers extends JFormFieldList
|
||||
$script = array();
|
||||
$button_code_name = $this->getAttribute('name');
|
||||
// get the input from url
|
||||
$app = JFactory::getApplication();
|
||||
$app = Factory::getApplication();
|
||||
$jinput = $app->input;
|
||||
// get the view name & id
|
||||
$values = $jinput->getArray(array(
|
||||
@ -64,7 +68,7 @@ class JFormFieldInterfacepowers extends JFormFieldList
|
||||
$ref = '&ref=' . $values['view'] . '&refid=' . $values['id'];
|
||||
$refJ = '&ref=' . $values['view'] . '&refid=' . $values['id'];
|
||||
// get the return value.
|
||||
$_uri = (string) JUri::getInstance();
|
||||
$_uri = (string) \Joomla\CMS\Uri\Uri::getInstance();
|
||||
$_return = urlencode(base64_encode($_uri));
|
||||
// load return value.
|
||||
$ref .= '&return=' . $_return;
|
||||
@ -77,20 +81,20 @@ class JFormFieldInterfacepowers extends JFormFieldList
|
||||
$button_label = preg_replace("/[^A-Za-z ]/", '', $button_label);
|
||||
$button_label = ucfirst(strtolower($button_label));
|
||||
// get user object
|
||||
$user = JFactory::getUser();
|
||||
$user = Factory::getUser();
|
||||
// only add if user allowed to create power
|
||||
if ($user->authorise('power.create', 'com_componentbuilder') && $app->isAdmin()) // TODO for now only in admin area.
|
||||
if ($user->authorise('power.create', 'com_componentbuilder') && $app->isClient('administrator')) // TODO for now only in admin area.
|
||||
{
|
||||
// build Create button
|
||||
$button[] = '<a id="'.$button_code_name.'Create" class="btn btn-small btn-success hasTooltip" title="'.JText::sprintf('COM_COMPONENTBUILDER_CREATE_NEW_S', $button_label).'" style="border-radius: 0px 4px 4px 0px; padding: 4px 4px 4px 7px;"
|
||||
$button[] = '<a id="'.$button_code_name.'Create" class="btn btn-small btn-success hasTooltip" title="'.Text::sprintf('COM_COMPONENTBUILDER_CREATE_NEW_S', $button_label).'" style="border-radius: 0px 4px 4px 0px; padding: 4px 4px 4px 7px;"
|
||||
href="index.php?option=com_componentbuilder&view=power&layout=edit'.$ref.'" >
|
||||
<span class="icon-new icon-white"></span></a>';
|
||||
}
|
||||
// only add if user allowed to edit power
|
||||
if ($user->authorise('power.edit', 'com_componentbuilder') && $app->isAdmin()) // TODO for now only in admin area.
|
||||
if ($user->authorise('power.edit', 'com_componentbuilder') && $app->isClient('administrator')) // TODO for now only in admin area.
|
||||
{
|
||||
// build edit button
|
||||
$button[] = '<a id="'.$button_code_name.'Edit" class="btn btn-small hasTooltip" title="'.JText::sprintf('COM_COMPONENTBUILDER_EDIT_S', $button_label).'" style="display: none; padding: 4px 4px 4px 7px;" href="#" >
|
||||
$button[] = '<a id="'.$button_code_name.'Edit" class="btn btn-small hasTooltip" title="'.Text::sprintf('COM_COMPONENTBUILDER_EDIT_S', $button_label).'" style="display: none; padding: 4px 4px 4px 7px;" href="#" >
|
||||
<span class="icon-edit"></span></a>';
|
||||
// build script
|
||||
$script[] = "
|
||||
@ -123,7 +127,7 @@ class JFormFieldInterfacepowers extends JFormFieldList
|
||||
if (is_array($button) && count($button) > 0)
|
||||
{
|
||||
// Load the needed script.
|
||||
$document = JFactory::getDocument();
|
||||
$document = Factory::getDocument();
|
||||
$document->addScriptDeclaration(implode(' ',$script));
|
||||
// return the button attached to input field.
|
||||
return '<div class="input-append">' .$html . implode('',$button).'</div>';
|
||||
@ -135,7 +139,7 @@ class JFormFieldInterfacepowers extends JFormFieldList
|
||||
/**
|
||||
* Method to get a list of options for a list input.
|
||||
*
|
||||
* @return array An array of JHtml options.
|
||||
* @return array An array of Html options.
|
||||
*/
|
||||
protected function getOptions()
|
||||
{
|
||||
|
@ -12,6 +12,10 @@
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
|
||||
// import the list field type
|
||||
jimport('joomla.form.helper');
|
||||
JFormHelper::loadFieldClass('list');
|
||||
@ -24,14 +28,14 @@ class JFormFieldJoinfields extends JFormFieldList
|
||||
/**
|
||||
* The joinfields field type.
|
||||
*
|
||||
* @var string
|
||||
* @var string
|
||||
*/
|
||||
public $type = 'joinfields';
|
||||
|
||||
/**
|
||||
* Method to get a list of options for a list input.
|
||||
*
|
||||
* @return array An array of JHtml options.
|
||||
* @return array An array of Html options.
|
||||
*/
|
||||
protected function getOptions()
|
||||
{
|
||||
|
@ -12,6 +12,10 @@
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
|
||||
// import the list field type
|
||||
jimport('joomla.form.helper');
|
||||
JFormHelper::loadFieldClass('list');
|
||||
@ -24,7 +28,7 @@ class JFormFieldJoomlacomponent extends JFormFieldList
|
||||
/**
|
||||
* The joomlacomponent field type.
|
||||
*
|
||||
* @var string
|
||||
* @var string
|
||||
*/
|
||||
public $type = 'joomlacomponent';
|
||||
|
||||
@ -48,7 +52,7 @@ class JFormFieldJoomlacomponent extends JFormFieldList
|
||||
$script = array();
|
||||
$button_code_name = $this->getAttribute('name');
|
||||
// get the input from url
|
||||
$app = JFactory::getApplication();
|
||||
$app = Factory::getApplication();
|
||||
$jinput = $app->input;
|
||||
// get the view name & id
|
||||
$values = $jinput->getArray(array(
|
||||
@ -64,7 +68,7 @@ class JFormFieldJoomlacomponent extends JFormFieldList
|
||||
$ref = '&ref=' . $values['view'] . '&refid=' . $values['id'];
|
||||
$refJ = '&ref=' . $values['view'] . '&refid=' . $values['id'];
|
||||
// get the return value.
|
||||
$_uri = (string) JUri::getInstance();
|
||||
$_uri = (string) \Joomla\CMS\Uri\Uri::getInstance();
|
||||
$_return = urlencode(base64_encode($_uri));
|
||||
// load return value.
|
||||
$ref .= '&return=' . $_return;
|
||||
@ -77,20 +81,20 @@ class JFormFieldJoomlacomponent extends JFormFieldList
|
||||
$button_label = preg_replace("/[^A-Za-z ]/", '', $button_label);
|
||||
$button_label = ucfirst(strtolower($button_label));
|
||||
// get user object
|
||||
$user = JFactory::getUser();
|
||||
$user = Factory::getUser();
|
||||
// only add if user allowed to create joomla_component
|
||||
if ($user->authorise('joomla_component.create', 'com_componentbuilder') && $app->isAdmin()) // TODO for now only in admin area.
|
||||
if ($user->authorise('joomla_component.create', 'com_componentbuilder') && $app->isClient('administrator')) // TODO for now only in admin area.
|
||||
{
|
||||
// build Create button
|
||||
$button[] = '<a id="'.$button_code_name.'Create" class="btn btn-small btn-success hasTooltip" title="'.JText::sprintf('COM_COMPONENTBUILDER_CREATE_NEW_S', $button_label).'" style="border-radius: 0px 4px 4px 0px; padding: 4px 4px 4px 7px;"
|
||||
$button[] = '<a id="'.$button_code_name.'Create" class="btn btn-small btn-success hasTooltip" title="'.Text::sprintf('COM_COMPONENTBUILDER_CREATE_NEW_S', $button_label).'" style="border-radius: 0px 4px 4px 0px; padding: 4px 4px 4px 7px;"
|
||||
href="index.php?option=com_componentbuilder&view=joomla_component&layout=edit'.$ref.'" >
|
||||
<span class="icon-new icon-white"></span></a>';
|
||||
}
|
||||
// only add if user allowed to edit joomla_component
|
||||
if ($user->authorise('joomla_component.edit', 'com_componentbuilder') && $app->isAdmin()) // TODO for now only in admin area.
|
||||
if ($user->authorise('joomla_component.edit', 'com_componentbuilder') && $app->isClient('administrator')) // TODO for now only in admin area.
|
||||
{
|
||||
// build edit button
|
||||
$button[] = '<a id="'.$button_code_name.'Edit" class="btn btn-small hasTooltip" title="'.JText::sprintf('COM_COMPONENTBUILDER_EDIT_S', $button_label).'" style="display: none; padding: 4px 4px 4px 7px;" href="#" >
|
||||
$button[] = '<a id="'.$button_code_name.'Edit" class="btn btn-small hasTooltip" title="'.Text::sprintf('COM_COMPONENTBUILDER_EDIT_S', $button_label).'" style="display: none; padding: 4px 4px 4px 7px;" href="#" >
|
||||
<span class="icon-edit"></span></a>';
|
||||
// build script
|
||||
$script[] = "
|
||||
@ -123,7 +127,7 @@ class JFormFieldJoomlacomponent extends JFormFieldList
|
||||
if (is_array($button) && count($button) > 0)
|
||||
{
|
||||
// Load the needed script.
|
||||
$document = JFactory::getDocument();
|
||||
$document = Factory::getDocument();
|
||||
$document->addScriptDeclaration(implode(' ',$script));
|
||||
// return the button attached to input field.
|
||||
return '<div class="input-append">' .$html . implode('',$button).'</div>';
|
||||
@ -135,7 +139,7 @@ class JFormFieldJoomlacomponent extends JFormFieldList
|
||||
/**
|
||||
* Method to get a list of options for a list input.
|
||||
*
|
||||
* @return array An array of JHtml options.
|
||||
* @return array An array of Html options.
|
||||
*/
|
||||
protected function getOptions()
|
||||
{
|
||||
|
@ -12,6 +12,10 @@
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
|
||||
// import the list field type
|
||||
jimport('joomla.form.helper');
|
||||
JFormHelper::loadFieldClass('list');
|
||||
@ -24,14 +28,14 @@ class JFormFieldJoomlacomponents extends JFormFieldList
|
||||
/**
|
||||
* The joomlacomponents field type.
|
||||
*
|
||||
* @var string
|
||||
* @var string
|
||||
*/
|
||||
public $type = 'joomlacomponents';
|
||||
|
||||
/**
|
||||
* Method to get a list of options for a list input.
|
||||
*
|
||||
* @return array An array of JHtml options.
|
||||
* @return array An array of Html options.
|
||||
*/
|
||||
protected function getOptions()
|
||||
{
|
||||
|
@ -12,6 +12,10 @@
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
|
||||
// import the list field type
|
||||
jimport('joomla.form.helper');
|
||||
JFormHelper::loadFieldClass('list');
|
||||
@ -24,19 +28,19 @@ class JFormFieldJoomlacomponentsfilterauthor extends JFormFieldList
|
||||
/**
|
||||
* The joomlacomponentsfilterauthor field type.
|
||||
*
|
||||
* @var string
|
||||
* @var string
|
||||
*/
|
||||
public $type = 'joomlacomponentsfilterauthor';
|
||||
|
||||
/**
|
||||
* Method to get a list of options for a list input.
|
||||
*
|
||||
* @return array An array of JHtml options.
|
||||
* @return array An array of Html options.
|
||||
*/
|
||||
protected function getOptions()
|
||||
{
|
||||
// Get a db connection.
|
||||
$db = JFactory::getDbo();
|
||||
$db = Factory::getDbo();
|
||||
|
||||
// Create a new query object.
|
||||
$query = $db->getQuery(true);
|
||||
@ -50,7 +54,7 @@ class JFormFieldJoomlacomponentsfilterauthor extends JFormFieldList
|
||||
$db->setQuery($query);
|
||||
|
||||
$_results = $db->loadColumn();
|
||||
$_filter = array();
|
||||
$_filter = [];
|
||||
|
||||
if ($_results)
|
||||
{
|
||||
@ -58,7 +62,7 @@ class JFormFieldJoomlacomponentsfilterauthor extends JFormFieldList
|
||||
foreach ($_results as $author)
|
||||
{
|
||||
// Now add the author and its text to the options array
|
||||
$_filter[] = JHtml::_('select.option', $author, $author);
|
||||
$_filter[] = Html::_('select.option', $author, $author);
|
||||
}
|
||||
}
|
||||
return $_filter;
|
||||
|
@ -12,6 +12,10 @@
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
|
||||
// import the list field type
|
||||
jimport('joomla.form.helper');
|
||||
JFormHelper::loadFieldClass('list');
|
||||
@ -24,19 +28,19 @@ class JFormFieldJoomlacomponentsfiltercompanyname extends JFormFieldList
|
||||
/**
|
||||
* The joomlacomponentsfiltercompanyname field type.
|
||||
*
|
||||
* @var string
|
||||
* @var string
|
||||
*/
|
||||
public $type = 'joomlacomponentsfiltercompanyname';
|
||||
|
||||
/**
|
||||
* Method to get a list of options for a list input.
|
||||
*
|
||||
* @return array An array of JHtml options.
|
||||
* @return array An array of Html options.
|
||||
*/
|
||||
protected function getOptions()
|
||||
{
|
||||
// Get a db connection.
|
||||
$db = JFactory::getDbo();
|
||||
$db = Factory::getDbo();
|
||||
|
||||
// Create a new query object.
|
||||
$query = $db->getQuery(true);
|
||||
@ -50,7 +54,7 @@ class JFormFieldJoomlacomponentsfiltercompanyname extends JFormFieldList
|
||||
$db->setQuery($query);
|
||||
|
||||
$_results = $db->loadColumn();
|
||||
$_filter = array();
|
||||
$_filter = [];
|
||||
|
||||
if ($_results)
|
||||
{
|
||||
@ -58,7 +62,7 @@ class JFormFieldJoomlacomponentsfiltercompanyname extends JFormFieldList
|
||||
foreach ($_results as $companyname)
|
||||
{
|
||||
// Now add the companyname and its text to the options array
|
||||
$_filter[] = JHtml::_('select.option', $companyname, $companyname);
|
||||
$_filter[] = Html::_('select.option', $companyname, $companyname);
|
||||
}
|
||||
}
|
||||
return $_filter;
|
||||
|
@ -12,6 +12,10 @@
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
|
||||
// import the list field type
|
||||
jimport('joomla.form.helper');
|
||||
JFormHelper::loadFieldClass('list');
|
||||
@ -24,14 +28,14 @@ class JFormFieldJoomlamodules extends JFormFieldList
|
||||
/**
|
||||
* The joomlamodules field type.
|
||||
*
|
||||
* @var string
|
||||
* @var string
|
||||
*/
|
||||
public $type = 'joomlamodules';
|
||||
|
||||
/**
|
||||
* Method to get a list of options for a list input.
|
||||
*
|
||||
* @return array An array of JHtml options.
|
||||
* @return array An array of Html options.
|
||||
*/
|
||||
protected function getOptions()
|
||||
{
|
||||
|
@ -12,6 +12,10 @@
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
|
||||
// import the list field type
|
||||
jimport('joomla.form.helper');
|
||||
JFormHelper::loadFieldClass('list');
|
||||
@ -24,19 +28,19 @@ class JFormFieldJoomlamodulesfiltertarget extends JFormFieldList
|
||||
/**
|
||||
* The joomlamodulesfiltertarget field type.
|
||||
*
|
||||
* @var string
|
||||
* @var string
|
||||
*/
|
||||
public $type = 'joomlamodulesfiltertarget';
|
||||
|
||||
/**
|
||||
* Method to get a list of options for a list input.
|
||||
*
|
||||
* @return array An array of JHtml options.
|
||||
* @return array An array of Html options.
|
||||
*/
|
||||
protected function getOptions()
|
||||
{
|
||||
// Get a db connection.
|
||||
$db = JFactory::getDbo();
|
||||
$db = Factory::getDbo();
|
||||
|
||||
// Create a new query object.
|
||||
$query = $db->getQuery(true);
|
||||
@ -50,8 +54,8 @@ class JFormFieldJoomlamodulesfiltertarget extends JFormFieldList
|
||||
$db->setQuery($query);
|
||||
|
||||
$_results = $db->loadColumn();
|
||||
$_filter = array();
|
||||
$_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_TARGET_AREA') . ' -');
|
||||
$_filter = [];
|
||||
$_filter[] = Html::_('select.option', '', '- ' . Text::_('COM_COMPONENTBUILDER_FILTER_SELECT_TARGET_AREA') . ' -');
|
||||
|
||||
if ($_results)
|
||||
{
|
||||
@ -63,7 +67,7 @@ class JFormFieldJoomlamodulesfiltertarget extends JFormFieldList
|
||||
// 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));
|
||||
$_filter[] = Html::_('select.option', $target, Text::_($_text));
|
||||
}
|
||||
}
|
||||
return $_filter;
|
||||
|
@ -12,6 +12,10 @@
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
|
||||
// import the list field type
|
||||
jimport('joomla.form.helper');
|
||||
JFormHelper::loadFieldClass('list');
|
||||
@ -24,7 +28,7 @@ class JFormFieldJoomlaplugingroups extends JFormFieldList
|
||||
/**
|
||||
* The joomlaplugingroups field type.
|
||||
*
|
||||
* @var string
|
||||
* @var string
|
||||
*/
|
||||
public $type = 'joomlaplugingroups';
|
||||
|
||||
@ -48,7 +52,7 @@ class JFormFieldJoomlaplugingroups extends JFormFieldList
|
||||
$script = array();
|
||||
$button_code_name = $this->getAttribute('name');
|
||||
// get the input from url
|
||||
$app = JFactory::getApplication();
|
||||
$app = Factory::getApplication();
|
||||
$jinput = $app->input;
|
||||
// get the view name & id
|
||||
$values = $jinput->getArray(array(
|
||||
@ -64,7 +68,7 @@ class JFormFieldJoomlaplugingroups extends JFormFieldList
|
||||
$ref = '&ref=' . $values['view'] . '&refid=' . $values['id'];
|
||||
$refJ = '&ref=' . $values['view'] . '&refid=' . $values['id'];
|
||||
// get the return value.
|
||||
$_uri = (string) JUri::getInstance();
|
||||
$_uri = (string) \Joomla\CMS\Uri\Uri::getInstance();
|
||||
$_return = urlencode(base64_encode($_uri));
|
||||
// load return value.
|
||||
$ref .= '&return=' . $_return;
|
||||
@ -77,20 +81,20 @@ class JFormFieldJoomlaplugingroups extends JFormFieldList
|
||||
$button_label = preg_replace("/[^A-Za-z ]/", '', $button_label);
|
||||
$button_label = ucfirst(strtolower($button_label));
|
||||
// get user object
|
||||
$user = JFactory::getUser();
|
||||
$user = Factory::getUser();
|
||||
// only add if user allowed to create joomla_plugin_group
|
||||
if ($user->authorise('core.create', 'com_componentbuilder') && $app->isAdmin()) // TODO for now only in admin area.
|
||||
if ($user->authorise('core.create', 'com_componentbuilder') && $app->isClient('administrator')) // TODO for now only in admin area.
|
||||
{
|
||||
// build Create button
|
||||
$button[] = '<a id="'.$button_code_name.'Create" class="btn btn-small btn-success hasTooltip" title="'.JText::sprintf('COM_COMPONENTBUILDER_CREATE_NEW_S', $button_label).'" style="border-radius: 0px 4px 4px 0px; padding: 4px 4px 4px 7px;"
|
||||
$button[] = '<a id="'.$button_code_name.'Create" class="btn btn-small btn-success hasTooltip" title="'.Text::sprintf('COM_COMPONENTBUILDER_CREATE_NEW_S', $button_label).'" style="border-radius: 0px 4px 4px 0px; padding: 4px 4px 4px 7px;"
|
||||
href="index.php?option=com_componentbuilder&view=joomla_plugin_group&layout=edit'.$ref.'" >
|
||||
<span class="icon-new icon-white"></span></a>';
|
||||
}
|
||||
// only add if user allowed to edit joomla_plugin_group
|
||||
if ($user->authorise('core.edit', 'com_componentbuilder') && $app->isAdmin()) // TODO for now only in admin area.
|
||||
if ($user->authorise('core.edit', 'com_componentbuilder') && $app->isClient('administrator')) // TODO for now only in admin area.
|
||||
{
|
||||
// build edit button
|
||||
$button[] = '<a id="'.$button_code_name.'Edit" class="btn btn-small hasTooltip" title="'.JText::sprintf('COM_COMPONENTBUILDER_EDIT_S', $button_label).'" style="display: none; padding: 4px 4px 4px 7px;" href="#" >
|
||||
$button[] = '<a id="'.$button_code_name.'Edit" class="btn btn-small hasTooltip" title="'.Text::sprintf('COM_COMPONENTBUILDER_EDIT_S', $button_label).'" style="display: none; padding: 4px 4px 4px 7px;" href="#" >
|
||||
<span class="icon-edit"></span></a>';
|
||||
// build script
|
||||
$script[] = "
|
||||
@ -123,7 +127,7 @@ class JFormFieldJoomlaplugingroups extends JFormFieldList
|
||||
if (is_array($button) && count($button) > 0)
|
||||
{
|
||||
// Load the needed script.
|
||||
$document = JFactory::getDocument();
|
||||
$document = Factory::getDocument();
|
||||
$document->addScriptDeclaration(implode(' ',$script));
|
||||
// return the button attached to input field.
|
||||
return '<div class="input-append">' .$html . implode('',$button).'</div>';
|
||||
@ -135,7 +139,7 @@ class JFormFieldJoomlaplugingroups extends JFormFieldList
|
||||
/**
|
||||
* Method to get a list of options for a list input.
|
||||
*
|
||||
* @return array An array of JHtml options.
|
||||
* @return array An array of Html options.
|
||||
*/
|
||||
protected function getOptions()
|
||||
{
|
||||
|
@ -12,6 +12,10 @@
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
|
||||
// import the list field type
|
||||
jimport('joomla.form.helper');
|
||||
JFormHelper::loadFieldClass('list');
|
||||
@ -24,7 +28,7 @@ class JFormFieldJoomlaplugins extends JFormFieldList
|
||||
/**
|
||||
* The joomlaplugins field type.
|
||||
*
|
||||
* @var string
|
||||
* @var string
|
||||
*/
|
||||
public $type = 'joomlaplugins';
|
||||
|
||||
@ -48,7 +52,7 @@ class JFormFieldJoomlaplugins extends JFormFieldList
|
||||
$script = array();
|
||||
$button_code_name = $this->getAttribute('name');
|
||||
// get the input from url
|
||||
$app = JFactory::getApplication();
|
||||
$app = Factory::getApplication();
|
||||
$jinput = $app->input;
|
||||
// get the view name & id
|
||||
$values = $jinput->getArray(array(
|
||||
@ -64,7 +68,7 @@ class JFormFieldJoomlaplugins extends JFormFieldList
|
||||
$ref = '&ref=' . $values['view'] . '&refid=' . $values['id'];
|
||||
$refJ = '&ref=' . $values['view'] . '&refid=' . $values['id'];
|
||||
// get the return value.
|
||||
$_uri = (string) JUri::getInstance();
|
||||
$_uri = (string) \Joomla\CMS\Uri\Uri::getInstance();
|
||||
$_return = urlencode(base64_encode($_uri));
|
||||
// load return value.
|
||||
$ref .= '&return=' . $_return;
|
||||
@ -77,20 +81,20 @@ class JFormFieldJoomlaplugins extends JFormFieldList
|
||||
$button_label = preg_replace("/[^A-Za-z ]/", '', $button_label);
|
||||
$button_label = ucfirst(strtolower($button_label));
|
||||
// get user object
|
||||
$user = JFactory::getUser();
|
||||
$user = Factory::getUser();
|
||||
// only add if user allowed to create joomla_plugin
|
||||
if ($user->authorise('joomla_plugin.create', 'com_componentbuilder') && $app->isAdmin()) // TODO for now only in admin area.
|
||||
if ($user->authorise('joomla_plugin.create', 'com_componentbuilder') && $app->isClient('administrator')) // TODO for now only in admin area.
|
||||
{
|
||||
// build Create button
|
||||
$button[] = '<a id="'.$button_code_name.'Create" class="btn btn-small btn-success hasTooltip" title="'.JText::sprintf('PLG_EXTENSION_COMPONENTBUILDERPOWERSAUTOLOADERCOMPILER_CREATE_NEW_S', $button_label).'" style="border-radius: 0px 4px 4px 0px; padding: 4px 4px 4px 7px;"
|
||||
$button[] = '<a id="'.$button_code_name.'Create" class="btn btn-small btn-success hasTooltip" title="'.Text::sprintf('PLG_EXTENSION_COMPONENTBUILDERPOWERSAUTOLOADERCOMPILER_CREATE_NEW_S', $button_label).'" style="border-radius: 0px 4px 4px 0px; padding: 4px 4px 4px 7px;"
|
||||
href="index.php?option=com_componentbuilder&view=joomla_plugin&layout=edit'.$ref.'" >
|
||||
<span class="icon-new icon-white"></span></a>';
|
||||
}
|
||||
// only add if user allowed to edit joomla_plugin
|
||||
if ($user->authorise('joomla_plugin.edit', 'com_componentbuilder') && $app->isAdmin()) // TODO for now only in admin area.
|
||||
if ($user->authorise('joomla_plugin.edit', 'com_componentbuilder') && $app->isClient('administrator')) // TODO for now only in admin area.
|
||||
{
|
||||
// build edit button
|
||||
$button[] = '<a id="'.$button_code_name.'Edit" class="btn btn-small hasTooltip" title="'.JText::sprintf('PLG_EXTENSION_COMPONENTBUILDERPOWERSAUTOLOADERCOMPILER_EDIT_S', $button_label).'" style="display: none; padding: 4px 4px 4px 7px;" href="#" >
|
||||
$button[] = '<a id="'.$button_code_name.'Edit" class="btn btn-small hasTooltip" title="'.Text::sprintf('PLG_EXTENSION_COMPONENTBUILDERPOWERSAUTOLOADERCOMPILER_EDIT_S', $button_label).'" style="display: none; padding: 4px 4px 4px 7px;" href="#" >
|
||||
<span class="icon-edit"></span></a>';
|
||||
// build script
|
||||
$script[] = "
|
||||
@ -123,7 +127,7 @@ class JFormFieldJoomlaplugins extends JFormFieldList
|
||||
if (is_array($button) && count($button) > 0)
|
||||
{
|
||||
// Load the needed script.
|
||||
$document = JFactory::getDocument();
|
||||
$document = Factory::getDocument();
|
||||
$document->addScriptDeclaration(implode(' ',$script));
|
||||
// return the button attached to input field.
|
||||
return '<div class="input-append">' .$html . implode('',$button).'</div>';
|
||||
@ -135,7 +139,7 @@ class JFormFieldJoomlaplugins extends JFormFieldList
|
||||
/**
|
||||
* Method to get a list of options for a list input.
|
||||
*
|
||||
* @return array An array of JHtml options.
|
||||
* @return array An array of Html options.
|
||||
*/
|
||||
protected function getOptions()
|
||||
{
|
||||
|
@ -12,6 +12,10 @@
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
|
||||
// import the list field type
|
||||
jimport('joomla.form.helper');
|
||||
JFormHelper::loadFieldClass('list');
|
||||
@ -24,14 +28,14 @@ class JFormFieldLang extends JFormFieldList
|
||||
/**
|
||||
* The lang field type.
|
||||
*
|
||||
* @var string
|
||||
* @var string
|
||||
*/
|
||||
public $type = 'lang';
|
||||
|
||||
/**
|
||||
* Method to get a list of options for a list input.
|
||||
*
|
||||
* @return array An array of JHtml options.
|
||||
* @return array An array of Html options.
|
||||
*/
|
||||
protected function getOptions()
|
||||
{
|
||||
|
@ -12,6 +12,10 @@
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
|
||||
// import the list field type
|
||||
jimport('joomla.form.helper');
|
||||
JFormHelper::loadFieldClass('list');
|
||||
@ -24,19 +28,19 @@ class JFormFieldLayoutsfilteraddphpview extends JFormFieldList
|
||||
/**
|
||||
* The layoutsfilteraddphpview field type.
|
||||
*
|
||||
* @var string
|
||||
* @var string
|
||||
*/
|
||||
public $type = 'layoutsfilteraddphpview';
|
||||
|
||||
/**
|
||||
* Method to get a list of options for a list input.
|
||||
*
|
||||
* @return array An array of JHtml options.
|
||||
* @return array An array of Html options.
|
||||
*/
|
||||
protected function getOptions()
|
||||
{
|
||||
// Get a db connection.
|
||||
$db = JFactory::getDbo();
|
||||
$db = Factory::getDbo();
|
||||
|
||||
// Create a new query object.
|
||||
$query = $db->getQuery(true);
|
||||
@ -50,8 +54,8 @@ class JFormFieldLayoutsfilteraddphpview extends JFormFieldList
|
||||
$db->setQuery($query);
|
||||
|
||||
$_results = $db->loadColumn();
|
||||
$_filter = array();
|
||||
$_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_ADD_PHP_CUSTOM_VIEW_SCRIPT') . ' -');
|
||||
$_filter = [];
|
||||
$_filter[] = Html::_('select.option', '', '- ' . Text::_('COM_COMPONENTBUILDER_FILTER_SELECT_ADD_PHP_CUSTOM_VIEW_SCRIPT') . ' -');
|
||||
|
||||
if ($_results)
|
||||
{
|
||||
@ -63,7 +67,7 @@ class JFormFieldLayoutsfilteraddphpview extends JFormFieldList
|
||||
// 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));
|
||||
$_filter[] = Html::_('select.option', $add_php_view, Text::_($_text));
|
||||
}
|
||||
}
|
||||
return $_filter;
|
||||
|
@ -12,6 +12,10 @@
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
|
||||
// import the list field type
|
||||
jimport('joomla.form.helper');
|
||||
JFormHelper::loadFieldClass('list');
|
||||
@ -24,14 +28,14 @@ class JFormFieldLibconfigfield extends JFormFieldList
|
||||
/**
|
||||
* The libconfigfield field type.
|
||||
*
|
||||
* @var string
|
||||
* @var string
|
||||
*/
|
||||
public $type = 'libconfigfield';
|
||||
|
||||
/**
|
||||
* Method to get a list of options for a list input.
|
||||
*
|
||||
* @return array An array of JHtml options.
|
||||
* @return array An array of Html options.
|
||||
*/
|
||||
protected function getOptions()
|
||||
{
|
||||
|
@ -12,6 +12,10 @@
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
|
||||
// import the list field type
|
||||
jimport('joomla.form.helper');
|
||||
JFormHelper::loadFieldClass('list');
|
||||
@ -24,7 +28,7 @@ class JFormFieldLibraries extends JFormFieldList
|
||||
/**
|
||||
* The libraries field type.
|
||||
*
|
||||
* @var string
|
||||
* @var string
|
||||
*/
|
||||
public $type = 'libraries';
|
||||
|
||||
@ -48,7 +52,7 @@ class JFormFieldLibraries extends JFormFieldList
|
||||
$script = array();
|
||||
$button_code_name = $this->getAttribute('name');
|
||||
// get the input from url
|
||||
$app = JFactory::getApplication();
|
||||
$app = Factory::getApplication();
|
||||
$jinput = $app->input;
|
||||
// get the view name & id
|
||||
$values = $jinput->getArray(array(
|
||||
@ -64,7 +68,7 @@ class JFormFieldLibraries extends JFormFieldList
|
||||
$ref = '&ref=' . $values['view'] . '&refid=' . $values['id'];
|
||||
$refJ = '&ref=' . $values['view'] . '&refid=' . $values['id'];
|
||||
// get the return value.
|
||||
$_uri = (string) JUri::getInstance();
|
||||
$_uri = (string) \Joomla\CMS\Uri\Uri::getInstance();
|
||||
$_return = urlencode(base64_encode($_uri));
|
||||
// load return value.
|
||||
$ref .= '&return=' . $_return;
|
||||
@ -77,20 +81,20 @@ class JFormFieldLibraries extends JFormFieldList
|
||||
$button_label = preg_replace("/[^A-Za-z ]/", '', $button_label);
|
||||
$button_label = ucfirst(strtolower($button_label));
|
||||
// get user object
|
||||
$user = JFactory::getUser();
|
||||
$user = Factory::getUser();
|
||||
// only add if user allowed to create library
|
||||
if ($user->authorise('library.create', 'com_componentbuilder') && $app->isAdmin()) // TODO for now only in admin area.
|
||||
if ($user->authorise('library.create', 'com_componentbuilder') && $app->isClient('administrator')) // TODO for now only in admin area.
|
||||
{
|
||||
// build Create button
|
||||
$button[] = '<a id="'.$button_code_name.'Create" class="btn btn-small btn-success hasTooltip" title="'.JText::sprintf('COM_COMPONENTBUILDER_CREATE_NEW_S', $button_label).'" style="border-radius: 0px 4px 4px 0px; padding: 4px 4px 4px 7px;"
|
||||
$button[] = '<a id="'.$button_code_name.'Create" class="btn btn-small btn-success hasTooltip" title="'.Text::sprintf('COM_COMPONENTBUILDER_CREATE_NEW_S', $button_label).'" style="border-radius: 0px 4px 4px 0px; padding: 4px 4px 4px 7px;"
|
||||
href="index.php?option=com_componentbuilder&view=library&layout=edit'.$ref.'" >
|
||||
<span class="icon-new icon-white"></span></a>';
|
||||
}
|
||||
// only add if user allowed to edit library
|
||||
if ($user->authorise('library.edit', 'com_componentbuilder') && $app->isAdmin()) // TODO for now only in admin area.
|
||||
if ($user->authorise('library.edit', 'com_componentbuilder') && $app->isClient('administrator')) // TODO for now only in admin area.
|
||||
{
|
||||
// build edit button
|
||||
$button[] = '<a id="'.$button_code_name.'Edit" class="btn btn-small hasTooltip" title="'.JText::sprintf('COM_COMPONENTBUILDER_EDIT_S', $button_label).'" style="display: none; padding: 4px 4px 4px 7px;" href="#" >
|
||||
$button[] = '<a id="'.$button_code_name.'Edit" class="btn btn-small hasTooltip" title="'.Text::sprintf('COM_COMPONENTBUILDER_EDIT_S', $button_label).'" style="display: none; padding: 4px 4px 4px 7px;" href="#" >
|
||||
<span class="icon-edit"></span></a>';
|
||||
// build script
|
||||
$script[] = "
|
||||
@ -123,7 +127,7 @@ class JFormFieldLibraries extends JFormFieldList
|
||||
if (is_array($button) && count($button) > 0)
|
||||
{
|
||||
// Load the needed script.
|
||||
$document = JFactory::getDocument();
|
||||
$document = Factory::getDocument();
|
||||
$document->addScriptDeclaration(implode(' ',$script));
|
||||
// return the button attached to input field.
|
||||
return '<div class="input-append">' .$html . implode('',$button).'</div>';
|
||||
@ -135,7 +139,7 @@ class JFormFieldLibraries extends JFormFieldList
|
||||
/**
|
||||
* Method to get a list of options for a list input.
|
||||
*
|
||||
* @return array An array of JHtml options.
|
||||
* @return array An array of Html options.
|
||||
*/
|
||||
protected function getOptions()
|
||||
{
|
||||
|
@ -12,6 +12,10 @@
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
|
||||
// import the list field type
|
||||
jimport('joomla.form.helper');
|
||||
JFormHelper::loadFieldClass('list');
|
||||
@ -24,19 +28,19 @@ class JFormFieldLibrariesfiltertarget extends JFormFieldList
|
||||
/**
|
||||
* The librariesfiltertarget field type.
|
||||
*
|
||||
* @var string
|
||||
* @var string
|
||||
*/
|
||||
public $type = 'librariesfiltertarget';
|
||||
|
||||
/**
|
||||
* Method to get a list of options for a list input.
|
||||
*
|
||||
* @return array An array of JHtml options.
|
||||
* @return array An array of Html options.
|
||||
*/
|
||||
protected function getOptions()
|
||||
{
|
||||
// Get a db connection.
|
||||
$db = JFactory::getDbo();
|
||||
$db = Factory::getDbo();
|
||||
|
||||
// Create a new query object.
|
||||
$query = $db->getQuery(true);
|
||||
@ -50,8 +54,8 @@ class JFormFieldLibrariesfiltertarget extends JFormFieldList
|
||||
$db->setQuery($query);
|
||||
|
||||
$_results = $db->loadColumn();
|
||||
$_filter = array();
|
||||
$_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_TARGET_FOLDER') . ' -');
|
||||
$_filter = [];
|
||||
$_filter[] = Html::_('select.option', '', '- ' . Text::_('COM_COMPONENTBUILDER_FILTER_SELECT_TARGET_FOLDER') . ' -');
|
||||
|
||||
if ($_results)
|
||||
{
|
||||
@ -63,7 +67,7 @@ class JFormFieldLibrariesfiltertarget extends JFormFieldList
|
||||
// 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));
|
||||
$_filter[] = Html::_('select.option', $target, Text::_($_text));
|
||||
}
|
||||
}
|
||||
return $_filter;
|
||||
|
@ -12,6 +12,10 @@
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
|
||||
// import the list field type
|
||||
jimport('joomla.form.helper');
|
||||
JFormHelper::loadFieldClass('list');
|
||||
@ -24,19 +28,19 @@ class JFormFieldLibrariesfiltertype extends JFormFieldList
|
||||
/**
|
||||
* The librariesfiltertype field type.
|
||||
*
|
||||
* @var string
|
||||
* @var string
|
||||
*/
|
||||
public $type = 'librariesfiltertype';
|
||||
|
||||
/**
|
||||
* Method to get a list of options for a list input.
|
||||
*
|
||||
* @return array An array of JHtml options.
|
||||
* @return array An array of Html options.
|
||||
*/
|
||||
protected function getOptions()
|
||||
{
|
||||
// Get a db connection.
|
||||
$db = JFactory::getDbo();
|
||||
$db = Factory::getDbo();
|
||||
|
||||
// Create a new query object.
|
||||
$query = $db->getQuery(true);
|
||||
@ -50,8 +54,8 @@ class JFormFieldLibrariesfiltertype extends JFormFieldList
|
||||
$db->setQuery($query);
|
||||
|
||||
$_results = $db->loadColumn();
|
||||
$_filter = array();
|
||||
$_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_TYPE_BEHAVIOR') . ' -');
|
||||
$_filter = [];
|
||||
$_filter[] = Html::_('select.option', '', '- ' . Text::_('COM_COMPONENTBUILDER_FILTER_SELECT_TYPE_BEHAVIOR') . ' -');
|
||||
|
||||
if ($_results)
|
||||
{
|
||||
@ -63,7 +67,7 @@ class JFormFieldLibrariesfiltertype extends JFormFieldList
|
||||
// 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));
|
||||
$_filter[] = Html::_('select.option', $type, Text::_($_text));
|
||||
}
|
||||
}
|
||||
return $_filter;
|
||||
|
@ -12,6 +12,10 @@
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
|
||||
// import the list field type
|
||||
jimport('joomla.form.helper');
|
||||
JFormHelper::loadFieldClass('list');
|
||||
@ -24,7 +28,7 @@ class JFormFieldLibrariesx extends JFormFieldList
|
||||
/**
|
||||
* The librariesx field type.
|
||||
*
|
||||
* @var string
|
||||
* @var string
|
||||
*/
|
||||
public $type = 'librariesx';
|
||||
|
||||
@ -48,7 +52,7 @@ class JFormFieldLibrariesx extends JFormFieldList
|
||||
$script = array();
|
||||
$button_code_name = $this->getAttribute('name');
|
||||
// get the input from url
|
||||
$app = JFactory::getApplication();
|
||||
$app = Factory::getApplication();
|
||||
$jinput = $app->input;
|
||||
// get the view name & id
|
||||
$values = $jinput->getArray(array(
|
||||
@ -64,7 +68,7 @@ class JFormFieldLibrariesx extends JFormFieldList
|
||||
$ref = '&ref=' . $values['view'] . '&refid=' . $values['id'];
|
||||
$refJ = '&ref=' . $values['view'] . '&refid=' . $values['id'];
|
||||
// get the return value.
|
||||
$_uri = (string) JUri::getInstance();
|
||||
$_uri = (string) \Joomla\CMS\Uri\Uri::getInstance();
|
||||
$_return = urlencode(base64_encode($_uri));
|
||||
// load return value.
|
||||
$ref .= '&return=' . $_return;
|
||||
@ -77,20 +81,20 @@ class JFormFieldLibrariesx extends JFormFieldList
|
||||
$button_label = preg_replace("/[^A-Za-z ]/", '', $button_label);
|
||||
$button_label = ucfirst(strtolower($button_label));
|
||||
// get user object
|
||||
$user = JFactory::getUser();
|
||||
$user = Factory::getUser();
|
||||
// only add if user allowed to create library
|
||||
if ($user->authorise('library.create', 'com_componentbuilder') && $app->isAdmin()) // TODO for now only in admin area.
|
||||
if ($user->authorise('library.create', 'com_componentbuilder') && $app->isClient('administrator')) // TODO for now only in admin area.
|
||||
{
|
||||
// build Create button
|
||||
$button[] = '<a id="'.$button_code_name.'Create" class="btn btn-small btn-success hasTooltip" title="'.JText::sprintf('COM_COMPONENTBUILDER_CREATE_NEW_S', $button_label).'" style="border-radius: 0px 4px 4px 0px; padding: 4px 4px 4px 7px;"
|
||||
$button[] = '<a id="'.$button_code_name.'Create" class="btn btn-small btn-success hasTooltip" title="'.Text::sprintf('COM_COMPONENTBUILDER_CREATE_NEW_S', $button_label).'" style="border-radius: 0px 4px 4px 0px; padding: 4px 4px 4px 7px;"
|
||||
href="index.php?option=com_componentbuilder&view=library&layout=edit'.$ref.'" >
|
||||
<span class="icon-new icon-white"></span></a>';
|
||||
}
|
||||
// only add if user allowed to edit library
|
||||
if ($user->authorise('library.edit', 'com_componentbuilder') && $app->isAdmin()) // TODO for now only in admin area.
|
||||
if ($user->authorise('library.edit', 'com_componentbuilder') && $app->isClient('administrator')) // TODO for now only in admin area.
|
||||
{
|
||||
// build edit button
|
||||
$button[] = '<a id="'.$button_code_name.'Edit" class="btn btn-small hasTooltip" title="'.JText::sprintf('COM_COMPONENTBUILDER_EDIT_S', $button_label).'" style="display: none; padding: 4px 4px 4px 7px;" href="#" >
|
||||
$button[] = '<a id="'.$button_code_name.'Edit" class="btn btn-small hasTooltip" title="'.Text::sprintf('COM_COMPONENTBUILDER_EDIT_S', $button_label).'" style="display: none; padding: 4px 4px 4px 7px;" href="#" >
|
||||
<span class="icon-edit"></span></a>';
|
||||
// build script
|
||||
$script[] = "
|
||||
@ -123,7 +127,7 @@ class JFormFieldLibrariesx extends JFormFieldList
|
||||
if (is_array($button) && count($button) > 0)
|
||||
{
|
||||
// Load the needed script.
|
||||
$document = JFactory::getDocument();
|
||||
$document = Factory::getDocument();
|
||||
$document->addScriptDeclaration(implode(' ',$script));
|
||||
// return the button attached to input field.
|
||||
return '<div class="input-append">' .$html . implode('',$button).'</div>';
|
||||
@ -135,7 +139,7 @@ class JFormFieldLibrariesx extends JFormFieldList
|
||||
/**
|
||||
* Method to get a list of options for a list input.
|
||||
*
|
||||
* @return array An array of JHtml options.
|
||||
* @return array An array of Html options.
|
||||
*/
|
||||
protected function getOptions()
|
||||
{
|
||||
|
@ -12,6 +12,10 @@
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
|
||||
// import the list field type
|
||||
jimport('joomla.form.helper');
|
||||
JFormHelper::loadFieldClass('list');
|
||||
@ -24,7 +28,7 @@ class JFormFieldLibrary extends JFormFieldList
|
||||
/**
|
||||
* The library field type.
|
||||
*
|
||||
* @var string
|
||||
* @var string
|
||||
*/
|
||||
public $type = 'library';
|
||||
|
||||
@ -48,7 +52,7 @@ class JFormFieldLibrary extends JFormFieldList
|
||||
$script = array();
|
||||
$button_code_name = $this->getAttribute('name');
|
||||
// get the input from url
|
||||
$app = JFactory::getApplication();
|
||||
$app = Factory::getApplication();
|
||||
$jinput = $app->input;
|
||||
// get the view name & id
|
||||
$values = $jinput->getArray(array(
|
||||
@ -64,7 +68,7 @@ class JFormFieldLibrary extends JFormFieldList
|
||||
$ref = '&ref=' . $values['view'] . '&refid=' . $values['id'];
|
||||
$refJ = '&ref=' . $values['view'] . '&refid=' . $values['id'];
|
||||
// get the return value.
|
||||
$_uri = (string) JUri::getInstance();
|
||||
$_uri = (string) \Joomla\CMS\Uri\Uri::getInstance();
|
||||
$_return = urlencode(base64_encode($_uri));
|
||||
// load return value.
|
||||
$ref .= '&return=' . $_return;
|
||||
@ -77,20 +81,20 @@ class JFormFieldLibrary extends JFormFieldList
|
||||
$button_label = preg_replace("/[^A-Za-z ]/", '', $button_label);
|
||||
$button_label = ucfirst(strtolower($button_label));
|
||||
// get user object
|
||||
$user = JFactory::getUser();
|
||||
$user = Factory::getUser();
|
||||
// only add if user allowed to create library
|
||||
if ($user->authorise('library.create', 'com_componentbuilder') && $app->isAdmin()) // TODO for now only in admin area.
|
||||
if ($user->authorise('library.create', 'com_componentbuilder') && $app->isClient('administrator')) // TODO for now only in admin area.
|
||||
{
|
||||
// build Create button
|
||||
$button[] = '<a id="'.$button_code_name.'Create" class="btn btn-small btn-success hasTooltip" title="'.JText::sprintf('COM_COMPONENTBUILDER_CREATE_NEW_S', $button_label).'" style="border-radius: 0px 4px 4px 0px; padding: 4px 4px 4px 7px;"
|
||||
$button[] = '<a id="'.$button_code_name.'Create" class="btn btn-small btn-success hasTooltip" title="'.Text::sprintf('COM_COMPONENTBUILDER_CREATE_NEW_S', $button_label).'" style="border-radius: 0px 4px 4px 0px; padding: 4px 4px 4px 7px;"
|
||||
href="index.php?option=com_componentbuilder&view=library&layout=edit'.$ref.'" >
|
||||
<span class="icon-new icon-white"></span></a>';
|
||||
}
|
||||
// only add if user allowed to edit library
|
||||
if ($user->authorise('library.edit', 'com_componentbuilder') && $app->isAdmin()) // TODO for now only in admin area.
|
||||
if ($user->authorise('library.edit', 'com_componentbuilder') && $app->isClient('administrator')) // TODO for now only in admin area.
|
||||
{
|
||||
// build edit button
|
||||
$button[] = '<a id="'.$button_code_name.'Edit" class="btn btn-small hasTooltip" title="'.JText::sprintf('COM_COMPONENTBUILDER_EDIT_S', $button_label).'" style="display: none; padding: 4px 4px 4px 7px;" href="#" >
|
||||
$button[] = '<a id="'.$button_code_name.'Edit" class="btn btn-small hasTooltip" title="'.Text::sprintf('COM_COMPONENTBUILDER_EDIT_S', $button_label).'" style="display: none; padding: 4px 4px 4px 7px;" href="#" >
|
||||
<span class="icon-edit"></span></a>';
|
||||
// build script
|
||||
$script[] = "
|
||||
@ -123,7 +127,7 @@ class JFormFieldLibrary extends JFormFieldList
|
||||
if (is_array($button) && count($button) > 0)
|
||||
{
|
||||
// Load the needed script.
|
||||
$document = JFactory::getDocument();
|
||||
$document = Factory::getDocument();
|
||||
$document->addScriptDeclaration(implode(' ',$script));
|
||||
// return the button attached to input field.
|
||||
return '<div class="input-append">' .$html . implode('',$button).'</div>';
|
||||
@ -135,7 +139,7 @@ class JFormFieldLibrary extends JFormFieldList
|
||||
/**
|
||||
* Method to get a list of options for a list input.
|
||||
*
|
||||
* @return array An array of JHtml options.
|
||||
* @return array An array of Html options.
|
||||
*/
|
||||
protected function getOptions()
|
||||
{
|
||||
|
@ -12,6 +12,10 @@
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
|
||||
// import the list field type
|
||||
jimport('joomla.form.helper');
|
||||
JFormHelper::loadFieldClass('list');
|
||||
@ -24,14 +28,14 @@ class JFormFieldLibraryfiles extends JFormFieldList
|
||||
/**
|
||||
* The libraryfiles field type.
|
||||
*
|
||||
* @var string
|
||||
* @var string
|
||||
*/
|
||||
public $type = 'libraryfiles';
|
||||
|
||||
/**
|
||||
* Method to get a list of options for a list input.
|
||||
*
|
||||
* @return array An array of JHtml options.
|
||||
* @return array An array of Html options.
|
||||
*/
|
||||
protected function getOptions()
|
||||
{
|
||||
|
@ -12,6 +12,10 @@
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
|
||||
// import the list field type
|
||||
jimport('joomla.form.helper');
|
||||
JFormHelper::loadFieldClass('list');
|
||||
@ -24,14 +28,14 @@ class JFormFieldLibraryreadonly extends JFormFieldList
|
||||
/**
|
||||
* The libraryreadonly field type.
|
||||
*
|
||||
* @var string
|
||||
* @var string
|
||||
*/
|
||||
public $type = 'libraryreadonly';
|
||||
|
||||
/**
|
||||
* Method to get a list of options for a list input.
|
||||
*
|
||||
* @return array An array of JHtml options.
|
||||
* @return array An array of Html options.
|
||||
*/
|
||||
protected function getOptions()
|
||||
{
|
||||
|
@ -12,6 +12,10 @@
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
|
||||
// import the list field type
|
||||
jimport('joomla.form.helper');
|
||||
JFormHelper::loadFieldClass('list');
|
||||
@ -24,14 +28,14 @@ class JFormFieldLinkedviewsorderfields extends JFormFieldList
|
||||
/**
|
||||
* The linkedviewsorderfields field type.
|
||||
*
|
||||
* @var string
|
||||
* @var string
|
||||
*/
|
||||
public $type = 'linkedviewsorderfields';
|
||||
|
||||
/**
|
||||
* Method to get a list of options for a list input.
|
||||
*
|
||||
* @return array An array of JHtml options.
|
||||
* @return array An array of Html options.
|
||||
*/
|
||||
protected function getOptions()
|
||||
{
|
||||
|
@ -12,6 +12,10 @@
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
|
||||
// import the list field type
|
||||
jimport('joomla.form.helper');
|
||||
JFormHelper::loadFieldClass('list');
|
||||
@ -24,14 +28,14 @@ class JFormFieldListfields extends JFormFieldList
|
||||
/**
|
||||
* The listfields field type.
|
||||
*
|
||||
* @var string
|
||||
* @var string
|
||||
*/
|
||||
public $type = 'listfields';
|
||||
|
||||
/**
|
||||
* Method to get a list of options for a list input.
|
||||
*
|
||||
* @return array An array of JHtml options.
|
||||
* @return array An array of Html options.
|
||||
*/
|
||||
protected function getOptions()
|
||||
{
|
||||
|
@ -12,6 +12,10 @@
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
|
||||
// import the list field type
|
||||
jimport('joomla.form.helper');
|
||||
JFormHelper::loadFieldClass('list');
|
||||
@ -24,7 +28,7 @@ class JFormFieldMaingets extends JFormFieldList
|
||||
/**
|
||||
* The maingets field type.
|
||||
*
|
||||
* @var string
|
||||
* @var string
|
||||
*/
|
||||
public $type = 'maingets';
|
||||
|
||||
@ -48,7 +52,7 @@ class JFormFieldMaingets extends JFormFieldList
|
||||
$script = array();
|
||||
$button_code_name = $this->getAttribute('name');
|
||||
// get the input from url
|
||||
$app = JFactory::getApplication();
|
||||
$app = Factory::getApplication();
|
||||
$jinput = $app->input;
|
||||
// get the view name & id
|
||||
$values = $jinput->getArray(array(
|
||||
@ -64,7 +68,7 @@ class JFormFieldMaingets extends JFormFieldList
|
||||
$ref = '&ref=' . $values['view'] . '&refid=' . $values['id'];
|
||||
$refJ = '&ref=' . $values['view'] . '&refid=' . $values['id'];
|
||||
// get the return value.
|
||||
$_uri = (string) JUri::getInstance();
|
||||
$_uri = (string) \Joomla\CMS\Uri\Uri::getInstance();
|
||||
$_return = urlencode(base64_encode($_uri));
|
||||
// load return value.
|
||||
$ref .= '&return=' . $_return;
|
||||
@ -77,20 +81,20 @@ class JFormFieldMaingets extends JFormFieldList
|
||||
$button_label = preg_replace("/[^A-Za-z ]/", '', $button_label);
|
||||
$button_label = ucfirst(strtolower($button_label));
|
||||
// get user object
|
||||
$user = JFactory::getUser();
|
||||
$user = Factory::getUser();
|
||||
// only add if user allowed to create dynamic_get
|
||||
if ($user->authorise('dynamic_get.create', 'com_componentbuilder') && $app->isAdmin()) // TODO for now only in admin area.
|
||||
if ($user->authorise('dynamic_get.create', 'com_componentbuilder') && $app->isClient('administrator')) // TODO for now only in admin area.
|
||||
{
|
||||
// build Create button
|
||||
$button[] = '<a id="'.$button_code_name.'Create" class="btn btn-small btn-success hasTooltip" title="'.JText::sprintf('COM_COMPONENTBUILDER_CREATE_NEW_S', $button_label).'" style="border-radius: 0px 4px 4px 0px; padding: 4px 4px 4px 7px;"
|
||||
$button[] = '<a id="'.$button_code_name.'Create" class="btn btn-small btn-success hasTooltip" title="'.Text::sprintf('COM_COMPONENTBUILDER_CREATE_NEW_S', $button_label).'" style="border-radius: 0px 4px 4px 0px; padding: 4px 4px 4px 7px;"
|
||||
href="index.php?option=com_componentbuilder&view=dynamic_get&layout=edit'.$ref.'" >
|
||||
<span class="icon-new icon-white"></span></a>';
|
||||
}
|
||||
// only add if user allowed to edit dynamic_get
|
||||
if ($user->authorise('dynamic_get.edit', 'com_componentbuilder') && $app->isAdmin()) // TODO for now only in admin area.
|
||||
if ($user->authorise('dynamic_get.edit', 'com_componentbuilder') && $app->isClient('administrator')) // TODO for now only in admin area.
|
||||
{
|
||||
// build edit button
|
||||
$button[] = '<a id="'.$button_code_name.'Edit" class="btn btn-small hasTooltip" title="'.JText::sprintf('COM_COMPONENTBUILDER_EDIT_S', $button_label).'" style="display: none; padding: 4px 4px 4px 7px;" href="#" >
|
||||
$button[] = '<a id="'.$button_code_name.'Edit" class="btn btn-small hasTooltip" title="'.Text::sprintf('COM_COMPONENTBUILDER_EDIT_S', $button_label).'" style="display: none; padding: 4px 4px 4px 7px;" href="#" >
|
||||
<span class="icon-edit"></span></a>';
|
||||
// build script
|
||||
$script[] = "
|
||||
@ -123,7 +127,7 @@ class JFormFieldMaingets extends JFormFieldList
|
||||
if (is_array($button) && count($button) > 0)
|
||||
{
|
||||
// Load the needed script.
|
||||
$document = JFactory::getDocument();
|
||||
$document = Factory::getDocument();
|
||||
$document->addScriptDeclaration(implode(' ',$script));
|
||||
// return the button attached to input field.
|
||||
return '<div class="input-append">' .$html . implode('',$button).'</div>';
|
||||
@ -135,7 +139,7 @@ class JFormFieldMaingets extends JFormFieldList
|
||||
/**
|
||||
* Method to get a list of options for a list input.
|
||||
*
|
||||
* @return array An array of JHtml options.
|
||||
* @return array An array of Html options.
|
||||
*/
|
||||
protected function getOptions()
|
||||
{
|
||||
|
@ -12,6 +12,10 @@
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
|
||||
// import the list field type
|
||||
jimport('joomla.form.helper');
|
||||
JFormHelper::loadFieldClass('list');
|
||||
@ -24,14 +28,14 @@ class JFormFieldMatchfield extends JFormFieldList
|
||||
/**
|
||||
* The matchfield field type.
|
||||
*
|
||||
* @var string
|
||||
* @var string
|
||||
*/
|
||||
public $type = 'matchfield';
|
||||
|
||||
/**
|
||||
* Method to get a list of options for a list input.
|
||||
*
|
||||
* @return array An array of JHtml options.
|
||||
* @return array An array of Html options.
|
||||
*/
|
||||
protected function getOptions()
|
||||
{
|
||||
|
@ -12,6 +12,10 @@
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
|
||||
// import the list field type
|
||||
jimport('joomla.form.helper');
|
||||
JFormHelper::loadFieldClass('list');
|
||||
@ -24,14 +28,14 @@ class JFormFieldNamespaces extends JFormFieldList
|
||||
/**
|
||||
* The namespaces field type.
|
||||
*
|
||||
* @var string
|
||||
* @var string
|
||||
*/
|
||||
public $type = 'namespaces';
|
||||
|
||||
/**
|
||||
* Method to get a list of options for a list input.
|
||||
*
|
||||
* @return array An array of JHtml options.
|
||||
* @return array An array of Html options.
|
||||
*/
|
||||
protected function getOptions()
|
||||
{
|
||||
|
@ -12,6 +12,10 @@
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
|
||||
// import the list field type
|
||||
jimport('joomla.form.helper');
|
||||
JFormHelper::loadFieldClass('list');
|
||||
@ -24,22 +28,22 @@ class JFormFieldPluginsclassmethods extends JFormFieldList
|
||||
/**
|
||||
* The pluginsclassmethods field type.
|
||||
*
|
||||
* @var string
|
||||
* @var string
|
||||
*/
|
||||
public $type = 'pluginsclassmethods';
|
||||
|
||||
/**
|
||||
* Method to get a list of options for a list input.
|
||||
*
|
||||
* @return array An array of JHtml options.
|
||||
* @return array An array of Html options.
|
||||
*/
|
||||
protected function getOptions()
|
||||
{
|
||||
|
||||
// Get the user object.
|
||||
$user = JFactory::getUser();
|
||||
$user = Factory::getUser();
|
||||
// Get the databse object.
|
||||
$db = JFactory::getDBO();
|
||||
$db = Factory::getDBO();
|
||||
$query = $db->getQuery(true);
|
||||
$query->select($db->quoteName(array('a.id','a.name','a.visibility'),array('id','method_name','visibility')));
|
||||
$query->from($db->quoteName('#__componentbuilder_class_method', 'a'));
|
||||
@ -61,7 +65,7 @@ class JFormFieldPluginsclassmethods extends JFormFieldList
|
||||
$options = array();
|
||||
if ($items)
|
||||
{
|
||||
$options[] = JHtml::_('select.option', '', 'Select a method');
|
||||
$options[] = Html::_('select.option', '', 'Select a method');
|
||||
foreach($items as $item)
|
||||
{
|
||||
// we are using this code in more then one field JCB custom_code
|
||||
@ -73,7 +77,7 @@ class JFormFieldPluginsclassmethods extends JFormFieldList
|
||||
{
|
||||
$select = $item->visibility . ' $' . $item->method_name;
|
||||
}
|
||||
$options[] = JHtml::_('select.option', $item->id, $select);
|
||||
$options[] = Html::_('select.option', $item->id, $select);
|
||||
}
|
||||
}
|
||||
return $options;
|
||||
|
@ -12,6 +12,10 @@
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
|
||||
// import the list field type
|
||||
jimport('joomla.form.helper');
|
||||
JFormHelper::loadFieldClass('list');
|
||||
@ -24,22 +28,22 @@ class JFormFieldPluginsclassproperties extends JFormFieldList
|
||||
/**
|
||||
* The pluginsclassproperties field type.
|
||||
*
|
||||
* @var string
|
||||
* @var string
|
||||
*/
|
||||
public $type = 'pluginsclassproperties';
|
||||
|
||||
/**
|
||||
* Method to get a list of options for a list input.
|
||||
*
|
||||
* @return array An array of JHtml options.
|
||||
* @return array An array of Html options.
|
||||
*/
|
||||
protected function getOptions()
|
||||
{
|
||||
|
||||
// Get the user object.
|
||||
$user = JFactory::getUser();
|
||||
$user = Factory::getUser();
|
||||
// Get the databse object.
|
||||
$db = JFactory::getDBO();
|
||||
$db = Factory::getDBO();
|
||||
$query = $db->getQuery(true);
|
||||
$query->select($db->quoteName(array('a.id','a.name','a.visibility'),array('id','property_name','visibility')));
|
||||
$query->from($db->quoteName('#__componentbuilder_class_property', 'a'));
|
||||
@ -61,7 +65,7 @@ class JFormFieldPluginsclassproperties extends JFormFieldList
|
||||
$options = array();
|
||||
if ($items)
|
||||
{
|
||||
$options[] = JHtml::_('select.option', '', 'Select a property');
|
||||
$options[] = Html::_('select.option', '', 'Select a property');
|
||||
foreach($items as $item)
|
||||
{
|
||||
// we are using this code in more then one field JCB custom_code
|
||||
@ -73,7 +77,7 @@ class JFormFieldPluginsclassproperties extends JFormFieldList
|
||||
{
|
||||
$select = $item->visibility . ' $' . $item->property_name;
|
||||
}
|
||||
$options[] = JHtml::_('select.option', $item->id, $select);
|
||||
$options[] = Html::_('select.option', $item->id, $select);
|
||||
}
|
||||
}
|
||||
return $options;
|
||||
|
@ -12,6 +12,10 @@
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
|
||||
// import the list field type
|
||||
jimport('joomla.form.helper');
|
||||
JFormHelper::loadFieldClass('list');
|
||||
@ -24,14 +28,14 @@ class JFormFieldPowers extends JFormFieldList
|
||||
/**
|
||||
* The powers field type.
|
||||
*
|
||||
* @var string
|
||||
* @var string
|
||||
*/
|
||||
public $type = 'powers';
|
||||
|
||||
/**
|
||||
* Method to get a list of options for a list input.
|
||||
*
|
||||
* @return array An array of JHtml options.
|
||||
* @return array An array of Html options.
|
||||
*/
|
||||
protected function getOptions()
|
||||
{
|
||||
|
@ -12,6 +12,10 @@
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
|
||||
// import the list field type
|
||||
jimport('joomla.form.helper');
|
||||
JFormHelper::loadFieldClass('list');
|
||||
@ -24,22 +28,22 @@ class JFormFieldPowersclassmethods extends JFormFieldList
|
||||
/**
|
||||
* The powersclassmethods field type.
|
||||
*
|
||||
* @var string
|
||||
* @var string
|
||||
*/
|
||||
public $type = 'powersclassmethods';
|
||||
|
||||
/**
|
||||
* Method to get a list of options for a list input.
|
||||
*
|
||||
* @return array An array of JHtml options.
|
||||
* @return array An array of Html options.
|
||||
*/
|
||||
protected function getOptions()
|
||||
{
|
||||
|
||||
// Get the user object.
|
||||
$user = JFactory::getUser();
|
||||
$user = Factory::getUser();
|
||||
// Get the databse object.
|
||||
$db = JFactory::getDBO();
|
||||
$db = Factory::getDBO();
|
||||
$query = $db->getQuery(true);
|
||||
$query->select($db->quoteName(array('a.id','a.name','a.visibility'),array('id','method_name','visibility')));
|
||||
$query->from($db->quoteName('#__componentbuilder_class_method', 'a'));
|
||||
@ -61,7 +65,7 @@ class JFormFieldPowersclassmethods extends JFormFieldList
|
||||
$options = array();
|
||||
if ($items)
|
||||
{
|
||||
$options[] = JHtml::_('select.option', '', 'Select a method');
|
||||
$options[] = Html::_('select.option', '', 'Select a method');
|
||||
foreach($items as $item)
|
||||
{
|
||||
// we are using this code in more then one field JCB custom_code
|
||||
@ -73,7 +77,7 @@ class JFormFieldPowersclassmethods extends JFormFieldList
|
||||
{
|
||||
$select = $item->visibility . ' $' . $item->method_name;
|
||||
}
|
||||
$options[] = JHtml::_('select.option', $item->id, $select);
|
||||
$options[] = Html::_('select.option', $item->id, $select);
|
||||
}
|
||||
}
|
||||
return $options;
|
||||
|
@ -12,6 +12,10 @@
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
|
||||
// import the list field type
|
||||
jimport('joomla.form.helper');
|
||||
JFormHelper::loadFieldClass('list');
|
||||
@ -24,22 +28,22 @@ class JFormFieldPowersclassproperties extends JFormFieldList
|
||||
/**
|
||||
* The powersclassproperties field type.
|
||||
*
|
||||
* @var string
|
||||
* @var string
|
||||
*/
|
||||
public $type = 'powersclassproperties';
|
||||
|
||||
/**
|
||||
* Method to get a list of options for a list input.
|
||||
*
|
||||
* @return array An array of JHtml options.
|
||||
* @return array An array of Html options.
|
||||
*/
|
||||
protected function getOptions()
|
||||
{
|
||||
|
||||
// Get the user object.
|
||||
$user = JFactory::getUser();
|
||||
$user = Factory::getUser();
|
||||
// Get the databse object.
|
||||
$db = JFactory::getDBO();
|
||||
$db = Factory::getDBO();
|
||||
$query = $db->getQuery(true);
|
||||
$query->select($db->quoteName(array('a.id','a.name','a.visibility'),array('id','property_name','visibility')));
|
||||
$query->from($db->quoteName('#__componentbuilder_class_property', 'a'));
|
||||
@ -61,7 +65,7 @@ class JFormFieldPowersclassproperties extends JFormFieldList
|
||||
$options = array();
|
||||
if ($items)
|
||||
{
|
||||
$options[] = JHtml::_('select.option', '', 'Select a property');
|
||||
$options[] = Html::_('select.option', '', 'Select a property');
|
||||
foreach($items as $item)
|
||||
{
|
||||
// we are using this code in more then one field JCB custom_code
|
||||
@ -73,7 +77,7 @@ class JFormFieldPowersclassproperties extends JFormFieldList
|
||||
{
|
||||
$select = $item->visibility . ' $' . $item->property_name;
|
||||
}
|
||||
$options[] = JHtml::_('select.option', $item->id, $select);
|
||||
$options[] = Html::_('select.option', $item->id, $select);
|
||||
}
|
||||
}
|
||||
return $options;
|
||||
|
@ -12,6 +12,10 @@
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
|
||||
// import the list field type
|
||||
jimport('joomla.form.helper');
|
||||
JFormHelper::loadFieldClass('list');
|
||||
@ -24,19 +28,19 @@ class JFormFieldPowersfilterapproved extends JFormFieldList
|
||||
/**
|
||||
* The powersfilterapproved field type.
|
||||
*
|
||||
* @var string
|
||||
* @var string
|
||||
*/
|
||||
public $type = 'powersfilterapproved';
|
||||
|
||||
/**
|
||||
* Method to get a list of options for a list input.
|
||||
*
|
||||
* @return array An array of JHtml options.
|
||||
* @return array An array of Html options.
|
||||
*/
|
||||
protected function getOptions()
|
||||
{
|
||||
// Get a db connection.
|
||||
$db = JFactory::getDbo();
|
||||
$db = Factory::getDbo();
|
||||
|
||||
// Create a new query object.
|
||||
$query = $db->getQuery(true);
|
||||
@ -50,8 +54,8 @@ class JFormFieldPowersfilterapproved extends JFormFieldList
|
||||
$db->setQuery($query);
|
||||
|
||||
$_results = $db->loadColumn();
|
||||
$_filter = array();
|
||||
$_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_SUPER_POWER') . ' -');
|
||||
$_filter = [];
|
||||
$_filter[] = Html::_('select.option', '', '- ' . Text::_('COM_COMPONENTBUILDER_FILTER_SELECT_SUPER_POWER') . ' -');
|
||||
|
||||
if ($_results)
|
||||
{
|
||||
@ -63,7 +67,7 @@ class JFormFieldPowersfilterapproved extends JFormFieldList
|
||||
// Translate the approved selection
|
||||
$_text = $_model->selectionTranslation($approved,'approved');
|
||||
// Now add the approved and its text to the options array
|
||||
$_filter[] = JHtml::_('select.option', $approved, JText::_($_text));
|
||||
$_filter[] = Html::_('select.option', $approved, Text::_($_text));
|
||||
}
|
||||
}
|
||||
return $_filter;
|
||||
|
@ -12,6 +12,10 @@
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
|
||||
// import the list field type
|
||||
jimport('joomla.form.helper');
|
||||
JFormHelper::loadFieldClass('list');
|
||||
@ -24,19 +28,19 @@ class JFormFieldPowersfiltertype extends JFormFieldList
|
||||
/**
|
||||
* The powersfiltertype field type.
|
||||
*
|
||||
* @var string
|
||||
* @var string
|
||||
*/
|
||||
public $type = 'powersfiltertype';
|
||||
|
||||
/**
|
||||
* Method to get a list of options for a list input.
|
||||
*
|
||||
* @return array An array of JHtml options.
|
||||
* @return array An array of Html options.
|
||||
*/
|
||||
protected function getOptions()
|
||||
{
|
||||
// Get a db connection.
|
||||
$db = JFactory::getDbo();
|
||||
$db = Factory::getDbo();
|
||||
|
||||
// Create a new query object.
|
||||
$query = $db->getQuery(true);
|
||||
@ -50,7 +54,7 @@ class JFormFieldPowersfiltertype extends JFormFieldList
|
||||
$db->setQuery($query);
|
||||
|
||||
$_results = $db->loadColumn();
|
||||
$_filter = array();
|
||||
$_filter = [];
|
||||
|
||||
if ($_results)
|
||||
{
|
||||
@ -62,7 +66,7 @@ class JFormFieldPowersfiltertype extends JFormFieldList
|
||||
// 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));
|
||||
$_filter[] = Html::_('select.option', $type, Text::_($_text));
|
||||
}
|
||||
}
|
||||
return $_filter;
|
||||
|
@ -12,6 +12,10 @@
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
|
||||
// import the list field type
|
||||
jimport('joomla.form.helper');
|
||||
JFormHelper::loadFieldClass('list');
|
||||
@ -24,7 +28,7 @@ class JFormFieldServers extends JFormFieldList
|
||||
/**
|
||||
* The servers field type.
|
||||
*
|
||||
* @var string
|
||||
* @var string
|
||||
*/
|
||||
public $type = 'servers';
|
||||
|
||||
@ -48,7 +52,7 @@ class JFormFieldServers extends JFormFieldList
|
||||
$script = array();
|
||||
$button_code_name = $this->getAttribute('name');
|
||||
// get the input from url
|
||||
$app = JFactory::getApplication();
|
||||
$app = Factory::getApplication();
|
||||
$jinput = $app->input;
|
||||
// get the view name & id
|
||||
$values = $jinput->getArray(array(
|
||||
@ -64,7 +68,7 @@ class JFormFieldServers extends JFormFieldList
|
||||
$ref = '&ref=' . $values['view'] . '&refid=' . $values['id'];
|
||||
$refJ = '&ref=' . $values['view'] . '&refid=' . $values['id'];
|
||||
// get the return value.
|
||||
$_uri = (string) JUri::getInstance();
|
||||
$_uri = (string) \Joomla\CMS\Uri\Uri::getInstance();
|
||||
$_return = urlencode(base64_encode($_uri));
|
||||
// load return value.
|
||||
$ref .= '&return=' . $_return;
|
||||
@ -77,20 +81,20 @@ class JFormFieldServers extends JFormFieldList
|
||||
$button_label = preg_replace("/[^A-Za-z ]/", '', $button_label);
|
||||
$button_label = ucfirst(strtolower($button_label));
|
||||
// get user object
|
||||
$user = JFactory::getUser();
|
||||
$user = Factory::getUser();
|
||||
// only add if user allowed to create server
|
||||
if ($user->authorise('server.create', 'com_componentbuilder') && $app->isAdmin()) // TODO for now only in admin area.
|
||||
if ($user->authorise('server.create', 'com_componentbuilder') && $app->isClient('administrator')) // TODO for now only in admin area.
|
||||
{
|
||||
// build Create button
|
||||
$button[] = '<a id="'.$button_code_name.'Create" class="btn btn-small btn-success hasTooltip" title="'.JText::sprintf('COM_COMPONENTBUILDER_CREATE_NEW_S', $button_label).'" style="border-radius: 0px 4px 4px 0px; padding: 4px 4px 4px 7px;"
|
||||
$button[] = '<a id="'.$button_code_name.'Create" class="btn btn-small btn-success hasTooltip" title="'.Text::sprintf('COM_COMPONENTBUILDER_CREATE_NEW_S', $button_label).'" style="border-radius: 0px 4px 4px 0px; padding: 4px 4px 4px 7px;"
|
||||
href="index.php?option=com_componentbuilder&view=server&layout=edit'.$ref.'" >
|
||||
<span class="icon-new icon-white"></span></a>';
|
||||
}
|
||||
// only add if user allowed to edit server
|
||||
if ($user->authorise('server.edit', 'com_componentbuilder') && $app->isAdmin()) // TODO for now only in admin area.
|
||||
if ($user->authorise('server.edit', 'com_componentbuilder') && $app->isClient('administrator')) // TODO for now only in admin area.
|
||||
{
|
||||
// build edit button
|
||||
$button[] = '<a id="'.$button_code_name.'Edit" class="btn btn-small hasTooltip" title="'.JText::sprintf('COM_COMPONENTBUILDER_EDIT_S', $button_label).'" style="display: none; padding: 4px 4px 4px 7px;" href="#" >
|
||||
$button[] = '<a id="'.$button_code_name.'Edit" class="btn btn-small hasTooltip" title="'.Text::sprintf('COM_COMPONENTBUILDER_EDIT_S', $button_label).'" style="display: none; padding: 4px 4px 4px 7px;" href="#" >
|
||||
<span class="icon-edit"></span></a>';
|
||||
// build script
|
||||
$script[] = "
|
||||
@ -123,7 +127,7 @@ class JFormFieldServers extends JFormFieldList
|
||||
if (is_array($button) && count($button) > 0)
|
||||
{
|
||||
// Load the needed script.
|
||||
$document = JFactory::getDocument();
|
||||
$document = Factory::getDocument();
|
||||
$document->addScriptDeclaration(implode(' ',$script));
|
||||
// return the button attached to input field.
|
||||
return '<div class="input-append">' .$html . implode('',$button).'</div>';
|
||||
@ -135,7 +139,7 @@ class JFormFieldServers extends JFormFieldList
|
||||
/**
|
||||
* Method to get a list of options for a list input.
|
||||
*
|
||||
* @return array An array of JHtml options.
|
||||
* @return array An array of Html options.
|
||||
*/
|
||||
protected function getOptions()
|
||||
{
|
||||
|
@ -12,6 +12,10 @@
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
|
||||
// import the list field type
|
||||
jimport('joomla.form.helper');
|
||||
JFormHelper::loadFieldClass('list');
|
||||
@ -24,19 +28,19 @@ class JFormFieldServersfiltername extends JFormFieldList
|
||||
/**
|
||||
* The serversfiltername field type.
|
||||
*
|
||||
* @var string
|
||||
* @var string
|
||||
*/
|
||||
public $type = 'serversfiltername';
|
||||
|
||||
/**
|
||||
* Method to get a list of options for a list input.
|
||||
*
|
||||
* @return array An array of JHtml options.
|
||||
* @return array An array of Html options.
|
||||
*/
|
||||
protected function getOptions()
|
||||
{
|
||||
// Get a db connection.
|
||||
$db = JFactory::getDbo();
|
||||
$db = Factory::getDbo();
|
||||
|
||||
// Create a new query object.
|
||||
$query = $db->getQuery(true);
|
||||
@ -50,8 +54,8 @@ class JFormFieldServersfiltername extends JFormFieldList
|
||||
$db->setQuery($query);
|
||||
|
||||
$_results = $db->loadColumn();
|
||||
$_filter = array();
|
||||
$_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_NAME') . ' -');
|
||||
$_filter = [];
|
||||
$_filter[] = Html::_('select.option', '', '- ' . Text::_('COM_COMPONENTBUILDER_FILTER_SELECT_NAME') . ' -');
|
||||
|
||||
if ($_results)
|
||||
{
|
||||
@ -59,7 +63,7 @@ class JFormFieldServersfiltername extends JFormFieldList
|
||||
foreach ($_results as $name)
|
||||
{
|
||||
// Now add the name and its text to the options array
|
||||
$_filter[] = JHtml::_('select.option', $name, $name);
|
||||
$_filter[] = Html::_('select.option', $name, $name);
|
||||
}
|
||||
}
|
||||
return $_filter;
|
||||
|
@ -12,6 +12,10 @@
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
|
||||
// import the list field type
|
||||
jimport('joomla.form.helper');
|
||||
JFormHelper::loadFieldClass('list');
|
||||
@ -24,19 +28,19 @@ class JFormFieldServersfilterprotocol extends JFormFieldList
|
||||
/**
|
||||
* The serversfilterprotocol field type.
|
||||
*
|
||||
* @var string
|
||||
* @var string
|
||||
*/
|
||||
public $type = 'serversfilterprotocol';
|
||||
|
||||
/**
|
||||
* Method to get a list of options for a list input.
|
||||
*
|
||||
* @return array An array of JHtml options.
|
||||
* @return array An array of Html options.
|
||||
*/
|
||||
protected function getOptions()
|
||||
{
|
||||
// Get a db connection.
|
||||
$db = JFactory::getDbo();
|
||||
$db = Factory::getDbo();
|
||||
|
||||
// Create a new query object.
|
||||
$query = $db->getQuery(true);
|
||||
@ -50,8 +54,8 @@ class JFormFieldServersfilterprotocol extends JFormFieldList
|
||||
$db->setQuery($query);
|
||||
|
||||
$_results = $db->loadColumn();
|
||||
$_filter = array();
|
||||
$_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_PROTOCOL') . ' -');
|
||||
$_filter = [];
|
||||
$_filter[] = Html::_('select.option', '', '- ' . Text::_('COM_COMPONENTBUILDER_FILTER_SELECT_PROTOCOL') . ' -');
|
||||
|
||||
if ($_results)
|
||||
{
|
||||
@ -63,7 +67,7 @@ class JFormFieldServersfilterprotocol extends JFormFieldList
|
||||
// Translate the protocol selection
|
||||
$_text = $_model->selectionTranslation($protocol,'protocol');
|
||||
// Now add the protocol and its text to the options array
|
||||
$_filter[] = JHtml::_('select.option', $protocol, JText::_($_text));
|
||||
$_filter[] = Html::_('select.option', $protocol, Text::_($_text));
|
||||
}
|
||||
}
|
||||
return $_filter;
|
||||
|
@ -12,6 +12,11 @@
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
use VDM\Joomla\Utilities\StringHelper;
|
||||
|
||||
// import the list field type
|
||||
jimport('joomla.form.helper');
|
||||
JFormHelper::loadFieldClass('list');
|
||||
@ -24,33 +29,36 @@ class JFormFieldSiteviewfolderlist extends JFormFieldList
|
||||
/**
|
||||
* The siteviewfolderlist field type.
|
||||
*
|
||||
* @var string
|
||||
* @var string
|
||||
*/
|
||||
public $type = 'siteviewfolderlist';
|
||||
|
||||
/**
|
||||
* Method to get a list of options for a list input.
|
||||
*
|
||||
* @return array An array of JHtml options.
|
||||
* @return array An array of Html options.
|
||||
*/
|
||||
protected function getOptions()
|
||||
{
|
||||
// get custom folder files
|
||||
$localfolder = JPATH_COMPONENT_SITE.'/views';
|
||||
$localfolders = [];
|
||||
$localfolders[] = JPATH_SITE . '/components/com_componentbuilder/views';
|
||||
$localfolders[] = JPATH_SITE . '/components/com_componentbuilder/src/View';
|
||||
// set the default
|
||||
$options = array();
|
||||
// import all needed classes
|
||||
jimport('joomla.filesystem.folder');
|
||||
$options = [];
|
||||
// now check if there are files in the folder
|
||||
if (JFolder::exists($localfolder) && $folders = JFolder::folders($localfolder))
|
||||
foreach ($localfolders as $localfolder)
|
||||
{
|
||||
if ($this->multiple === false)
|
||||
if (is_dir($localfolder) && $folders = \Joomla\Filesystem\Folder::folders($localfolder))
|
||||
{
|
||||
$options[] = JHtml::_('select.option', '', JText::_('COM_COMPONENTBUILDER_SELECT_A_SITE_VIEW'));
|
||||
}
|
||||
foreach ($folders as $folder)
|
||||
{
|
||||
$options[] = JHtml::_('select.option', $folder, ComponentbuilderHelper::safeString($folder, 'W'));
|
||||
if ($this->multiple === false)
|
||||
{
|
||||
$options[] = Html::_('select.option', '', Text::_('COM_COMPONENTBUILDER_SELECT_A_SITE_VIEW'));
|
||||
}
|
||||
foreach ($folders as $folder)
|
||||
{
|
||||
$options[] = Html::_('select.option', $folder, StringHelper::safe($folder, 'W'));
|
||||
}
|
||||
}
|
||||
}
|
||||
return $options;
|
||||
|
@ -12,6 +12,10 @@
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
|
||||
// import the list field type
|
||||
jimport('joomla.form.helper');
|
||||
JFormHelper::loadFieldClass('list');
|
||||
@ -24,34 +28,38 @@ class JFormFieldSiteviews extends JFormFieldList
|
||||
/**
|
||||
* The siteviews field type.
|
||||
*
|
||||
* @var string
|
||||
* @var string
|
||||
*/
|
||||
public $type = 'siteviews';
|
||||
|
||||
/**
|
||||
* Method to get a list of options for a list input.
|
||||
*
|
||||
* @return array An array of JHtml options.
|
||||
* @return array An array of Html options.
|
||||
*/
|
||||
protected function getOptions()
|
||||
{
|
||||
$db = JFactory::getDBO();
|
||||
$query = $db->getQuery(true);
|
||||
$query->select($db->quoteName(array('a.id','a.system_name'),array('id','siteview_system_name')));
|
||||
$query->from($db->quoteName('#__componentbuilder_site_view', 'a'));
|
||||
$query->where($db->quoteName('a.published') . ' >= 1');
|
||||
$query->order('a.system_name ASC');
|
||||
$db->setQuery((string)$query);
|
||||
$items = $db->loadObjectList();
|
||||
$options = array();
|
||||
if ($items)
|
||||
{
|
||||
$options[] = JHtml::_('select.option', '', 'Select an option');
|
||||
foreach($items as $item)
|
||||
{
|
||||
$options[] = JHtml::_('select.option', $item->id, $item->siteview_system_name);
|
||||
}
|
||||
}
|
||||
// Get the database object.
|
||||
$db = Factory::getDBO();
|
||||
$query = $db->getQuery(true);
|
||||
$query->select($db->quoteName(array('a.id','a.system_name'),array('id','siteview_system_name')));
|
||||
$query->from($db->quoteName('#__componentbuilder_site_view', 'a'));
|
||||
$query->where($db->quoteName('a.published') . ' >= 1');
|
||||
$query->order('a.system_name ASC');
|
||||
$db->setQuery((string)$query);
|
||||
$items = $db->loadObjectList();
|
||||
$options = [];
|
||||
if ($items)
|
||||
{
|
||||
if ($this->multiple === false)
|
||||
{
|
||||
$options[] = Html::_('select.option', '', Text::_('COM_COMPONENTBUILDER_SELECT_AN_OPTION'));
|
||||
}
|
||||
foreach($items as $item)
|
||||
{
|
||||
$options[] = Html::_('select.option', $item->id, $item->siteview_system_name);
|
||||
}
|
||||
}
|
||||
return $options;
|
||||
}
|
||||
}
|
||||
|
@ -12,6 +12,10 @@
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
|
||||
// import the list field type
|
||||
jimport('joomla.form.helper');
|
||||
JFormHelper::loadFieldClass('list');
|
||||
@ -24,19 +28,19 @@ class JFormFieldSiteviewsfilteraddcustombutton extends JFormFieldList
|
||||
/**
|
||||
* The siteviewsfilteraddcustombutton field type.
|
||||
*
|
||||
* @var string
|
||||
* @var string
|
||||
*/
|
||||
public $type = 'siteviewsfilteraddcustombutton';
|
||||
|
||||
/**
|
||||
* Method to get a list of options for a list input.
|
||||
*
|
||||
* @return array An array of JHtml options.
|
||||
* @return array An array of Html options.
|
||||
*/
|
||||
protected function getOptions()
|
||||
{
|
||||
// Get a db connection.
|
||||
$db = JFactory::getDbo();
|
||||
$db = Factory::getDbo();
|
||||
|
||||
// Create a new query object.
|
||||
$query = $db->getQuery(true);
|
||||
@ -50,8 +54,8 @@ class JFormFieldSiteviewsfilteraddcustombutton extends JFormFieldList
|
||||
$db->setQuery($query);
|
||||
|
||||
$_results = $db->loadColumn();
|
||||
$_filter = array();
|
||||
$_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_ADD_CUSTOM_BUTTONS') . ' -');
|
||||
$_filter = [];
|
||||
$_filter[] = Html::_('select.option', '', '- ' . Text::_('COM_COMPONENTBUILDER_FILTER_SELECT_ADD_CUSTOM_BUTTONS') . ' -');
|
||||
|
||||
if ($_results)
|
||||
{
|
||||
@ -63,7 +67,7 @@ class JFormFieldSiteviewsfilteraddcustombutton extends JFormFieldList
|
||||
// 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));
|
||||
$_filter[] = Html::_('select.option', $add_custom_button, Text::_($_text));
|
||||
}
|
||||
}
|
||||
return $_filter;
|
||||
|
@ -12,6 +12,10 @@
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
|
||||
// import the list field type
|
||||
jimport('joomla.form.helper');
|
||||
JFormHelper::loadFieldClass('list');
|
||||
@ -24,19 +28,19 @@ class JFormFieldSiteviewsfilteraddphpajax extends JFormFieldList
|
||||
/**
|
||||
* The siteviewsfilteraddphpajax field type.
|
||||
*
|
||||
* @var string
|
||||
* @var string
|
||||
*/
|
||||
public $type = 'siteviewsfilteraddphpajax';
|
||||
|
||||
/**
|
||||
* Method to get a list of options for a list input.
|
||||
*
|
||||
* @return array An array of JHtml options.
|
||||
* @return array An array of Html options.
|
||||
*/
|
||||
protected function getOptions()
|
||||
{
|
||||
// Get a db connection.
|
||||
$db = JFactory::getDbo();
|
||||
$db = Factory::getDbo();
|
||||
|
||||
// Create a new query object.
|
||||
$query = $db->getQuery(true);
|
||||
@ -50,8 +54,8 @@ class JFormFieldSiteviewsfilteraddphpajax extends JFormFieldList
|
||||
$db->setQuery($query);
|
||||
|
||||
$_results = $db->loadColumn();
|
||||
$_filter = array();
|
||||
$_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_ADD_PHP_AJAX') . ' -');
|
||||
$_filter = [];
|
||||
$_filter[] = Html::_('select.option', '', '- ' . Text::_('COM_COMPONENTBUILDER_FILTER_SELECT_ADD_PHP_AJAX') . ' -');
|
||||
|
||||
if ($_results)
|
||||
{
|
||||
@ -63,7 +67,7 @@ class JFormFieldSiteviewsfilteraddphpajax extends JFormFieldList
|
||||
// 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));
|
||||
$_filter[] = Html::_('select.option', $add_php_ajax, Text::_($_text));
|
||||
}
|
||||
}
|
||||
return $_filter;
|
||||
|
@ -12,6 +12,10 @@
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
|
||||
// import the list field type
|
||||
jimport('joomla.form.helper');
|
||||
JFormHelper::loadFieldClass('list');
|
||||
@ -24,7 +28,7 @@ class JFormFieldSnippets extends JFormFieldList
|
||||
/**
|
||||
* The snippets field type.
|
||||
*
|
||||
* @var string
|
||||
* @var string
|
||||
*/
|
||||
public $type = 'snippets';
|
||||
|
||||
@ -48,7 +52,7 @@ class JFormFieldSnippets extends JFormFieldList
|
||||
$script = array();
|
||||
$button_code_name = $this->getAttribute('name');
|
||||
// get the input from url
|
||||
$app = JFactory::getApplication();
|
||||
$app = Factory::getApplication();
|
||||
$jinput = $app->input;
|
||||
// get the view name & id
|
||||
$values = $jinput->getArray(array(
|
||||
@ -64,7 +68,7 @@ class JFormFieldSnippets extends JFormFieldList
|
||||
$ref = '&ref=' . $values['view'] . '&refid=' . $values['id'];
|
||||
$refJ = '&ref=' . $values['view'] . '&refid=' . $values['id'];
|
||||
// get the return value.
|
||||
$_uri = (string) JUri::getInstance();
|
||||
$_uri = (string) \Joomla\CMS\Uri\Uri::getInstance();
|
||||
$_return = urlencode(base64_encode($_uri));
|
||||
// load return value.
|
||||
$ref .= '&return=' . $_return;
|
||||
@ -77,20 +81,20 @@ class JFormFieldSnippets extends JFormFieldList
|
||||
$button_label = preg_replace("/[^A-Za-z ]/", '', $button_label);
|
||||
$button_label = ucfirst(strtolower($button_label));
|
||||
// get user object
|
||||
$user = JFactory::getUser();
|
||||
$user = Factory::getUser();
|
||||
// only add if user allowed to create snippet
|
||||
if ($user->authorise('core.create', 'com_componentbuilder') && $app->isAdmin()) // TODO for now only in admin area.
|
||||
if ($user->authorise('core.create', 'com_componentbuilder') && $app->isClient('administrator')) // TODO for now only in admin area.
|
||||
{
|
||||
// build Create button
|
||||
$button[] = '<a id="'.$button_code_name.'Create" class="btn btn-small btn-success hasTooltip" title="'.JText::sprintf('COM_COMPONENTBUILDER_CREATE_NEW_S', $button_label).'" style="border-radius: 0px 4px 4px 0px; padding: 4px 4px 4px 7px;"
|
||||
$button[] = '<a id="'.$button_code_name.'Create" class="btn btn-small btn-success hasTooltip" title="'.Text::sprintf('COM_COMPONENTBUILDER_CREATE_NEW_S', $button_label).'" style="border-radius: 0px 4px 4px 0px; padding: 4px 4px 4px 7px;"
|
||||
href="index.php?option=com_componentbuilder&view=snippet&layout=edit'.$ref.'" >
|
||||
<span class="icon-new icon-white"></span></a>';
|
||||
}
|
||||
// only add if user allowed to edit snippet
|
||||
if ($user->authorise('core.edit', 'com_componentbuilder') && $app->isAdmin()) // TODO for now only in admin area.
|
||||
if ($user->authorise('core.edit', 'com_componentbuilder') && $app->isClient('administrator')) // TODO for now only in admin area.
|
||||
{
|
||||
// build edit button
|
||||
$button[] = '<a id="'.$button_code_name.'Edit" class="btn btn-small hasTooltip" title="'.JText::sprintf('COM_COMPONENTBUILDER_EDIT_S', $button_label).'" style="display: none; padding: 4px 4px 4px 7px;" href="#" >
|
||||
$button[] = '<a id="'.$button_code_name.'Edit" class="btn btn-small hasTooltip" title="'.Text::sprintf('COM_COMPONENTBUILDER_EDIT_S', $button_label).'" style="display: none; padding: 4px 4px 4px 7px;" href="#" >
|
||||
<span class="icon-edit"></span></a>';
|
||||
// build script
|
||||
$script[] = "
|
||||
@ -123,7 +127,7 @@ class JFormFieldSnippets extends JFormFieldList
|
||||
if (is_array($button) && count($button) > 0)
|
||||
{
|
||||
// Load the needed script.
|
||||
$document = JFactory::getDocument();
|
||||
$document = Factory::getDocument();
|
||||
$document->addScriptDeclaration(implode(' ',$script));
|
||||
// return the button attached to input field.
|
||||
return '<div class="input-append">' .$html . implode('',$button).'</div>';
|
||||
@ -135,7 +139,7 @@ class JFormFieldSnippets extends JFormFieldList
|
||||
/**
|
||||
* Method to get a list of options for a list input.
|
||||
*
|
||||
* @return array An array of JHtml options.
|
||||
* @return array An array of Html options.
|
||||
*/
|
||||
protected function getOptions()
|
||||
{
|
||||
|
@ -12,6 +12,10 @@
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
|
||||
// import the list field type
|
||||
jimport('joomla.form.helper');
|
||||
JFormHelper::loadFieldClass('list');
|
||||
@ -24,14 +28,14 @@ class JFormFieldSnippettype extends JFormFieldList
|
||||
/**
|
||||
* The snippettype field type.
|
||||
*
|
||||
* @var string
|
||||
* @var string
|
||||
*/
|
||||
public $type = 'snippettype';
|
||||
|
||||
/**
|
||||
* Method to get a list of options for a list input.
|
||||
*
|
||||
* @return array An array of JHtml options.
|
||||
* @return array An array of Html options.
|
||||
*/
|
||||
protected function getOptions()
|
||||
{
|
||||
|
@ -12,8 +12,11 @@
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
// Import the checkboxes field type classes needed
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
jimport('joomla.form.helper');
|
||||
JFormHelper::loadFieldClass('checkboxes');
|
||||
JFormHelper::loadFieldClass('checkboxes');
|
||||
use VDM\Joomla\Utilities\Component\Helper;
|
||||
|
||||
@ -25,12 +28,11 @@ class JFormFieldSuperpowerpaths extends JFormFieldCheckboxes
|
||||
/**
|
||||
* The superpowerpaths field type.
|
||||
*
|
||||
* @var string
|
||||
* @var string
|
||||
*/
|
||||
public $type = 'superpowerpaths';
|
||||
|
||||
// A DynamicCheckboxes@ Field
|
||||
|
||||
/**
|
||||
* Method to get the data to be passed to the layout for rendering.
|
||||
*
|
||||
|
@ -12,6 +12,10 @@
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
|
||||
// import the list field type
|
||||
jimport('joomla.form.helper');
|
||||
JFormHelper::loadFieldClass('list');
|
||||
@ -24,14 +28,14 @@ class JFormFieldTargetfields extends JFormFieldList
|
||||
/**
|
||||
* The targetfields field type.
|
||||
*
|
||||
* @var string
|
||||
* @var string
|
||||
*/
|
||||
public $type = 'targetfields';
|
||||
|
||||
/**
|
||||
* Method to get a list of options for a list input.
|
||||
*
|
||||
* @return array An array of JHtml options.
|
||||
* @return array An array of Html options.
|
||||
*/
|
||||
protected function getOptions()
|
||||
{
|
||||
|
@ -12,6 +12,10 @@
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
|
||||
// import the list field type
|
||||
jimport('joomla.form.helper');
|
||||
JFormHelper::loadFieldClass('list');
|
||||
@ -24,19 +28,19 @@ class JFormFieldTemplatesfilteraddphpview extends JFormFieldList
|
||||
/**
|
||||
* The templatesfilteraddphpview field type.
|
||||
*
|
||||
* @var string
|
||||
* @var string
|
||||
*/
|
||||
public $type = 'templatesfilteraddphpview';
|
||||
|
||||
/**
|
||||
* Method to get a list of options for a list input.
|
||||
*
|
||||
* @return array An array of JHtml options.
|
||||
* @return array An array of Html options.
|
||||
*/
|
||||
protected function getOptions()
|
||||
{
|
||||
// Get a db connection.
|
||||
$db = JFactory::getDbo();
|
||||
$db = Factory::getDbo();
|
||||
|
||||
// Create a new query object.
|
||||
$query = $db->getQuery(true);
|
||||
@ -50,8 +54,8 @@ class JFormFieldTemplatesfilteraddphpview extends JFormFieldList
|
||||
$db->setQuery($query);
|
||||
|
||||
$_results = $db->loadColumn();
|
||||
$_filter = array();
|
||||
$_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_ADD_PHP_CUSTOM_VIEW_SCRIPT') . ' -');
|
||||
$_filter = [];
|
||||
$_filter[] = Html::_('select.option', '', '- ' . Text::_('COM_COMPONENTBUILDER_FILTER_SELECT_ADD_PHP_CUSTOM_VIEW_SCRIPT') . ' -');
|
||||
|
||||
if ($_results)
|
||||
{
|
||||
@ -63,7 +67,7 @@ class JFormFieldTemplatesfilteraddphpview extends JFormFieldList
|
||||
// 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));
|
||||
$_filter[] = Html::_('select.option', $add_php_view, Text::_($_text));
|
||||
}
|
||||
}
|
||||
return $_filter;
|
||||
|
@ -12,6 +12,10 @@
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
|
||||
// import the list field type
|
||||
jimport('joomla.form.helper');
|
||||
JFormHelper::loadFieldClass('list');
|
||||
@ -24,14 +28,14 @@ class JFormFieldViewtabs extends JFormFieldList
|
||||
/**
|
||||
* The viewtabs field type.
|
||||
*
|
||||
* @var string
|
||||
* @var string
|
||||
*/
|
||||
public $type = 'viewtabs';
|
||||
|
||||
/**
|
||||
* Method to get a list of options for a list input.
|
||||
*
|
||||
* @return array An array of JHtml options.
|
||||
* @return array An array of Html options.
|
||||
*/
|
||||
protected function getOptions()
|
||||
{
|
||||
|
Reference in New Issue
Block a user