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:
@ -13,6 +13,9 @@
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\Component\ComponentHelper;
|
||||
use VDM\Joomla\Utilities\StringHelper;
|
||||
use VDM\Joomla\Utilities\JsonHelper;
|
||||
use VDM\Joomla\Utilities\ArrayHelper;
|
||||
@ -105,7 +108,7 @@ class Get
|
||||
* @var array
|
||||
* @deprecated 3.3 Use CFactory::_('Component.Placeholder')->get();
|
||||
*/
|
||||
public $globalPlaceholders = array();
|
||||
public $globalPlaceholders = [];
|
||||
|
||||
/**
|
||||
* The placeholders
|
||||
@ -113,7 +116,7 @@ class Get
|
||||
* @var array
|
||||
* @deprecated 3.3 Use CFactory::_('Placeholder')->active[];
|
||||
*/
|
||||
public $placeholders = array();
|
||||
public $placeholders = [];
|
||||
|
||||
/**
|
||||
* The Compiler Path
|
||||
@ -208,7 +211,7 @@ class Get
|
||||
* @var array
|
||||
* @deprecated 3.3 Use CFactory::_('Power')->active;
|
||||
*/
|
||||
public $powers = array();
|
||||
public $powers = [];
|
||||
|
||||
/**
|
||||
* The state of all Powers
|
||||
@ -216,14 +219,14 @@ class Get
|
||||
* @var array
|
||||
* @deprecated 3.3
|
||||
*/
|
||||
public $statePowers = array();
|
||||
public $statePowers = [];
|
||||
|
||||
/**
|
||||
* The linked Powers
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
public $linkedPowers = array();
|
||||
public $linkedPowers = [];
|
||||
|
||||
/**
|
||||
* The Plugins data
|
||||
@ -231,7 +234,7 @@ class Get
|
||||
* @var array
|
||||
* @deprecated 3.3 Use CFactory::_('Joomlaplugin.Data')->get();
|
||||
*/
|
||||
public $joomlaPlugins = array();
|
||||
public $joomlaPlugins = [];
|
||||
|
||||
/**
|
||||
* The Modules data
|
||||
@ -239,7 +242,7 @@ class Get
|
||||
* @var array
|
||||
* @deprecated 3.3 Use CFactory::_('Joomlamodule.Data')->get();
|
||||
*/
|
||||
public $joomlaModules = array();
|
||||
public $joomlaModules = [];
|
||||
|
||||
/**
|
||||
* The custom script placeholders - we use the (xxx) to avoid detection it should be (***)
|
||||
@ -297,7 +300,7 @@ class Get
|
||||
* @var array
|
||||
* @deprecated 3.3
|
||||
*/
|
||||
protected $customCodeData = array();
|
||||
protected $customCodeData = [];
|
||||
|
||||
/**
|
||||
* The function name memory ids
|
||||
@ -305,7 +308,7 @@ class Get
|
||||
* @var array
|
||||
* @deprecated 3.3 Use CFactory::_('Customcode')->functionNameMemory
|
||||
*/
|
||||
public $functionNameMemory = array();
|
||||
public $functionNameMemory = [];
|
||||
|
||||
/**
|
||||
* The custom code for local memory
|
||||
@ -313,7 +316,7 @@ class Get
|
||||
* @var array
|
||||
* @deprecated 3.3 Use CFactory::_('Customcode')->memory
|
||||
*/
|
||||
public $customCodeMemory = array();
|
||||
public $customCodeMemory = [];
|
||||
|
||||
/**
|
||||
* The custom code in local files that already exist in system
|
||||
@ -321,7 +324,7 @@ class Get
|
||||
* @var array
|
||||
* @deprecated 3.3
|
||||
*/
|
||||
protected $existingCustomCode = array();
|
||||
protected $existingCustomCode = [];
|
||||
|
||||
/**
|
||||
* The custom code in local files this are new
|
||||
@ -329,7 +332,7 @@ class Get
|
||||
* @var array
|
||||
* @deprecated 3.3
|
||||
*/
|
||||
protected $newCustomCode = array();
|
||||
protected $newCustomCode = [];
|
||||
|
||||
/**
|
||||
* The index of code already loaded
|
||||
@ -337,7 +340,7 @@ class Get
|
||||
* @var array
|
||||
* @deprecated 3.3
|
||||
*/
|
||||
protected $codeAreadyDone = array();
|
||||
protected $codeAreadyDone = [];
|
||||
|
||||
/**
|
||||
* The external code/string to be added
|
||||
@ -345,7 +348,7 @@ class Get
|
||||
* @var array
|
||||
* @deprecated 3.3
|
||||
*/
|
||||
protected $externalCodeString = array();
|
||||
protected $externalCodeString = [];
|
||||
|
||||
/**
|
||||
* The external code/string cutter
|
||||
@ -353,7 +356,7 @@ class Get
|
||||
* @var array
|
||||
* @deprecated 3.3
|
||||
*/
|
||||
protected $externalCodeCutter = array();
|
||||
protected $externalCodeCutter = [];
|
||||
|
||||
/*
|
||||
* The line numbers Switch
|
||||
@ -366,7 +369,8 @@ class Get
|
||||
/*
|
||||
* The percentage when a language should be added
|
||||
*
|
||||
* @var boolean
|
||||
* @var int
|
||||
* @deprecated 3.3 Use CFactory::_('Config')->percentage_language_add
|
||||
*/
|
||||
public $percentageLanguageAdd = 0;
|
||||
|
||||
@ -384,7 +388,7 @@ class Get
|
||||
* @var array
|
||||
* @deprecated 3.3
|
||||
*/
|
||||
public $langContent = array();
|
||||
public $langContent = [];
|
||||
|
||||
/**
|
||||
* The Languages bucket
|
||||
@ -408,21 +412,21 @@ class Get
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
public $multiLangString = array();
|
||||
public $multiLangString = [];
|
||||
|
||||
/**
|
||||
* The new lang to add
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $newLangStrings = array();
|
||||
protected $newLangStrings = [];
|
||||
|
||||
/**
|
||||
* The existing lang to update
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $existingLangStrings = array();
|
||||
protected $existingLangStrings = [];
|
||||
|
||||
/**
|
||||
* The Language JS matching check
|
||||
@ -430,7 +434,7 @@ class Get
|
||||
* @var array
|
||||
* @deprecated 3.3 Use CFactory::_('Language.Extractor')->langMismatch;
|
||||
*/
|
||||
public $langMismatch = array();
|
||||
public $langMismatch = [];
|
||||
|
||||
/**
|
||||
* The Language SC matching check
|
||||
@ -438,7 +442,7 @@ class Get
|
||||
* @var array
|
||||
* @deprecated 3.3 Use CFactory::_('Language.Extractor')->langMatch;
|
||||
*/
|
||||
public $langMatch = array();
|
||||
public $langMatch = [];
|
||||
|
||||
/**
|
||||
* The Language string targets
|
||||
@ -523,7 +527,7 @@ class Get
|
||||
* @var array
|
||||
* @deprecated 3.3 Use CFactory::_('Compiler.Builder.Uikit.Comp')->get($key);
|
||||
*/
|
||||
public $uikitComp = array();
|
||||
public $uikitComp = [];
|
||||
|
||||
/**
|
||||
* The FOOTABLE Switch
|
||||
@ -570,14 +574,14 @@ class Get
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
public $eximportView = array();
|
||||
public $eximportView = [];
|
||||
|
||||
/**
|
||||
* The Import & Export Custom Script
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
public $importCustomScripts = array();
|
||||
public $importCustomScripts = [];
|
||||
|
||||
/**
|
||||
* The Tag & History Switch
|
||||
@ -609,7 +613,7 @@ class Get
|
||||
* @var array
|
||||
* @deprecated 3.3 Use CFactory::_('Compiler.Builder.Admin.Filter.Type')->get($key);
|
||||
*/
|
||||
public $adminFilterType = array();
|
||||
public $adminFilterType = [];
|
||||
|
||||
/**
|
||||
* The Language target
|
||||
@ -625,7 +629,7 @@ class Get
|
||||
* @var array
|
||||
* @deprecated 3.3 Use CFactory::_('Language.Extractor')->langKeys;
|
||||
*/
|
||||
public $langKeys = array();
|
||||
public $langKeys = [];
|
||||
|
||||
/**
|
||||
* The Build target Switch
|
||||
@ -641,7 +645,7 @@ class Get
|
||||
* @var array
|
||||
* @deprecated 3.3
|
||||
*/
|
||||
public $uniquecodes = array();
|
||||
public $uniquecodes = [];
|
||||
|
||||
/**
|
||||
* The unique keys
|
||||
@ -649,7 +653,7 @@ class Get
|
||||
* @var array
|
||||
* @deprecated 3.3
|
||||
*/
|
||||
public $uniquekeys = array();
|
||||
public $uniquekeys = [];
|
||||
|
||||
/**
|
||||
* The Add contributors Switch
|
||||
@ -665,7 +669,7 @@ class Get
|
||||
* @var array
|
||||
* @deprecated 3.3 Use CFactory::_('Customcode.Dispenser')->hub;
|
||||
*/
|
||||
public $customScriptBuilder = array();
|
||||
public $customScriptBuilder = [];
|
||||
|
||||
/**
|
||||
* The Footable Script Builder
|
||||
@ -697,7 +701,7 @@ class Get
|
||||
* @var array
|
||||
* @deprecated 3.3 Use CFactory::_('Registry')->get('validation.rules');
|
||||
*/
|
||||
public $validationRules = array();
|
||||
public $validationRules = [];
|
||||
|
||||
/**
|
||||
* The validation linked to fields
|
||||
@ -705,7 +709,7 @@ class Get
|
||||
* @var array
|
||||
* @deprecated 3.3 Use CFactory::_('Registry')->get('validation.linked');
|
||||
*/
|
||||
public $validationLinkedFields = array();
|
||||
public $validationLinkedFields = [];
|
||||
|
||||
/**
|
||||
* The admin views data array
|
||||
@ -713,7 +717,7 @@ class Get
|
||||
* @var array
|
||||
* @deprecated 3.3
|
||||
*/
|
||||
private $_adminViewData = array();
|
||||
private $_adminViewData = [];
|
||||
|
||||
/**
|
||||
* The field data array
|
||||
@ -721,7 +725,7 @@ class Get
|
||||
* @var array
|
||||
* @deprecated 3.3
|
||||
*/
|
||||
private $_fieldData = array();
|
||||
private $_fieldData = [];
|
||||
|
||||
/**
|
||||
* The custom alias builder
|
||||
@ -748,7 +752,7 @@ class Get
|
||||
* @var array
|
||||
* @deprecated 3.3 Use CFactory::_('Registry')->get('unique.names');
|
||||
*/
|
||||
public $uniqueNames = array();
|
||||
public $uniqueNames = [];
|
||||
|
||||
/**
|
||||
* Set unique Names
|
||||
@ -756,7 +760,7 @@ class Get
|
||||
* @var array
|
||||
* @deprecated
|
||||
*/
|
||||
protected $uniqueFieldNames = array();
|
||||
protected $uniqueFieldNames = [];
|
||||
|
||||
/**
|
||||
* Category other name bucket
|
||||
@ -764,7 +768,7 @@ class Get
|
||||
* @var array
|
||||
* @deprecated 3.3 Use CFactory::_('Compiler.Builder.Category.Other.Name')->get($key);
|
||||
*/
|
||||
public $catOtherName = array();
|
||||
public $catOtherName = [];
|
||||
|
||||
/**
|
||||
* The field relations values
|
||||
@ -772,14 +776,15 @@ class Get
|
||||
* @var array
|
||||
* @deprecate 3.3 Use CFactory::_('Compiler.Builder.Field.Relations')->get($key);
|
||||
*/
|
||||
public $fieldRelations = array();
|
||||
public $fieldRelations = [];
|
||||
|
||||
/**
|
||||
* The views default ordering
|
||||
*
|
||||
* @var array
|
||||
* @deprecate 3.3 Use CFactory::_('Compiler.Builder.Views.Default.Ordering')->get($key);
|
||||
*/
|
||||
public $viewsDefaultOrdering = array();
|
||||
public $viewsDefaultOrdering = [];
|
||||
|
||||
/**
|
||||
* Default Fields
|
||||
@ -797,7 +802,7 @@ class Get
|
||||
* @var array
|
||||
* @deprecate 3.3 Use CFactory::_('Compiler.Builder.List.Join')->get($key);
|
||||
*/
|
||||
public $listJoinBuilder = array();
|
||||
public $listJoinBuilder = [];
|
||||
|
||||
/**
|
||||
* The list head over ride
|
||||
@ -805,7 +810,7 @@ class Get
|
||||
* @var array
|
||||
* @deprecate 3.3 Use CFactory::_('Compiler.Builder.List.Head.Override')->get($key);
|
||||
*/
|
||||
public $listHeadOverRide = array();
|
||||
public $listHeadOverRide = [];
|
||||
|
||||
/**
|
||||
* The linked admin view tabs
|
||||
@ -813,7 +818,7 @@ class Get
|
||||
* @var array
|
||||
* @deprecate 3.3 Use CFactory::_('Registry')->get('builder.linked_admin_views');
|
||||
*/
|
||||
public $linkedAdminViews = array();
|
||||
public $linkedAdminViews = [];
|
||||
|
||||
/**
|
||||
* The custom admin view tabs
|
||||
@ -821,7 +826,7 @@ class Get
|
||||
* @var array
|
||||
* @deprecate 3.3 Use CFactory::_('Compiler.Builder.Custom.Tabs')->get($key);
|
||||
*/
|
||||
public $customTabs = array();
|
||||
public $customTabs = [];
|
||||
|
||||
/**
|
||||
* The Add Ajax Switch
|
||||
@ -901,7 +906,7 @@ class Get
|
||||
* @var array
|
||||
* @deprecated 3.3
|
||||
*/
|
||||
public $customFieldScript = array();
|
||||
public $customFieldScript = [];
|
||||
|
||||
/**
|
||||
* The site main get
|
||||
@ -1030,9 +1035,9 @@ class Get
|
||||
$config['remove_line_breaks']
|
||||
= 2; // 2 is global (use the components value)
|
||||
// load application
|
||||
$this->app = JFactory::getApplication();
|
||||
$this->app = Factory::getApplication();
|
||||
// Set the params
|
||||
$this->params = JComponentHelper::getParams('com_componentbuilder');
|
||||
$this->params = ComponentHelper::getParams('com_componentbuilder');
|
||||
// Trigger Event: jcb_ce_onBeforeGet
|
||||
CFactory::_('Event')->trigger('jcb_ce_onBeforeGet', array(&$config, &$this));
|
||||
// set the Joomla version @deprecated
|
||||
@ -1044,7 +1049,7 @@ class Get
|
||||
// also set the helper class langTag (for safeStrings)
|
||||
ComponentbuilderHelper::$langTag = CFactory::_('Config')->get('lang_tag', 'en-GB');
|
||||
// setup the main language array
|
||||
$this->languages['components'][CFactory::_('Config')->get('lang_tag', 'en-GB')] = array();
|
||||
$this->languages['components'][CFactory::_('Config')->get('lang_tag', 'en-GB')] = [];
|
||||
// check if we have Tidy enabled @deprecated
|
||||
$this->tidy = CFactory::_('Config')->get('tidy', false);
|
||||
// set the field type builder @deprecated
|
||||
@ -1056,10 +1061,10 @@ class Get
|
||||
$this->fieldBuilderType = 1;
|
||||
// load the sugestion to use string manipulation
|
||||
$this->app->enqueueMessage(
|
||||
JText::_('<hr /><h3>Field Notice</h3>'), 'Notice'
|
||||
Text::_('<hr /><h3>Field Notice</h3>'), 'Notice'
|
||||
);
|
||||
$this->app->enqueueMessage(
|
||||
JText::_(
|
||||
Text::_(
|
||||
'Since you do not have <b>Tidy</b> extentsion setup on your system, we could not use the SimpleXMLElement class. We instead used <b>string manipulation</b> to build all your fields, this is a faster method, you must inspect the xml files in your component package to see if you are satisfied with the result.<br />You can make this method your default by opening the global options of JCB and under the <b>Global</b> tab set the <b>Field Builder Type</b> to string manipulation.'
|
||||
), 'Notice'
|
||||
);
|
||||
@ -1079,8 +1084,6 @@ class Get
|
||||
$this->componentContext = CFactory::_('Config')->component_context;
|
||||
// set the component name length @deprecated
|
||||
$this->componentCodeNameLength = CFactory::_('Config')->component_code_name_length;
|
||||
// add assets table fix @deprecated
|
||||
$this->addAssetsTableFix = CFactory::_('Config')->add_assets_table_fix;
|
||||
// set if language strings line breaks should be removed @deprecated
|
||||
$this->removeLineBreaks = CFactory::_('Config')->remove_line_breaks;
|
||||
// set if placeholders should be added to customcode @deprecated
|
||||
@ -1090,21 +1093,18 @@ class Get
|
||||
// set if powers should be added to component (default is true) @deprecated
|
||||
$this->addPower = CFactory::_('Config')->get('add_power', true);
|
||||
// set the current user
|
||||
$this->user = JFactory::getUser();
|
||||
$this->user = Factory::getUser();
|
||||
// Get a db connection.
|
||||
$this->db = JFactory::getDbo();
|
||||
$this->db = Factory::getDbo();
|
||||
// get global placeholders @deprecated
|
||||
$this->globalPlaceholders = CFactory::_('Component.Placeholder')->get();
|
||||
|
||||
// get the custom code from installed files
|
||||
CFactory::_('Customcode.Extractor')->run();
|
||||
|
||||
// for plugin event TODO change event api signatures
|
||||
$component_context = CFactory::_('Config')->component_context;
|
||||
// Trigger Event: jcb_ce_onBeforeGetComponentData
|
||||
CFactory::_('Event')->trigger(
|
||||
'jcb_ce_onBeforeGetComponentData',
|
||||
array(&$component_context, &$this)
|
||||
'jcb_ce_onBeforeGetComponentData'
|
||||
);
|
||||
|
||||
// get the component data @deprecated
|
||||
@ -1112,8 +1112,7 @@ class Get
|
||||
|
||||
// Trigger Event: jcb_ce_onAfterGetComponentData
|
||||
CFactory::_('Event')->trigger(
|
||||
'jcb_ce_onAfterGetComponentData',
|
||||
array(&$component_context, &$this)
|
||||
'jcb_ce_onAfterGetComponentData'
|
||||
);
|
||||
|
||||
// make sure we have a version
|
||||
@ -1162,19 +1161,12 @@ class Get
|
||||
|
||||
// load powers *+*+*+*+*+*+*+*
|
||||
CFactory::_('Power')->load($this->linkedPowers);
|
||||
// load any other super powers that was found
|
||||
if (($super_powers = CFactory::_('Power.Extractor')->get_()) !== null)
|
||||
{
|
||||
CFactory::_('Power')->load($super_powers);
|
||||
}
|
||||
// set the percentage when a language can be added
|
||||
$this->percentageLanguageAdd = (int) $this->params->get(
|
||||
'percentagelanguageadd', 50
|
||||
);
|
||||
$this->percentageLanguageAdd = (int) CFactory::_('Config')->get('percentage_language_add', 50);
|
||||
|
||||
// Trigger Event: jcb_ce_onBeforeGet
|
||||
CFactory::_('Event')->trigger(
|
||||
'jcb_ce_onAfterGet', array(&$component_context, &$this)
|
||||
'jcb_ce_onAfterGet'
|
||||
);
|
||||
|
||||
return true;
|
||||
@ -1203,7 +1195,7 @@ class Get
|
||||
* @return void
|
||||
* @deprecated 3.3 Use CFactory::_('Event')->trigger($event, $data);
|
||||
*/
|
||||
public function triggerEvent($event, $data)
|
||||
public function triggerEvent($event, $data = null)
|
||||
{
|
||||
return CFactory::_('Event')->trigger($event, $data);
|
||||
}
|
||||
@ -1332,14 +1324,11 @@ class Get
|
||||
*/
|
||||
public function getListViewDefaultOrdering(&$nameListCode)
|
||||
{
|
||||
if (isset($this->viewsDefaultOrdering[$nameListCode])
|
||||
&& $this->viewsDefaultOrdering[$nameListCode]['add_admin_ordering']
|
||||
== 1)
|
||||
if (CFactory::_('Compiler.Builder.Views.Default.Ordering')->
|
||||
get("$nameListCode.add_admin_ordering", 0) == 1)
|
||||
{
|
||||
foreach (
|
||||
$this->viewsDefaultOrdering[$nameListCode]['admin_ordering_fields']
|
||||
as $order_field
|
||||
)
|
||||
foreach (CFactory::_('Compiler.Builder.Views.Default.Ordering')->
|
||||
get("$nameListCode.admin_ordering_fields", []) as $order_field)
|
||||
{
|
||||
if (($order_field_name = CFactory::_('Field.Database.Name')->get(
|
||||
$nameListCode, $order_field['field']
|
||||
@ -1431,10 +1420,10 @@ class Get
|
||||
{
|
||||
// set notice that we could not get a valid string from the target
|
||||
$this->app->enqueueMessage(
|
||||
JText::sprintf('<hr /><h3>%s Warning</h3>', __CLASS__), 'Error'
|
||||
Text::sprintf('<hr /><h3>%s Warning</h3>', __CLASS__), 'Error'
|
||||
);
|
||||
$this->app->enqueueMessage(
|
||||
JText::sprintf(
|
||||
Text::sprintf(
|
||||
'Use of a deprecated method (%s)!', __METHOD__
|
||||
), 'Error'
|
||||
);
|
||||
@ -1520,10 +1509,10 @@ class Get
|
||||
{
|
||||
// set notice that we could not get a valid string from the target
|
||||
$this->app->enqueueMessage(
|
||||
JText::sprintf('<hr /><h3>%s Warning</h3>', __CLASS__), 'Error'
|
||||
Text::sprintf('<hr /><h3>%s Warning</h3>', __CLASS__), 'Error'
|
||||
);
|
||||
$this->app->enqueueMessage(
|
||||
JText::sprintf(
|
||||
Text::sprintf(
|
||||
'Use of a deprecated method (%s)!', __METHOD__
|
||||
), 'Error'
|
||||
);
|
||||
@ -1611,10 +1600,10 @@ class Get
|
||||
{
|
||||
// set notice that we could not get a valid string from the target
|
||||
$this->app->enqueueMessage(
|
||||
JText::sprintf('<hr /><h3>%s Warning</h3>', __CLASS__), 'Error'
|
||||
Text::sprintf('<hr /><h3>%s Warning</h3>', __CLASS__), 'Error'
|
||||
);
|
||||
$this->app->enqueueMessage(
|
||||
JText::sprintf(
|
||||
Text::sprintf(
|
||||
'Use of a deprecated method (%s)!', __METHOD__
|
||||
), 'Error'
|
||||
);
|
||||
@ -1666,10 +1655,10 @@ class Get
|
||||
{
|
||||
// set notice that we could not get a valid string from the target
|
||||
$this->app->enqueueMessage(
|
||||
JText::sprintf('<hr /><h3>%s Warning</h3>', __CLASS__), 'Error'
|
||||
Text::sprintf('<hr /><h3>%s Warning</h3>', __CLASS__), 'Error'
|
||||
);
|
||||
$this->app->enqueueMessage(
|
||||
JText::sprintf(
|
||||
Text::sprintf(
|
||||
'Use of a deprecated method (%s)!', __METHOD__
|
||||
), 'Error'
|
||||
);
|
||||
@ -1786,10 +1775,10 @@ class Get
|
||||
{
|
||||
// set notice that we could not get a valid string from the target
|
||||
$this->app->enqueueMessage(
|
||||
JText::sprintf('<hr /><h3>%s Warning</h3>', __CLASS__), 'Error'
|
||||
Text::sprintf('<hr /><h3>%s Warning</h3>', __CLASS__), 'Error'
|
||||
);
|
||||
$this->app->enqueueMessage(
|
||||
JText::sprintf(
|
||||
Text::sprintf(
|
||||
'Use of a deprecated method (%s)!', __METHOD__
|
||||
), 'Error'
|
||||
);
|
||||
@ -1920,10 +1909,10 @@ class Get
|
||||
{
|
||||
// set notice that we could not get a valid string from the target
|
||||
$this->app->enqueueMessage(
|
||||
JText::sprintf('<hr /><h3>%s Warning</h3>', __CLASS__), 'Error'
|
||||
Text::sprintf('<hr /><h3>%s Warning</h3>', __CLASS__), 'Error'
|
||||
);
|
||||
$this->app->enqueueMessage(
|
||||
JText::sprintf(
|
||||
Text::sprintf(
|
||||
'Use of a deprecated method (%s)!', __METHOD__
|
||||
), 'Error'
|
||||
);
|
||||
@ -1943,10 +1932,10 @@ class Get
|
||||
{
|
||||
// set notice that we could not get a valid string from the target
|
||||
$this->app->enqueueMessage(
|
||||
JText::sprintf('<hr /><h3>%s Warning</h3>', __CLASS__), 'Error'
|
||||
Text::sprintf('<hr /><h3>%s Warning</h3>', __CLASS__), 'Error'
|
||||
);
|
||||
$this->app->enqueueMessage(
|
||||
JText::sprintf(
|
||||
Text::sprintf(
|
||||
'Use of a deprecated method (%s)!', __METHOD__
|
||||
), 'Error'
|
||||
);
|
||||
@ -1981,10 +1970,10 @@ class Get
|
||||
{
|
||||
// set notice that we could not get a valid string from the target
|
||||
$this->app->enqueueMessage(
|
||||
JText::sprintf('<hr /><h3>%s Warning</h3>', __CLASS__), 'Error'
|
||||
Text::sprintf('<hr /><h3>%s Warning</h3>', __CLASS__), 'Error'
|
||||
);
|
||||
$this->app->enqueueMessage(
|
||||
JText::sprintf(
|
||||
Text::sprintf(
|
||||
'Use of a deprecated method (%s)!', __METHOD__
|
||||
), 'Error'
|
||||
);
|
||||
@ -2005,10 +1994,10 @@ class Get
|
||||
{
|
||||
// set notice that we could not get a valid string from the target
|
||||
$this->app->enqueueMessage(
|
||||
JText::sprintf('<hr /><h3>%s Warning</h3>', __CLASS__), 'Error'
|
||||
Text::sprintf('<hr /><h3>%s Warning</h3>', __CLASS__), 'Error'
|
||||
);
|
||||
$this->app->enqueueMessage(
|
||||
JText::sprintf(
|
||||
Text::sprintf(
|
||||
'Use of a deprecated method (%s)!', __METHOD__
|
||||
), 'Error'
|
||||
);
|
||||
@ -2111,7 +2100,7 @@ class Get
|
||||
{
|
||||
$counterInsert = 0;
|
||||
$counterUpdate = 0;
|
||||
$today = JFactory::getDate()->toSql();
|
||||
$today = Factory::getDate()->toSql();
|
||||
foreach (
|
||||
$this->languages[$target][CFactory::_('Config')->get('lang_tag', 'en-GB')] as $area => $placeholders
|
||||
)
|
||||
@ -2154,15 +2143,15 @@ class Get
|
||||
if (!isset($this->languages[$target][$translations['language']]))
|
||||
{
|
||||
$this->languages[$target][$translations['language']]
|
||||
= array();
|
||||
= [];
|
||||
}
|
||||
if (!isset($this->languages[$target][$translations['language']][$area]))
|
||||
{
|
||||
$this->languages[$target][$translations['language']][$area]
|
||||
= array();
|
||||
= [];
|
||||
}
|
||||
$this->languages[$target][$translations['language']][$area][$placeholder]
|
||||
= $translations['translation'];
|
||||
= CFactory::_('Language')->fix($translations['translation']);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -2226,10 +2215,10 @@ class Get
|
||||
// add the new lang placeholder to the db
|
||||
if (!isset($this->newLangStrings[$target]))
|
||||
{
|
||||
$this->newLangStrings[$target] = array();
|
||||
$this->newLangStrings[$target] = [];
|
||||
}
|
||||
$this->newLangStrings[$target][$counterInsert]
|
||||
= array();
|
||||
= [];
|
||||
$this->newLangStrings[$target][$counterInsert][]
|
||||
= $this->db->quote(
|
||||
json_encode(array($target_id))
|
||||
@ -2314,7 +2303,7 @@ class Get
|
||||
}
|
||||
}
|
||||
// clear the values array
|
||||
$this->newLangStrings[$target] = array();
|
||||
$this->newLangStrings[$target] = [];
|
||||
if (!$continue)
|
||||
{
|
||||
return false; // insure we dont continue if no values were loaded
|
||||
@ -2352,7 +2341,7 @@ class Get
|
||||
$this->db->execute();
|
||||
}
|
||||
// clear the values array
|
||||
$this->existingLangStrings = array();
|
||||
$this->existingLangStrings = [];
|
||||
}
|
||||
}
|
||||
|
||||
@ -2432,7 +2421,7 @@ class Get
|
||||
{
|
||||
$counterUpdate = 0;
|
||||
$otherStrings = $this->db->loadAssocList();
|
||||
$today = JFactory::getDate()->toSql();
|
||||
$today = Factory::getDate()->toSql();
|
||||
foreach ($otherStrings as $item)
|
||||
{
|
||||
if (JsonHelper::check($item[$target]))
|
||||
@ -2539,14 +2528,14 @@ class Get
|
||||
)
|
||||
{
|
||||
// start the bucket for this lang
|
||||
$this->existingLangStrings[$counterUpdate] = array();
|
||||
$this->existingLangStrings[$counterUpdate] = [];
|
||||
$this->existingLangStrings[$counterUpdate]['id'] = (int) $id;
|
||||
$this->existingLangStrings[$counterUpdate]['conditions'] = array();
|
||||
$this->existingLangStrings[$counterUpdate]['conditions'] = [];
|
||||
$this->existingLangStrings[$counterUpdate]['conditions'][]
|
||||
= $this->db->quoteName(
|
||||
'id'
|
||||
) . ' = ' . $this->db->quote($id);
|
||||
$this->existingLangStrings[$counterUpdate]['fields'] = array();
|
||||
$this->existingLangStrings[$counterUpdate]['fields'] = [];
|
||||
$this->existingLangStrings[$counterUpdate]['fields'][]
|
||||
= $this->db->quoteName(
|
||||
$target
|
||||
@ -2590,10 +2579,10 @@ class Get
|
||||
{
|
||||
// set notice that we could not get a valid string from the target
|
||||
$this->app->enqueueMessage(
|
||||
JText::sprintf('<hr /><h3>%s Warning</h3>', __CLASS__), 'Error'
|
||||
Text::sprintf('<hr /><h3>%s Warning</h3>', __CLASS__), 'Error'
|
||||
);
|
||||
$this->app->enqueueMessage(
|
||||
JText::sprintf(
|
||||
Text::sprintf(
|
||||
'Use of a deprecated method (%s)!', __METHOD__
|
||||
), 'Error'
|
||||
);
|
||||
@ -2631,10 +2620,10 @@ class Get
|
||||
{
|
||||
// set notice that we could not get a valid string from the target
|
||||
$this->app->enqueueMessage(
|
||||
JText::sprintf('<hr /><h3>%s Warning</h3>', __CLASS__), 'Error'
|
||||
Text::sprintf('<hr /><h3>%s Warning</h3>', __CLASS__), 'Error'
|
||||
);
|
||||
$this->app->enqueueMessage(
|
||||
JText::sprintf(
|
||||
Text::sprintf(
|
||||
'Use of a deprecated method (%s)!', __METHOD__
|
||||
), 'Error'
|
||||
);
|
||||
@ -2652,10 +2641,10 @@ class Get
|
||||
{
|
||||
// set notice that we could not get a valid string from the target
|
||||
$this->app->enqueueMessage(
|
||||
JText::sprintf('<hr /><h3>%s Warning</h3>', __CLASS__), 'Error'
|
||||
Text::sprintf('<hr /><h3>%s Warning</h3>', __CLASS__), 'Error'
|
||||
);
|
||||
$this->app->enqueueMessage(
|
||||
JText::sprintf(
|
||||
Text::sprintf(
|
||||
'Use of a deprecated method (%s)!', __METHOD__
|
||||
), 'Error'
|
||||
);
|
||||
@ -2673,10 +2662,10 @@ class Get
|
||||
{
|
||||
// set notice that we could not get a valid string from the target
|
||||
$this->app->enqueueMessage(
|
||||
JText::sprintf('<hr /><h3>%s Warning</h3>', __CLASS__), 'Error'
|
||||
Text::sprintf('<hr /><h3>%s Warning</h3>', __CLASS__), 'Error'
|
||||
);
|
||||
$this->app->enqueueMessage(
|
||||
JText::sprintf(
|
||||
Text::sprintf(
|
||||
'Use of a deprecated method (%s)!', __METHOD__
|
||||
), 'Error'
|
||||
);
|
||||
@ -2705,10 +2694,10 @@ class Get
|
||||
{
|
||||
// set notice that we could not get a valid string from the target
|
||||
$this->app->enqueueMessage(
|
||||
JText::sprintf('<hr /><h3>%s Warning</h3>', __CLASS__), 'Error'
|
||||
Text::sprintf('<hr /><h3>%s Warning</h3>', __CLASS__), 'Error'
|
||||
);
|
||||
$this->app->enqueueMessage(
|
||||
JText::sprintf(
|
||||
Text::sprintf(
|
||||
'Use of a deprecated method (%s)!', __METHOD__
|
||||
), 'Error'
|
||||
);
|
||||
@ -2724,10 +2713,10 @@ class Get
|
||||
{
|
||||
// set notice that we could not get a valid string from the target
|
||||
$this->app->enqueueMessage(
|
||||
JText::sprintf('<hr /><h3>%s Warning</h3>', __CLASS__), 'Error'
|
||||
Text::sprintf('<hr /><h3>%s Warning</h3>', __CLASS__), 'Error'
|
||||
);
|
||||
$this->app->enqueueMessage(
|
||||
JText::sprintf(
|
||||
Text::sprintf(
|
||||
'Use of a deprecated method (%s)!', __METHOD__
|
||||
), 'Error'
|
||||
);
|
||||
@ -2743,10 +2732,10 @@ class Get
|
||||
{
|
||||
// set notice that we could not get a valid string from the target
|
||||
$this->app->enqueueMessage(
|
||||
JText::sprintf('<hr /><h3>%s Warning</h3>', __CLASS__), 'Error'
|
||||
Text::sprintf('<hr /><h3>%s Warning</h3>', __CLASS__), 'Error'
|
||||
);
|
||||
$this->app->enqueueMessage(
|
||||
JText::sprintf(
|
||||
Text::sprintf(
|
||||
'Use of a deprecated method (%s)!', __METHOD__
|
||||
), 'Error'
|
||||
);
|
||||
@ -2764,10 +2753,10 @@ class Get
|
||||
{
|
||||
// set notice that we could not get a valid string from the target
|
||||
$this->app->enqueueMessage(
|
||||
JText::sprintf('<hr /><h3>%s Warning</h3>', __CLASS__), 'Error'
|
||||
Text::sprintf('<hr /><h3>%s Warning</h3>', __CLASS__), 'Error'
|
||||
);
|
||||
$this->app->enqueueMessage(
|
||||
JText::sprintf(
|
||||
Text::sprintf(
|
||||
'Use of a deprecated method (%s)!', __METHOD__
|
||||
), 'Error'
|
||||
);
|
||||
@ -2828,10 +2817,10 @@ class Get
|
||||
{
|
||||
// set notice that we could not get a valid string from the target
|
||||
$this->app->enqueueMessage(
|
||||
JText::sprintf('<hr /><h3>%s Warning</h3>', __CLASS__), 'Error'
|
||||
Text::sprintf('<hr /><h3>%s Warning</h3>', __CLASS__), 'Error'
|
||||
);
|
||||
$this->app->enqueueMessage(
|
||||
JText::sprintf(
|
||||
Text::sprintf(
|
||||
'Use of a deprecated method (%s)!', __METHOD__
|
||||
), 'Error'
|
||||
);
|
||||
@ -2849,10 +2838,10 @@ class Get
|
||||
{
|
||||
// set notice that we could not get a valid string from the target
|
||||
$this->app->enqueueMessage(
|
||||
JText::sprintf('<hr /><h3>%s Warning</h3>', __CLASS__), 'Error'
|
||||
Text::sprintf('<hr /><h3>%s Warning</h3>', __CLASS__), 'Error'
|
||||
);
|
||||
$this->app->enqueueMessage(
|
||||
JText::sprintf(
|
||||
Text::sprintf(
|
||||
'Use of a deprecated method (%s)!', __METHOD__
|
||||
), 'Error'
|
||||
);
|
||||
@ -2891,10 +2880,10 @@ class Get
|
||||
{
|
||||
// set notice that we could not get a valid string from the target
|
||||
$this->app->enqueueMessage(
|
||||
JText::sprintf('<hr /><h3>%s Warning</h3>', __CLASS__), 'Error'
|
||||
Text::sprintf('<hr /><h3>%s Warning</h3>', __CLASS__), 'Error'
|
||||
);
|
||||
$this->app->enqueueMessage(
|
||||
JText::sprintf(
|
||||
Text::sprintf(
|
||||
'Use of a deprecated method (%s)!', __METHOD__
|
||||
), 'Error'
|
||||
);
|
||||
@ -2955,10 +2944,10 @@ class Get
|
||||
{
|
||||
// set notice that we could not get a valid string from the target
|
||||
$this->app->enqueueMessage(
|
||||
JText::sprintf('<hr /><h3>%s Warning</h3>', __CLASS__), 'Error'
|
||||
Text::sprintf('<hr /><h3>%s Warning</h3>', __CLASS__), 'Error'
|
||||
);
|
||||
$this->app->enqueueMessage(
|
||||
JText::sprintf(
|
||||
Text::sprintf(
|
||||
'Use of a deprecated method (%s)!', __METHOD__
|
||||
), 'Error'
|
||||
);
|
||||
@ -2997,10 +2986,10 @@ class Get
|
||||
{
|
||||
// set notice that we could not get a valid string from the target
|
||||
$this->app->enqueueMessage(
|
||||
JText::sprintf('<hr /><h3>%s Warning</h3>', __CLASS__), 'Error'
|
||||
Text::sprintf('<hr /><h3>%s Warning</h3>', __CLASS__), 'Error'
|
||||
);
|
||||
$this->app->enqueueMessage(
|
||||
JText::sprintf(
|
||||
Text::sprintf(
|
||||
'Use of a deprecated method (%s)!', __METHOD__
|
||||
), 'Error'
|
||||
);
|
||||
@ -3023,10 +3012,10 @@ class Get
|
||||
{
|
||||
// set notice that we could not get a valid string from the target
|
||||
$this->app->enqueueMessage(
|
||||
JText::sprintf('<hr /><h3>%s Warning</h3>', __CLASS__), 'Error'
|
||||
Text::sprintf('<hr /><h3>%s Warning</h3>', __CLASS__), 'Error'
|
||||
);
|
||||
$this->app->enqueueMessage(
|
||||
JText::sprintf(
|
||||
Text::sprintf(
|
||||
'Use of a deprecated method (%s)!', __METHOD__
|
||||
), 'Error'
|
||||
);
|
||||
@ -3049,10 +3038,10 @@ class Get
|
||||
{
|
||||
// set notice that we could not get a valid string from the target
|
||||
$this->app->enqueueMessage(
|
||||
JText::sprintf('<hr /><h3>%s Warning</h3>', __CLASS__), 'Error'
|
||||
Text::sprintf('<hr /><h3>%s Warning</h3>', __CLASS__), 'Error'
|
||||
);
|
||||
$this->app->enqueueMessage(
|
||||
JText::sprintf(
|
||||
Text::sprintf(
|
||||
'Use of a deprecated method (%s)!', __METHOD__
|
||||
), 'Error'
|
||||
);
|
||||
@ -3097,10 +3086,10 @@ class Get
|
||||
{
|
||||
// set notice that we could not get a valid string from the target
|
||||
$this->app->enqueueMessage(
|
||||
JText::sprintf('<hr /><h3>%s Warning</h3>', __CLASS__), 'Error'
|
||||
Text::sprintf('<hr /><h3>%s Warning</h3>', __CLASS__), 'Error'
|
||||
);
|
||||
$this->app->enqueueMessage(
|
||||
JText::sprintf(
|
||||
Text::sprintf(
|
||||
'Use of a deprecated method (%s)!', __METHOD__
|
||||
), 'Error'
|
||||
);
|
||||
@ -3153,10 +3142,10 @@ class Get
|
||||
{
|
||||
// set notice that we could not get a valid string from the target
|
||||
$this->app->enqueueMessage(
|
||||
JText::sprintf('<hr /><h3>%s Warning</h3>', __CLASS__), 'Error'
|
||||
Text::sprintf('<hr /><h3>%s Warning</h3>', __CLASS__), 'Error'
|
||||
);
|
||||
$this->app->enqueueMessage(
|
||||
JText::sprintf(
|
||||
Text::sprintf(
|
||||
'Use of a deprecated method (%s)!', __METHOD__
|
||||
), 'Error'
|
||||
);
|
||||
|
@ -14,6 +14,7 @@
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\Filesystem\File;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use VDM\Joomla\Utilities\ArrayHelper;
|
||||
use VDM\Joomla\Utilities\GetHelper;
|
||||
use VDM\Joomla\Utilities\FileHelper;
|
||||
@ -264,7 +265,7 @@ class Structure extends Get
|
||||
* @var array
|
||||
* @deprecated 3.3 Use CFactory::_('Compiler.Builder.Content.One')->allActive()
|
||||
*/
|
||||
public $fileContentStatic = array();
|
||||
public $fileContentStatic = [];
|
||||
|
||||
/**
|
||||
* Extention Custom Fields
|
||||
@ -272,14 +273,14 @@ class Structure extends Get
|
||||
* @var array
|
||||
* @deprecated 3.3 Use CFactory::_('Compiler.Builder.Extension.Custom.Fields')->get($key)
|
||||
*/
|
||||
public $extentionCustomfields = array();
|
||||
public $extentionCustomfields = [];
|
||||
|
||||
/**
|
||||
* Extention Tracking Files Moved
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
public $extentionTrackingFilesMoved = array();
|
||||
public $extentionTrackingFilesMoved = [];
|
||||
|
||||
/**
|
||||
* The standard folders
|
||||
@ -304,7 +305,7 @@ class Structure extends Get
|
||||
* @var array
|
||||
* @deprecated 3.3 Use CFactory::_('Compiler.Builder.Content.Multi')->allActive()
|
||||
*/
|
||||
public $fileContentDynamic = array();
|
||||
public $fileContentDynamic = [];
|
||||
|
||||
/**
|
||||
* The Component Sales name
|
||||
@ -344,7 +345,7 @@ class Structure extends Get
|
||||
* @var array
|
||||
* @deprecated 3.3 Use CFactory::_('Registry')->get('dynamic_paths');
|
||||
*/
|
||||
public $dynamicPaths = array();
|
||||
public $dynamicPaths = [];
|
||||
|
||||
/**
|
||||
* The not new static items
|
||||
@ -352,7 +353,7 @@ class Structure extends Get
|
||||
* @var array
|
||||
* @deprecated 3.3 Use CFactory::_('Registry')->get('files.not.new', []);
|
||||
*/
|
||||
public $notNew = array();
|
||||
public $notNew = [];
|
||||
|
||||
/**
|
||||
* Update the file content
|
||||
@ -360,7 +361,7 @@ class Structure extends Get
|
||||
* @var array
|
||||
* @deprecated 3.3 Use CFactory::_('Registry')->get('update.file.content');
|
||||
*/
|
||||
public $updateFileContent = array();
|
||||
public $updateFileContent = [];
|
||||
|
||||
/**
|
||||
* The new files
|
||||
@ -368,7 +369,7 @@ class Structure extends Get
|
||||
* @var array
|
||||
* @deprecated 3.3 Use CFactory::_('Utilities.Files');
|
||||
*/
|
||||
public $newFiles = array();
|
||||
public $newFiles = [];
|
||||
|
||||
/**
|
||||
* The Checkin Switch
|
||||
@ -390,7 +391,7 @@ class Structure extends Get
|
||||
* @var array
|
||||
* @deprecated 3.3
|
||||
*/
|
||||
protected $lastModifiedDate = array();
|
||||
protected $lastModifiedDate = [];
|
||||
|
||||
/**
|
||||
* The default view switch
|
||||
@ -474,10 +475,10 @@ class Structure extends Get
|
||||
{
|
||||
// set notice that we could not get a valid string from the target
|
||||
$this->app->enqueueMessage(
|
||||
JText::sprintf('<hr /><h3>%s Warning</h3>', __CLASS__), 'Error'
|
||||
Text::sprintf('<hr /><h3>%s Warning</h3>', __CLASS__), 'Error'
|
||||
);
|
||||
$this->app->enqueueMessage(
|
||||
JText::sprintf(
|
||||
Text::sprintf(
|
||||
'Use of a deprecated method (%s)!', __METHOD__
|
||||
), 'Error'
|
||||
);
|
||||
@ -493,10 +494,10 @@ class Structure extends Get
|
||||
{
|
||||
// set notice that we could not get a valid string from the target
|
||||
$this->app->enqueueMessage(
|
||||
JText::sprintf('<hr /><h3>%s Warning</h3>', __CLASS__), 'Error'
|
||||
Text::sprintf('<hr /><h3>%s Warning</h3>', __CLASS__), 'Error'
|
||||
);
|
||||
$this->app->enqueueMessage(
|
||||
JText::sprintf(
|
||||
Text::sprintf(
|
||||
'Use of a deprecated method (%s)!', __METHOD__
|
||||
), 'Error'
|
||||
);
|
||||
@ -512,10 +513,10 @@ class Structure extends Get
|
||||
{
|
||||
// set notice that we could not get a valid string from the target
|
||||
$this->app->enqueueMessage(
|
||||
JText::sprintf('<hr /><h3>%s Warning</h3>', __CLASS__), 'Error'
|
||||
Text::sprintf('<hr /><h3>%s Warning</h3>', __CLASS__), 'Error'
|
||||
);
|
||||
$this->app->enqueueMessage(
|
||||
JText::sprintf(
|
||||
Text::sprintf(
|
||||
'Use of a deprecated method (%s)!', __METHOD__
|
||||
), 'Error'
|
||||
);
|
||||
@ -531,10 +532,10 @@ class Structure extends Get
|
||||
{
|
||||
// set notice that we could not get a valid string from the target
|
||||
$this->app->enqueueMessage(
|
||||
JText::sprintf('<hr /><h3>%s Warning</h3>', __CLASS__), 'Error'
|
||||
Text::sprintf('<hr /><h3>%s Warning</h3>', __CLASS__), 'Error'
|
||||
);
|
||||
$this->app->enqueueMessage(
|
||||
JText::sprintf(
|
||||
Text::sprintf(
|
||||
'Use of a deprecated method (%s)!', __METHOD__
|
||||
), 'Error'
|
||||
);
|
||||
@ -550,10 +551,10 @@ class Structure extends Get
|
||||
{
|
||||
// set notice that we could not get a valid string from the target
|
||||
$this->app->enqueueMessage(
|
||||
JText::sprintf('<hr /><h3>%s Warning</h3>', __CLASS__), 'Error'
|
||||
Text::sprintf('<hr /><h3>%s Warning</h3>', __CLASS__), 'Error'
|
||||
);
|
||||
$this->app->enqueueMessage(
|
||||
JText::sprintf(
|
||||
Text::sprintf(
|
||||
'Use of a deprecated method (%s)!', __METHOD__
|
||||
), 'Error'
|
||||
);
|
||||
@ -569,10 +570,10 @@ class Structure extends Get
|
||||
{
|
||||
// set notice that we could not get a valid string from the target
|
||||
$this->app->enqueueMessage(
|
||||
JText::sprintf('<hr /><h3>%s Warning</h3>', __CLASS__), 'Error'
|
||||
Text::sprintf('<hr /><h3>%s Warning</h3>', __CLASS__), 'Error'
|
||||
);
|
||||
$this->app->enqueueMessage(
|
||||
JText::sprintf(
|
||||
Text::sprintf(
|
||||
'Use of a deprecated method (%s)!', __METHOD__
|
||||
), 'Error'
|
||||
);
|
||||
@ -599,10 +600,10 @@ class Structure extends Get
|
||||
{
|
||||
// set notice that we could not get a valid string from the target
|
||||
$this->app->enqueueMessage(
|
||||
JText::sprintf('<hr /><h3>%s Warning</h3>', __CLASS__), 'Error'
|
||||
Text::sprintf('<hr /><h3>%s Warning</h3>', __CLASS__), 'Error'
|
||||
);
|
||||
$this->app->enqueueMessage(
|
||||
JText::sprintf(
|
||||
Text::sprintf(
|
||||
'Use of a deprecated method (%s)!', __METHOD__
|
||||
), 'Error'
|
||||
);
|
||||
@ -618,10 +619,10 @@ class Structure extends Get
|
||||
{
|
||||
// set notice that we could not get a valid string from the target
|
||||
$this->app->enqueueMessage(
|
||||
JText::sprintf('<hr /><h3>%s Warning</h3>', __CLASS__), 'Error'
|
||||
Text::sprintf('<hr /><h3>%s Warning</h3>', __CLASS__), 'Error'
|
||||
);
|
||||
$this->app->enqueueMessage(
|
||||
JText::sprintf(
|
||||
Text::sprintf(
|
||||
'Use of a deprecated method (%s)!', __METHOD__
|
||||
), 'Error'
|
||||
);
|
||||
@ -637,10 +638,10 @@ class Structure extends Get
|
||||
{
|
||||
// set notice that we could not get a valid string from the target
|
||||
$this->app->enqueueMessage(
|
||||
JText::sprintf('<hr /><h3>%s Warning</h3>', __CLASS__), 'Error'
|
||||
Text::sprintf('<hr /><h3>%s Warning</h3>', __CLASS__), 'Error'
|
||||
);
|
||||
$this->app->enqueueMessage(
|
||||
JText::sprintf(
|
||||
Text::sprintf(
|
||||
'Use of a deprecated method (%s)!', __METHOD__
|
||||
), 'Error'
|
||||
);
|
||||
@ -673,7 +674,8 @@ class Structure extends Get
|
||||
{
|
||||
$check = md5($path . 'type' . $field['type_name']);
|
||||
// lets check if we already moved this
|
||||
if (!isset($this->extentionTrackingFilesMoved[$check]))
|
||||
if (CFactory::_('Config')->get('joomla_version', 3) == 3 &&
|
||||
!isset($this->extentionTrackingFilesMoved[$check]))
|
||||
{
|
||||
// check files exist
|
||||
if (File::exists(
|
||||
@ -700,7 +702,8 @@ class Structure extends Get
|
||||
. CFactory::_('Registry')->get('validation.linked.' . $field['field'])
|
||||
);
|
||||
// lets check if we already moved this
|
||||
if (!isset($this->extentionTrackingFilesMoved[$check]))
|
||||
if (CFactory::_('Config')->get('joomla_version', 3) == 3 &&
|
||||
!isset($this->extentionTrackingFilesMoved[$check]))
|
||||
{
|
||||
// check files exist
|
||||
if (File::exists(
|
||||
@ -751,7 +754,7 @@ class Structure extends Get
|
||||
foreach ($ids as $id)
|
||||
{
|
||||
// setup the field
|
||||
$field = array();
|
||||
$field = [];
|
||||
$field['field'] = $id;
|
||||
CFactory::_('Field')->set($field);
|
||||
// move field and rules if needed
|
||||
@ -812,10 +815,10 @@ class Structure extends Get
|
||||
{
|
||||
// set notice that we could not get a valid string from the target
|
||||
$this->app->enqueueMessage(
|
||||
JText::sprintf('<hr /><h3>%s Warning</h3>', __CLASS__), 'Error'
|
||||
Text::sprintf('<hr /><h3>%s Warning</h3>', __CLASS__), 'Error'
|
||||
);
|
||||
$this->app->enqueueMessage(
|
||||
JText::sprintf(
|
||||
Text::sprintf(
|
||||
'Use of a deprecated method (%s)!', __METHOD__
|
||||
), 'Error'
|
||||
);
|
||||
@ -833,13 +836,21 @@ class Structure extends Get
|
||||
CFactory::_('Registry')->set('set_move_folders_install_script', true);
|
||||
// set message that this was done (will still add a tutorial link later)
|
||||
$this->app->enqueueMessage(
|
||||
JText::_(
|
||||
Text::_(
|
||||
'<hr /><h3>Dynamic folder(s) were detected.</h3>'
|
||||
), 'Notice'
|
||||
);
|
||||
$_function = 'setDynamicF0ld3rs';
|
||||
$_script = 'script.php';
|
||||
if (CFactory::_('Config')->get('joomla_version', 3) != 3)
|
||||
{
|
||||
$_function = 'moveFolders';
|
||||
$_script = 'ComponentnameInstallerScript.php';
|
||||
}
|
||||
$this->app->enqueueMessage(
|
||||
JText::sprintf(
|
||||
'A method (setDynamicF0ld3rs) was added to the install <b>script.php</b> of this package to insure that the folder(s) are copied into the correct place when this component is installed!'
|
||||
Text::sprintf(
|
||||
'A method (%s) was added to the install <b>%s</b> of this package to insure that the folder(s) are copied into the correct place when this component is installed!',
|
||||
$_function, $_script
|
||||
), 'Notice'
|
||||
);
|
||||
}
|
||||
|
@ -13,6 +13,7 @@
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\Language\Text;
|
||||
use VDM\Joomla\Utilities\StringHelper;
|
||||
use VDM\Joomla\Utilities\ArrayHelper;
|
||||
use VDM\Joomla\Componentbuilder\Compiler\Factory as CFactory;
|
||||
@ -31,7 +32,7 @@ class Fields extends Structure
|
||||
* @var array
|
||||
* @deprecated 3.3 Use CFactory::_('Compiler.Builder.Meta.Data')->get($key);
|
||||
*/
|
||||
public $metadataBuilder = array();
|
||||
public $metadataBuilder = [];
|
||||
|
||||
/**
|
||||
* View access Switch
|
||||
@ -39,7 +40,7 @@ class Fields extends Structure
|
||||
* @var array
|
||||
* @deprecated 3.3 Use CFactory::_('Compiler.Builder.Access.Switch')->get($key);
|
||||
*/
|
||||
public $accessBuilder = array();
|
||||
public $accessBuilder = [];
|
||||
|
||||
/**
|
||||
* edit view tabs counter
|
||||
@ -47,7 +48,7 @@ class Fields extends Structure
|
||||
* @var array
|
||||
* @deprecated 3.3 Use CFactory::_('Compiler.Builder.Tab.Counter')->get($key);
|
||||
*/
|
||||
public $tabCounter = array();
|
||||
public $tabCounter = [];
|
||||
|
||||
/**
|
||||
* layout builder
|
||||
@ -55,7 +56,7 @@ class Fields extends Structure
|
||||
* @var array
|
||||
* @deprecated 3.3 Use CFactory::_('Compiler.Builder.Layout')->get($key);
|
||||
*/
|
||||
public $layoutBuilder = array();
|
||||
public $layoutBuilder = [];
|
||||
|
||||
/**
|
||||
* permissions builder
|
||||
@ -63,7 +64,7 @@ class Fields extends Structure
|
||||
* @var array
|
||||
* @deprecated 3.3 Use CFactory::_('Compiler.Builder.Has.Permissions')->get($key);
|
||||
*/
|
||||
public $hasPermissions = array();
|
||||
public $hasPermissions = [];
|
||||
|
||||
/**
|
||||
* used to fix the zero order
|
||||
@ -71,7 +72,7 @@ class Fields extends Structure
|
||||
* @var array
|
||||
* @deprecated 3.3 Use CFactory::_('Compiler.Builder.Order.Zero')->get($key);
|
||||
*/
|
||||
private $zeroOrderFix = array();
|
||||
private $zeroOrderFix = [];
|
||||
|
||||
/**
|
||||
* Site field data
|
||||
@ -79,7 +80,7 @@ class Fields extends Structure
|
||||
* @var array
|
||||
* @deprecated 3.3 Use CFactory::_('Compiler.Builder.Site.Field.Data')->get($key);
|
||||
*/
|
||||
public $siteFieldData = array();
|
||||
public $siteFieldData = [];
|
||||
|
||||
/**
|
||||
* list of fields that are not being escaped
|
||||
@ -87,7 +88,7 @@ class Fields extends Structure
|
||||
* @var array
|
||||
* @deprecated 3.3 Use CFactory::_('Compiler.Builder.Do.Not.Escape')->get($key);
|
||||
*/
|
||||
public $doNotEscape = array();
|
||||
public $doNotEscape = [];
|
||||
|
||||
/**
|
||||
* list of classes used in the list view for the fields
|
||||
@ -95,7 +96,7 @@ class Fields extends Structure
|
||||
* @var array
|
||||
* @deprecated 3.3 Use CFactory::_('Compiler.Builder.List.Field.Class')->set($key, true);
|
||||
*/
|
||||
public $listFieldClass = array();
|
||||
public $listFieldClass = [];
|
||||
|
||||
/**
|
||||
* tags builder
|
||||
@ -103,7 +104,7 @@ class Fields extends Structure
|
||||
* @var array
|
||||
* @deprecated 3.3 Use CFactory::_('Compiler.Builder.Tags')->get($key);
|
||||
*/
|
||||
public $tagsBuilder = array();
|
||||
public $tagsBuilder = [];
|
||||
|
||||
/**
|
||||
* query builder
|
||||
@ -111,7 +112,7 @@ class Fields extends Structure
|
||||
* @var array
|
||||
* @deprecated 3.3 Use CFactory::_('Compiler.Builder.Database.Tables')->get($key);
|
||||
*/
|
||||
public $queryBuilder = array();
|
||||
public $queryBuilder = [];
|
||||
|
||||
/**
|
||||
* unique keys for database field
|
||||
@ -119,7 +120,7 @@ class Fields extends Structure
|
||||
* @var array
|
||||
* @deprecated 3.3 Use CFactory::_('Compiler.Builder.Database.Unique.Keys')->get($key);
|
||||
*/
|
||||
public $dbUniqueKeys = array();
|
||||
public $dbUniqueKeys = [];
|
||||
|
||||
/**
|
||||
* unique guid swtich
|
||||
@ -127,7 +128,7 @@ class Fields extends Structure
|
||||
* @var array
|
||||
* @deprecated 3.3 Use CFactory::_('Compiler.Builder.Database.Unique.Guid')->get($key);
|
||||
*/
|
||||
public $dbUniqueGuid = array();
|
||||
public $dbUniqueGuid = [];
|
||||
|
||||
/**
|
||||
* keys for database field
|
||||
@ -135,7 +136,7 @@ class Fields extends Structure
|
||||
* @var array
|
||||
* @deprecated 3.3 Use CFactory::_('Compiler.Builder.Database.Keys')->get($key);
|
||||
*/
|
||||
public $dbKeys = array();
|
||||
public $dbKeys = [];
|
||||
|
||||
/**
|
||||
* history builder
|
||||
@ -143,7 +144,7 @@ class Fields extends Structure
|
||||
* @var array
|
||||
* @deprecated 3.3 Use CFactory::_('Compiler.Builder.History')->get($key);
|
||||
*/
|
||||
public $historyBuilder = array();
|
||||
public $historyBuilder = [];
|
||||
|
||||
/**
|
||||
* alias builder
|
||||
@ -151,7 +152,7 @@ class Fields extends Structure
|
||||
* @var array
|
||||
* @deprecated 3.3 CFactory::_('Compiler.Builder.Alias')->get($key);
|
||||
*/
|
||||
public $aliasBuilder = array();
|
||||
public $aliasBuilder = [];
|
||||
|
||||
/**
|
||||
* title builder
|
||||
@ -159,7 +160,7 @@ class Fields extends Structure
|
||||
* @var array
|
||||
* @deprecated 3.3 CFactory::_('Compiler.Builder.Title')->get($key);
|
||||
*/
|
||||
public $titleBuilder = array();
|
||||
public $titleBuilder = [];
|
||||
|
||||
/**
|
||||
* list builder
|
||||
@ -167,7 +168,7 @@ class Fields extends Structure
|
||||
* @var array
|
||||
* @deprecated 3.3 Use CFactory::_('Compiler.Builder.Lists')->get($key);
|
||||
*/
|
||||
public $listBuilder = array();
|
||||
public $listBuilder = [];
|
||||
|
||||
/**
|
||||
* custom Builder List
|
||||
@ -175,7 +176,7 @@ class Fields extends Structure
|
||||
* @var array
|
||||
* @deprecated 3.3 Use CFactory::_('Compiler.Builder.Custom.List')->get($key);
|
||||
*/
|
||||
public $customBuilderList = array();
|
||||
public $customBuilderList = [];
|
||||
|
||||
/**
|
||||
* Hidden Fields Builder
|
||||
@ -183,7 +184,7 @@ class Fields extends Structure
|
||||
* @var array
|
||||
* @deprecated 3.3 Use CFactory::_('Compiler.Builder.Hidden.Fields')->get($key);
|
||||
*/
|
||||
public $hiddenFieldsBuilder = array();
|
||||
public $hiddenFieldsBuilder = [];
|
||||
|
||||
/**
|
||||
* INT Field Builder
|
||||
@ -191,7 +192,7 @@ class Fields extends Structure
|
||||
* @var array
|
||||
* @deprecated 3.3 Use CFactory::_('Compiler.Builder.Integer.Fields')->get($key);
|
||||
*/
|
||||
public $intFieldsBuilder = array();
|
||||
public $intFieldsBuilder = [];
|
||||
|
||||
/**
|
||||
* Dynamic Fields Builder
|
||||
@ -199,7 +200,7 @@ class Fields extends Structure
|
||||
* @var array
|
||||
* @deprecated 3.3 Use CFactory::_('Compiler.Builder.Dynamic.Fields')->get($key);
|
||||
*/
|
||||
public $dynamicfieldsBuilder = array();
|
||||
public $dynamicfieldsBuilder = [];
|
||||
|
||||
/**
|
||||
* Main text Builder
|
||||
@ -207,7 +208,7 @@ class Fields extends Structure
|
||||
* @var array
|
||||
* @deprecated 3.3 Use CFactory::_('Compiler.Builder.Main.Text.Field')->get($key);
|
||||
*/
|
||||
public $maintextBuilder = array();
|
||||
public $maintextBuilder = [];
|
||||
|
||||
/**
|
||||
* Custom Builder
|
||||
@ -215,7 +216,7 @@ class Fields extends Structure
|
||||
* @var array
|
||||
* @deprecated 3.3 Use CFactory::_('Compiler.Builder.Custom.Field')->get($key);
|
||||
*/
|
||||
public $customBuilder = array();
|
||||
public $customBuilder = [];
|
||||
|
||||
/**
|
||||
* Custom Field Links Builder
|
||||
@ -223,7 +224,7 @@ class Fields extends Structure
|
||||
* @var array
|
||||
* @deprecated 3.3 Use CFactory::_('Compiler.Builder.Custom.Field.Links')->get($key);
|
||||
*/
|
||||
public $customFieldLinksBuilder = array();
|
||||
public $customFieldLinksBuilder = [];
|
||||
|
||||
/**
|
||||
* Set Script for User Switch
|
||||
@ -231,7 +232,7 @@ class Fields extends Structure
|
||||
* @var array
|
||||
* @deprecated 3.3 Use CFactory::_('Compiler.Builder.Script.User.Switch')->get($key);
|
||||
*/
|
||||
public $setScriptUserSwitch = array();
|
||||
public $setScriptUserSwitch = [];
|
||||
|
||||
/**
|
||||
* Set Script for Media Switch
|
||||
@ -239,7 +240,7 @@ class Fields extends Structure
|
||||
* @var array
|
||||
* @deprecated 3.3 Use CFactory::_('Compiler.Builder.Script.Media.Switch')->get($key);
|
||||
*/
|
||||
public $setScriptMediaSwitch = array();
|
||||
public $setScriptMediaSwitch = [];
|
||||
|
||||
/**
|
||||
* Category builder
|
||||
@ -247,7 +248,7 @@ class Fields extends Structure
|
||||
* @var array
|
||||
* @deprecated 3.3 Use CFactory::_('Compiler.Builder.Category')->get($key);
|
||||
*/
|
||||
public $categoryBuilder = array();
|
||||
public $categoryBuilder = [];
|
||||
|
||||
/**
|
||||
* Category Code builder
|
||||
@ -255,7 +256,7 @@ class Fields extends Structure
|
||||
* @var array
|
||||
* @deprecated 3.3 Use CFactory::_('Compiler.Builder.Category.Code')->get($key);
|
||||
*/
|
||||
public $catCodeBuilder = array();
|
||||
public $catCodeBuilder = [];
|
||||
|
||||
/**
|
||||
* Check Box builder
|
||||
@ -263,7 +264,7 @@ class Fields extends Structure
|
||||
* @var array
|
||||
* @deprecated 3.3 Use CFactory::_('Compiler.Builder.Check.Box')->get($key);
|
||||
*/
|
||||
public $checkboxBuilder = array();
|
||||
public $checkboxBuilder = [];
|
||||
|
||||
/**
|
||||
* Json String Builder
|
||||
@ -271,7 +272,7 @@ class Fields extends Structure
|
||||
* @var array
|
||||
* @deprecated 3.3 Use CFactory::_('Compiler.Builder.Json.String')->get($key);
|
||||
*/
|
||||
public $jsonStringBuilder = array();
|
||||
public $jsonStringBuilder = [];
|
||||
|
||||
/**
|
||||
* Json String Builder for return values to array
|
||||
@ -279,7 +280,7 @@ class Fields extends Structure
|
||||
* @var array
|
||||
* @deprecated 3.3 Use CFactory::_('Compiler.Builder.Json.Item.Array')->get($key);
|
||||
*/
|
||||
public $jsonItemBuilderArray = array();
|
||||
public $jsonItemBuilderArray = [];
|
||||
|
||||
/**
|
||||
* Json Item Builder
|
||||
@ -287,7 +288,7 @@ class Fields extends Structure
|
||||
* @var array
|
||||
* @deprecated 3.3 Use CFactory::_('Compiler.Builder.Json.Item')->get($key);
|
||||
*/
|
||||
public $jsonItemBuilder = array();
|
||||
public $jsonItemBuilder = [];
|
||||
|
||||
/**
|
||||
* Base 64 Builder
|
||||
@ -295,7 +296,7 @@ class Fields extends Structure
|
||||
* @var array
|
||||
* @deprecated 3.3 Use CFactory::_('Compiler.Builder.Base.Six.Four')->get($key);
|
||||
*/
|
||||
public $base64Builder = array();
|
||||
public $base64Builder = [];
|
||||
|
||||
/**
|
||||
* Basic Encryption Field Modeling
|
||||
@ -303,7 +304,7 @@ class Fields extends Structure
|
||||
* @var array
|
||||
* @deprecated 3.3 Use CFactory::_('Compiler.Builder.Model.Basic.Field')->get($key);
|
||||
*/
|
||||
public $basicFieldModeling = array();
|
||||
public $basicFieldModeling = [];
|
||||
|
||||
/**
|
||||
* WHMCS Encryption Field Modeling
|
||||
@ -311,7 +312,7 @@ class Fields extends Structure
|
||||
* @var array
|
||||
* @deprecated 3.3 Use CFactory::_('Compiler.Builder.Model.Whmcs.Field')->get($key);
|
||||
*/
|
||||
public $whmcsFieldModeling = array();
|
||||
public $whmcsFieldModeling = [];
|
||||
|
||||
/**
|
||||
* Medium Encryption Field Modeling
|
||||
@ -319,7 +320,7 @@ class Fields extends Structure
|
||||
* @var array
|
||||
* @deprecated 3.3 Use CFactory::_('Compiler.Builder.Model.Medium.Field')->get($key);
|
||||
*/
|
||||
public $mediumFieldModeling = array();
|
||||
public $mediumFieldModeling = [];
|
||||
|
||||
/**
|
||||
* Expert Field Modeling
|
||||
@ -327,7 +328,7 @@ class Fields extends Structure
|
||||
* @var array
|
||||
* @deprecated 3.3 Use CFactory::_('Compiler.Builder.Model.Expert.Field')->get($key);
|
||||
*/
|
||||
public $expertFieldModeling = array();
|
||||
public $expertFieldModeling = [];
|
||||
|
||||
/**
|
||||
* Expert Mode Initiator
|
||||
@ -335,7 +336,7 @@ class Fields extends Structure
|
||||
* @var array
|
||||
* @deprecated 3.3 Use CFactory::_('Compiler.Builder.Model.Expert.Field.Initiator')->get($key);
|
||||
*/
|
||||
public $expertFieldModelInitiator = array();
|
||||
public $expertFieldModelInitiator = [];
|
||||
|
||||
/**
|
||||
* Get Items Method List String Fix Builder
|
||||
@ -343,7 +344,7 @@ class Fields extends Structure
|
||||
* @var array
|
||||
* @deprecated 3.3 Use CFactory::_('Compiler.Builder.Items.Method.List.String')->get($key);
|
||||
*/
|
||||
public $getItemsMethodListStringFixBuilder = array();
|
||||
public $getItemsMethodListStringFixBuilder = [];
|
||||
|
||||
/**
|
||||
* Get Items Method Eximport String Fix Builder
|
||||
@ -351,7 +352,7 @@ class Fields extends Structure
|
||||
* @var array
|
||||
* @deprecated 3.3 Use CFactory::_('Compiler.Builder.Items.Method.Eximport.String')->get($key);
|
||||
*/
|
||||
public $getItemsMethodEximportStringFixBuilder = array();
|
||||
public $getItemsMethodEximportStringFixBuilder = [];
|
||||
|
||||
/**
|
||||
* Selection Translation Fix Builder
|
||||
@ -359,7 +360,7 @@ class Fields extends Structure
|
||||
* @var array
|
||||
* @deprecated 3.3 Use CFactory::_('Compiler.Builder.Selection.Translation')->get($key);
|
||||
*/
|
||||
public $selectionTranslationFixBuilder = array();
|
||||
public $selectionTranslationFixBuilder = [];
|
||||
|
||||
/**
|
||||
* Sort Builder
|
||||
@ -367,7 +368,7 @@ class Fields extends Structure
|
||||
* @var array
|
||||
* @deprecated 3.3 Use CFactory::_('Compiler.Builder.Sort')->get($key);
|
||||
*/
|
||||
public $sortBuilder = array();
|
||||
public $sortBuilder = [];
|
||||
|
||||
/**
|
||||
* Search Builder
|
||||
@ -375,7 +376,7 @@ class Fields extends Structure
|
||||
* @var array
|
||||
* @deprecated 3.3 Use CFactory::_('Compiler.Builder.Search')->get($key);
|
||||
*/
|
||||
public $searchBuilder = array();
|
||||
public $searchBuilder = [];
|
||||
|
||||
/**
|
||||
* Filter Builder
|
||||
@ -383,7 +384,7 @@ class Fields extends Structure
|
||||
* @var array
|
||||
* @deprecated 3.3 Use CFactory::_('Compiler.Builder.Filter')->get($key);
|
||||
*/
|
||||
public $filterBuilder = array();
|
||||
public $filterBuilder = [];
|
||||
|
||||
/**
|
||||
* Set Group Control
|
||||
@ -391,7 +392,7 @@ class Fields extends Structure
|
||||
* @var array
|
||||
* @deprecated 3.3 Use CFactory::_('Compiler.Builder.Field.Group.Control')->get($key);
|
||||
*/
|
||||
public $setGroupControl = array();
|
||||
public $setGroupControl = [];
|
||||
|
||||
/**
|
||||
* Set Field Names
|
||||
@ -399,7 +400,7 @@ class Fields extends Structure
|
||||
* @var array
|
||||
* @deprecated 3.3 Use CFactory::_('Compiler.Builder.Field.Names')->get($key);
|
||||
*/
|
||||
public $fieldsNames = array();
|
||||
public $fieldsNames = [];
|
||||
|
||||
/**
|
||||
* Default Fields set to publishing
|
||||
@ -407,7 +408,7 @@ class Fields extends Structure
|
||||
* @var array
|
||||
* @deprecated 3.3 Use CFactory::_('Compiler.Builder.New.Publishing.Fields')->set($key);
|
||||
*/
|
||||
public $newPublishingFields = array();
|
||||
public $newPublishingFields = [];
|
||||
|
||||
/**
|
||||
* Default Fields set to publishing
|
||||
@ -415,7 +416,7 @@ class Fields extends Structure
|
||||
* @var array
|
||||
* @deprecated 3.3 Use CFactory::_('Compiler.Builder.Moved.Publishing.Fields')->set($key);
|
||||
*/
|
||||
public $movedPublishingFields = array();
|
||||
public $movedPublishingFields = [];
|
||||
|
||||
/**
|
||||
* set the Field set of a view
|
||||
@ -731,10 +732,10 @@ class Fields extends Structure
|
||||
{
|
||||
// set notice that we could not get a valid string from the target
|
||||
$this->app->enqueueMessage(
|
||||
JText::sprintf('<hr /><h3>%s Warning</h3>', __CLASS__), 'Error'
|
||||
Text::sprintf('<hr /><h3>%s Warning</h3>', __CLASS__), 'Error'
|
||||
);
|
||||
$this->app->enqueueMessage(
|
||||
JText::sprintf(
|
||||
Text::sprintf(
|
||||
'Use of a deprecated method (%s)!', __METHOD__
|
||||
), 'Error'
|
||||
);
|
||||
@ -853,6 +854,42 @@ class Fields extends Structure
|
||||
*
|
||||
*/
|
||||
public function setFieldFilterSet(&$nameSingleCode, &$nameListCode)
|
||||
{
|
||||
if (CFactory::_('Config')->get('joomla_version', 3) == 3)
|
||||
{
|
||||
return $this->setFieldFilterSetJ3($nameSingleCode, $nameListCode);
|
||||
}
|
||||
return $this->setFieldFilterSetJ4($nameSingleCode, $nameListCode);
|
||||
}
|
||||
|
||||
/**
|
||||
* set the Filter List set of a view
|
||||
*
|
||||
* @param string $nameSingleCode The single view name
|
||||
* @param string $nameListCode The list view name
|
||||
*
|
||||
* @return string The fields set in xml
|
||||
*
|
||||
*/
|
||||
public function setFieldFilterListSet(&$nameSingleCode, &$nameListCode)
|
||||
{
|
||||
if (CFactory::_('Config')->get('joomla_version', 3) == 3)
|
||||
{
|
||||
return $this->setFieldFilterListSetJ3($nameSingleCode, $nameListCode);
|
||||
}
|
||||
return $this->setFieldFilterListSetJ4($nameSingleCode, $nameListCode);
|
||||
}
|
||||
|
||||
/**
|
||||
* set the Filter Field set of a view
|
||||
*
|
||||
* @param string $nameSingleCode The single view name
|
||||
* @param string $nameListCode The list view name
|
||||
*
|
||||
* @return string The fields set in xml
|
||||
*
|
||||
*/
|
||||
public function setFieldFilterSetJ3(&$nameSingleCode, &$nameListCode)
|
||||
{
|
||||
// check if this is the above/new filter option
|
||||
if (CFactory::_('Compiler.Builder.Admin.Filter.Type')->get($nameListCode, 1) == 2)
|
||||
@ -879,7 +916,7 @@ class Fields extends Structure
|
||||
. ' items. Prefix with ID: to search for an item by ID.'
|
||||
);
|
||||
// now build the XML
|
||||
$field_filter_sets = array();
|
||||
$field_filter_sets = [];
|
||||
$field_filter_sets[] = Indent::_(1) . '<fields name="filter">';
|
||||
// we first add the search
|
||||
$field_filter_sets[] = Indent::_(2) . '<field';
|
||||
@ -1035,7 +1072,7 @@ class Fields extends Structure
|
||||
* @return string The fields set in xml
|
||||
*
|
||||
*/
|
||||
public function setFieldFilterListSet(&$nameSingleCode, &$nameListCode)
|
||||
public function setFieldFilterListSetJ3(&$nameSingleCode, &$nameListCode)
|
||||
{
|
||||
// check if this is the above/new filter option
|
||||
if (CFactory::_('Compiler.Builder.Admin.Filter.Type')->get($nameListCode, 1) == 2)
|
||||
@ -1043,7 +1080,7 @@ class Fields extends Structure
|
||||
// keep track of all fields already added
|
||||
$donelist = array('ordering' => true, 'id' => true);
|
||||
// now build the XML
|
||||
$list_sets = array();
|
||||
$list_sets = [];
|
||||
$list_sets[] = Indent::_(1) . '<fields name="list">';
|
||||
$list_sets[] = Indent::_(2) . '<field';
|
||||
$list_sets[] = Indent::_(3) . 'name="fullordering"';
|
||||
@ -1149,6 +1186,309 @@ class Fields extends Structure
|
||||
return '';
|
||||
}
|
||||
|
||||
/**
|
||||
* set the Filter Field set of a view
|
||||
*
|
||||
* @param string $nameSingleCode The single view name
|
||||
* @param string $nameListCode The list view name
|
||||
*
|
||||
* @return string The fields set in xml
|
||||
*
|
||||
*/
|
||||
public function setFieldFilterSetJ4(&$nameSingleCode, &$nameListCode)
|
||||
{
|
||||
// check if this is the above/new filter option
|
||||
if (CFactory::_('Compiler.Builder.Admin.Filter.Type')->get($nameListCode, 1) == 2)
|
||||
{
|
||||
// we first create the file
|
||||
$target = ['admin' => 'filter_' . $nameListCode];
|
||||
CFactory::_('Utilities.Structure')->build(
|
||||
$target, 'filter'
|
||||
);
|
||||
// the search language string
|
||||
$lang_search = CFactory::_('Config')->lang_prefix . '_FILTER_SEARCH';
|
||||
// and to translation
|
||||
CFactory::_('Language')->set(
|
||||
CFactory::_('Config')->lang_target, $lang_search, 'Search'
|
||||
. StringHelper::safe($nameListCode, 'w')
|
||||
);
|
||||
// the search description language string
|
||||
$lang_search_desc = CFactory::_('Config')->lang_prefix . '_FILTER_SEARCH_'
|
||||
. strtoupper($nameListCode);
|
||||
// and to translation
|
||||
CFactory::_('Language')->set(
|
||||
CFactory::_('Config')->lang_target, $lang_search_desc, 'Search the '
|
||||
. StringHelper::safe($nameSingleCode, 'w')
|
||||
. ' items. Prefix with ID: to search for an item by ID.'
|
||||
);
|
||||
// now build the XML
|
||||
$field_filter_sets = [];
|
||||
$field_filter_sets[] = Indent::_(1) . '<fields name="filter">';
|
||||
// we first add the search
|
||||
$field_filter_sets[] = Indent::_(2) . '<field';
|
||||
$field_filter_sets[] = Indent::_(3) . 'type="text"';
|
||||
$field_filter_sets[] = Indent::_(3) . 'name="search"';
|
||||
$field_filter_sets[] = Indent::_(3) . 'inputmode="search"';
|
||||
$field_filter_sets[] = Indent::_(3)
|
||||
. 'label="' . $lang_search . '"';
|
||||
$field_filter_sets[] = Indent::_(3)
|
||||
. 'description="' . $lang_search_desc . '"';
|
||||
$field_filter_sets[] = Indent::_(3) . 'hint="JSEARCH_FILTER"';
|
||||
$field_filter_sets[] = Indent::_(2) . '/>';
|
||||
// add the published filter if published is not set
|
||||
if (!CFactory::_('Compiler.Builder.Field.Names')->isString($nameSingleCode . '.published'))
|
||||
{
|
||||
// the published language string
|
||||
$lang_published = CFactory::_('Config')->lang_prefix . '_FILTER_PUBLISHED';
|
||||
// and to translation
|
||||
CFactory::_('Language')->set(
|
||||
CFactory::_('Config')->lang_target, $lang_published, 'Status'
|
||||
);
|
||||
// the published description language string
|
||||
$lang_published_desc = CFactory::_('Config')->lang_prefix . '_FILTER_PUBLISHED_'
|
||||
. strtoupper($nameListCode);
|
||||
// and to translation
|
||||
CFactory::_('Language')->set(
|
||||
CFactory::_('Config')->lang_target, $lang_published_desc, 'Status options for '
|
||||
. StringHelper::safe($nameListCode, 'w')
|
||||
);
|
||||
$field_filter_sets[] = Indent::_(2) . '<field';
|
||||
$field_filter_sets[] = Indent::_(3) . 'type="status"';
|
||||
$field_filter_sets[] = Indent::_(3) . 'name="published"';
|
||||
$field_filter_sets[] = Indent::_(3)
|
||||
. 'label="' . $lang_published . '"';
|
||||
$field_filter_sets[] = Indent::_(3)
|
||||
. 'description="' . $lang_published_desc . '"';
|
||||
$field_filter_sets[] = Indent::_(3)
|
||||
. 'class="js-select-submit-on-change"';
|
||||
$field_filter_sets[] = Indent::_(2) . '>';
|
||||
$field_filter_sets[] = Indent::_(3)
|
||||
. '<option value="">JOPTION_SELECT_PUBLISHED</option>';
|
||||
$field_filter_sets[] = Indent::_(2) . '</field>';
|
||||
}
|
||||
// add the category if found
|
||||
if (CFactory::_('Compiler.Builder.Category')->exists("{$nameListCode}.extension")
|
||||
&& CFactory::_('Compiler.Builder.Category')->get("{$nameListCode}.filter", 0) >= 1)
|
||||
{
|
||||
$field_filter_sets[] = Indent::_(2) . '<field';
|
||||
$field_filter_sets[] = Indent::_(3) . 'type="category"';
|
||||
$field_filter_sets[] = Indent::_(3) . 'name="category_id"';
|
||||
$field_filter_sets[] = Indent::_(3)
|
||||
. 'label="' . CFactory::_('Compiler.Builder.Category')->get("{$nameListCode}.name", 'error')
|
||||
. '"';
|
||||
$field_filter_sets[] = Indent::_(3)
|
||||
. 'description="JOPTION_FILTER_CATEGORY_DESC"';
|
||||
$field_filter_sets[] = Indent::_(3) . 'multiple="true"';
|
||||
$field_filter_sets[] = Indent::_(3)
|
||||
. 'class="js-select-submit-on-change"';
|
||||
$field_filter_sets[] = Indent::_(3) . 'extension="'
|
||||
. CFactory::_('Compiler.Builder.Category')->get("{$nameListCode}.extension") . '"';
|
||||
$field_filter_sets[] = Indent::_(3)
|
||||
. 'layout="joomla.form.field.list-fancy-select"';
|
||||
// TODO NOT SURE IF THIS SHOULD BE STATIC
|
||||
$field_filter_sets[] = Indent::_(3) . 'published="0,1,2"';
|
||||
$field_filter_sets[] = Indent::_(2) . '/>';
|
||||
}
|
||||
// add the access filter if this view has access
|
||||
// and if access manually is not set
|
||||
if (CFactory::_('Compiler.Builder.Access.Switch')->exists($nameSingleCode)
|
||||
&& !CFactory::_('Compiler.Builder.Field.Names')->isString($nameSingleCode . '.access'))
|
||||
{
|
||||
$field_filter_sets[] = Indent::_(2) . '<field';
|
||||
$field_filter_sets[] = Indent::_(3) . 'type="accesslevel"';
|
||||
$field_filter_sets[] = Indent::_(3) . 'name="access"';
|
||||
$field_filter_sets[] = Indent::_(3)
|
||||
. 'label="JGRID_HEADING_ACCESS"';
|
||||
$field_filter_sets[] = Indent::_(3)
|
||||
. 'hint="JOPTION_SELECT_ACCESS"';
|
||||
$field_filter_sets[] = Indent::_(3) . 'multiple="true"';
|
||||
$field_filter_sets[] = Indent::_(3)
|
||||
. 'class="js-select-submit-on-change"';
|
||||
$field_filter_sets[] = Indent::_(3)
|
||||
. 'layout="joomla.form.field.list-fancy-select"';
|
||||
$field_filter_sets[] = Indent::_(2) . '/>';
|
||||
}
|
||||
// now add the dynamic fields
|
||||
if (CFactory::_('Compiler.Builder.Filter')->exists($nameListCode))
|
||||
{
|
||||
foreach (CFactory::_('Compiler.Builder.Filter')->get($nameListCode) as $n => $filter)
|
||||
{
|
||||
if ($filter['type'] != 'category')
|
||||
{
|
||||
$field_filter_sets[] = Indent::_(2) . '<field';
|
||||
// if this is a custom field
|
||||
if (ArrayHelper::check($filter['custom']))
|
||||
{
|
||||
// we use the field type from the custom field
|
||||
$field_filter_sets[] = Indent::_(3) . 'type="'
|
||||
. $filter['type'] . '"';
|
||||
// set css classname of this field
|
||||
$filter_class = ucfirst((string) $filter['type']);
|
||||
}
|
||||
else
|
||||
{
|
||||
// we use the filter field type that was build
|
||||
$field_filter_sets[] = Indent::_(3) . 'type="'
|
||||
. $filter['filter_type'] . '"';
|
||||
// set css classname of this field
|
||||
$filter_class = ucfirst((string) $filter['filter_type']);
|
||||
}
|
||||
|
||||
$field_filter_sets[] = Indent::_(3) . 'name="'
|
||||
. $filter['code'] . '"';
|
||||
$field_filter_sets[] = Indent::_(3) . 'label="'
|
||||
. $filter['label'] . '"';
|
||||
|
||||
// if this is a multi field
|
||||
if ($filter['multi'] == 2)
|
||||
{
|
||||
$field_filter_sets[] = Indent::_(3) . 'layout="joomla.form.field.list-fancy-select"';
|
||||
$field_filter_sets[] = Indent::_(3) . 'multiple="true"';
|
||||
if (isset($filter['lang_select']))
|
||||
{
|
||||
$field_filter_sets[] = Indent::_(3) . 'hint="' . $filter['lang_select'] . '"';
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$field_filter_sets[] = Indent::_(3) . 'multiple="false"';
|
||||
}
|
||||
|
||||
// we add the on change css class
|
||||
$field_filter_sets[] = Indent::_(3) . 'class="js-select-submit-on-change"';
|
||||
$field_filter_sets[] = Indent::_(2) . '/>';
|
||||
}
|
||||
}
|
||||
}
|
||||
$field_filter_sets[] = Indent::_(2)
|
||||
. '<input type="hidden" name="form_submited" value="1"/>';
|
||||
$field_filter_sets[] = Indent::_(1) . '</fields>';
|
||||
|
||||
// now update the file
|
||||
return implode(PHP_EOL, $field_filter_sets);
|
||||
}
|
||||
|
||||
return '';
|
||||
}
|
||||
|
||||
/**
|
||||
* set the Filter List set of a view
|
||||
*
|
||||
* @param string $nameSingleCode The single view name
|
||||
* @param string $nameListCode The list view name
|
||||
*
|
||||
* @return string The fields set in xml
|
||||
*
|
||||
*/
|
||||
public function setFieldFilterListSetJ4(&$nameSingleCode, &$nameListCode)
|
||||
{
|
||||
// check if this is the above/new filter option
|
||||
if (CFactory::_('Compiler.Builder.Admin.Filter.Type')->get($nameListCode, 1) == 2)
|
||||
{
|
||||
// keep track of all fields already added
|
||||
$donelist = ['ordering' => true, 'id' => true];
|
||||
// now build the XML
|
||||
$list_sets = [];
|
||||
$list_sets[] = Indent::_(1) . '<fields name="list">';
|
||||
$list_sets[] = Indent::_(2) . '<field';
|
||||
$list_sets[] = Indent::_(3) . 'name="fullordering"';
|
||||
$list_sets[] = Indent::_(3) . 'type="list"';
|
||||
$list_sets[] = Indent::_(3)
|
||||
. 'label="JGLOBAL_SORT_BY"';
|
||||
$list_sets[] = Indent::_(3) . 'class="js-select-submit-on-change"';
|
||||
// add dynamic ordering (Admin view)
|
||||
$default_ordering = $this->getListViewDefaultOrdering(
|
||||
$nameListCode
|
||||
);
|
||||
// set the default ordering
|
||||
$list_sets[] = Indent::_(3) . 'default="'
|
||||
. $default_ordering['name'] . ' '
|
||||
. $default_ordering['direction'] . '"';
|
||||
$list_sets[] = Indent::_(3) . 'validate="options"';
|
||||
$list_sets[] = Indent::_(2) . '>';
|
||||
$list_sets[] = Indent::_(3)
|
||||
. '<option value="">JGLOBAL_SORT_BY</option>';
|
||||
$list_sets[] = Indent::_(3)
|
||||
. '<option value="a.ordering ASC">JGRID_HEADING_ORDERING_ASC</option>';
|
||||
$list_sets[] = Indent::_(3)
|
||||
. '<option value="a.ordering DESC">JGRID_HEADING_ORDERING_DESC</option>';
|
||||
// add the published filter if published is not set
|
||||
if (!CFactory::_('Compiler.Builder.Field.Names')->isString($nameSingleCode . '.published'))
|
||||
{
|
||||
// add to done list
|
||||
$donelist['published'] = true;
|
||||
// add to xml :)
|
||||
$list_sets[] = Indent::_(3)
|
||||
. '<option value="a.published ASC">JSTATUS_ASC</option>';
|
||||
$list_sets[] = Indent::_(3)
|
||||
. '<option value="a.published DESC">JSTATUS_DESC</option>';
|
||||
}
|
||||
|
||||
// add the rest of the set filters
|
||||
if (CFactory::_('Compiler.Builder.Sort')->exists($nameListCode))
|
||||
{
|
||||
foreach (CFactory::_('Compiler.Builder.Sort')->get($nameListCode) as $filter)
|
||||
{
|
||||
if (!isset($donelist[$filter['code']]))
|
||||
{
|
||||
if ($filter['type'] === 'category')
|
||||
{
|
||||
$list_sets[] = Indent::_(3)
|
||||
. '<option value="category_title ASC">'
|
||||
. $filter['lang_asc'] . '</option>';
|
||||
$list_sets[] = Indent::_(3)
|
||||
. '<option value="category_title DESC">'
|
||||
. $filter['lang_desc'] . '</option>';
|
||||
}
|
||||
elseif (ArrayHelper::check(
|
||||
$filter['custom']
|
||||
))
|
||||
{
|
||||
$list_sets[] = Indent::_(3) . '<option value="'
|
||||
. $filter['custom']['db'] . '.'
|
||||
. $filter['custom']['text'] . ' ASC">'
|
||||
. $filter['lang_asc'] . '</option>';
|
||||
$list_sets[] = Indent::_(3) . '<option value="'
|
||||
. $filter['custom']['db'] . '.'
|
||||
. $filter['custom']['text'] . ' DESC">'
|
||||
. $filter['lang_desc'] . '</option>';
|
||||
}
|
||||
else
|
||||
{
|
||||
$list_sets[] = Indent::_(3) . '<option value="a.'
|
||||
. $filter['code'] . ' ASC">'
|
||||
. $filter['lang_asc'] . '</option>';
|
||||
$list_sets[] = Indent::_(3) . '<option value="a.'
|
||||
. $filter['code'] . ' DESC">'
|
||||
. $filter['lang_desc'] . '</option>';
|
||||
}
|
||||
// do not add again
|
||||
$donelist[$filter['code']] = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$list_sets[] = Indent::_(3)
|
||||
. '<option value="a.id ASC">JGRID_HEADING_ID_ASC</option>';
|
||||
$list_sets[] = Indent::_(3)
|
||||
. '<option value="a.id DESC">JGRID_HEADING_ID_DESC</option>';
|
||||
$list_sets[] = Indent::_(2) . '</field>' . PHP_EOL;
|
||||
|
||||
$list_sets[] = Indent::_(2) . '<field';
|
||||
$list_sets[] = Indent::_(3) . 'name="limit"';
|
||||
$list_sets[] = Indent::_(3) . 'type="limitbox"';
|
||||
$list_sets[] = Indent::_(3) . 'label="JGLOBAL_LIST_LIMIT"';
|
||||
$list_sets[] = Indent::_(3) . 'default="25"';
|
||||
$list_sets[] = Indent::_(3) . 'class="js-select-submit-on-change"';
|
||||
$list_sets[] = Indent::_(2) . '/>';
|
||||
$list_sets[] = Indent::_(1) . '</fields>';
|
||||
|
||||
return implode(PHP_EOL, $list_sets);
|
||||
}
|
||||
|
||||
return '';
|
||||
}
|
||||
|
||||
/**
|
||||
* set Custom Field for Filter
|
||||
*
|
||||
@ -1167,7 +1507,7 @@ class Fields extends Structure
|
||||
// start loading the field type
|
||||
// $this->fileContentDynamic['customfilterfield_'
|
||||
// . $filter['filter_type']]
|
||||
// = array();
|
||||
// = [];
|
||||
// JPREFIX <<DYNAMIC>>>
|
||||
CFactory::_('Compiler.Builder.Content.Multi')->set('customfilterfield_' . $filter['filter_type'] . '|JPREFIX', 'J');
|
||||
// Type <<<DYNAMIC>>>
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user