Fixed changelog direction so newest changes is listed at top of the file. Finished the init function of super powers. Adds rest function inside super power. Adds super powers to all templates. Updates many helper class methods to now use the utility classes. Adds the method to the component entry file (as-well). Moved most methods from the compiler fields class to powers. #955 Refactored many new builder classes from the registry class. Converted the Content class to two builder classes. Adds option to add additional templates to a module. Resolves #1002 by adding STRING instead of WORD. Ported the FOF encryption class into Powers. https://git.vdm.dev/joomla/fof Changed all CSS and JS to use instead of in compiler code. Adds option to turn jQuery off if UIKIT 3 is added. Adds option to auto write injection boilerplate code in Powers area. Adds option to auto write service provider boilerplate code in the Powers area. Improved the method and all banner locations to fetch from https://git.vdm.dev/joomla/jcb-external/ instead. Major stability improvements all over the new powers complier classes. New [base Registry class](https://git.vdm.dev/joomla/super-powers/src/branch/master/src/7e822c03-1b20-41d1-9427-f5b8d5836af7) has been created specially for JCB. Remember to update all plug-ins with this version update (use the package).
This commit is contained in:
@ -14,8 +14,11 @@ defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\MVC\Model\ListModel;
|
||||
use Joomla\Utilities\ArrayHelper;
|
||||
use VDM\Joomla\Componentbuilder\Utilities\FormHelper as JCBFormHelper;
|
||||
use VDM\Joomla\Utilities\FormHelper as JCBFormHelper;
|
||||
use VDM\Joomla\Componentbuilder\Utilities\FilterHelper as JCBFilterHelper;
|
||||
use VDM\Joomla\Utilities\StringHelper;
|
||||
use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper;
|
||||
use VDM\Joomla\Utilities\JsonHelper;
|
||||
|
||||
/**
|
||||
* Language_translations List Model
|
||||
@ -218,12 +221,12 @@ class ComponentbuilderModelLanguage_translations extends ListModel
|
||||
// escape all strings if not being exported
|
||||
if (!isset($_export))
|
||||
{
|
||||
$item->source = ComponentbuilderHelper::htmlEscape($item->source, 'UTF-8', true, 150);
|
||||
$item->source = StringHelper::html($item->source, 'UTF-8', true, 150);
|
||||
}
|
||||
}
|
||||
}
|
||||
// prep the lang strings for export
|
||||
if (isset($_export) && $_export && ComponentbuilderHelper::checkArray($items))
|
||||
if (isset($_export) && $_export && UtilitiesArrayHelper::check($items))
|
||||
{
|
||||
// insure we have the same order in the languages
|
||||
$languages = ComponentbuilderHelper::getVars('language', 1, 'published', 'langtag');
|
||||
@ -251,15 +254,15 @@ class ComponentbuilderModelLanguage_translations extends ListModel
|
||||
$item->{$lanTag} = '';
|
||||
}
|
||||
// now adapt the source
|
||||
if (isset($item->translation) && ComponentbuilderHelper::checkJson($item->translation))
|
||||
if (isset($item->translation) && JsonHelper::check($item->translation))
|
||||
{
|
||||
$translations = json_decode($item->translation, true);
|
||||
if (ComponentbuilderHelper::checkArray($translations))
|
||||
if (UtilitiesArrayHelper::check($translations))
|
||||
{
|
||||
foreach ($translations as $language)
|
||||
{
|
||||
if (isset($language['translation']) && ComponentbuilderHelper::checkString($language['translation'])
|
||||
&& isset($language['language']) && ComponentbuilderHelper::checkString($language['language']))
|
||||
if (isset($language['translation']) && StringHelper::check($language['translation'])
|
||||
&& isset($language['language']) && StringHelper::check($language['language']))
|
||||
{
|
||||
$item->{$language['language']} = $language['translation'];
|
||||
}
|
||||
@ -537,7 +540,7 @@ class ComponentbuilderModelLanguage_translations extends ListModel
|
||||
// escape all strings if not being exported
|
||||
if (!isset($_export))
|
||||
{
|
||||
$item->source = ComponentbuilderHelper::htmlEscape($item->source, 'UTF-8', true, 150);
|
||||
$item->source = StringHelper::html($item->source, 'UTF-8', true, 150);
|
||||
}
|
||||
// unset the values we don't want exported.
|
||||
unset($item->asset_id);
|
||||
@ -553,7 +556,7 @@ class ComponentbuilderModelLanguage_translations extends ListModel
|
||||
}
|
||||
|
||||
// prep the lang strings for export
|
||||
if (isset($_export) && $_export && ComponentbuilderHelper::checkArray($items))
|
||||
if (isset($_export) && $_export && UtilitiesArrayHelper::check($items))
|
||||
{
|
||||
// insure we have the same order in the languages
|
||||
$languages = ComponentbuilderHelper::getVars('language', 1, 'published', 'langtag');
|
||||
@ -581,15 +584,15 @@ class ComponentbuilderModelLanguage_translations extends ListModel
|
||||
$item->{$lanTag} = '';
|
||||
}
|
||||
// now adapt the source
|
||||
if (isset($item->translation) && ComponentbuilderHelper::checkJson($item->translation))
|
||||
if (isset($item->translation) && JsonHelper::check($item->translation))
|
||||
{
|
||||
$translations = json_decode($item->translation, true);
|
||||
if (ComponentbuilderHelper::checkArray($translations))
|
||||
if (UtilitiesArrayHelper::check($translations))
|
||||
{
|
||||
foreach ($translations as $language)
|
||||
{
|
||||
if (isset($language['translation']) && ComponentbuilderHelper::checkString($language['translation'])
|
||||
&& isset($language['language']) && ComponentbuilderHelper::checkString($language['language']))
|
||||
if (isset($language['translation']) && StringHelper::check($language['translation'])
|
||||
&& isset($language['language']) && StringHelper::check($language['language']))
|
||||
{
|
||||
$item->{$language['language']} = $language['translation'];
|
||||
}
|
||||
@ -620,7 +623,7 @@ class ComponentbuilderModelLanguage_translations extends ListModel
|
||||
$headers->id = 'id';
|
||||
$headers->Source = 'Source';
|
||||
// add the languages
|
||||
if (ComponentbuilderHelper::checkArray($languages))
|
||||
if (UtilitiesArrayHelper::check($languages))
|
||||
{
|
||||
foreach ($languages as $language)
|
||||
{
|
||||
|
Reference in New Issue
Block a user