Update 2024-09-20 03:29:01

This commit is contained in:
Robot 2024-09-20 03:29:00 +02:00
parent c5c80e3482
commit 74e964753a
Signed by: Robot
GPG Key ID: 14DECD44E7E1BB95
38 changed files with 179 additions and 207 deletions

View File

@ -398,13 +398,13 @@ final class Infusion
$code[] = 'namespace ' . $power->_namespace . ';' . PHP_EOL; $code[] = 'namespace ' . $power->_namespace . ';' . PHP_EOL;
// check if we have header data // check if we have header data
if (StringHelper::check($power->head)) if (isset($power->head) && StringHelper::check($power->head))
{ {
$code[] = PHP_EOL . $power->head; $code[] = PHP_EOL . $power->head;
} }
// add description if set // add description if set
if (StringHelper::check($power->description)) if (isset($power->description) && StringHelper::check($power->description))
{ {
// check if this is escaped // check if this is escaped
if (strpos((string) $power->description, '/*') === false) if (strpos((string) $power->description, '/*') === false)
@ -419,13 +419,13 @@ final class Infusion
$declaration = $power->type . ' ' . $power->class_name; $declaration = $power->type . ' ' . $power->class_name;
// check if we have extends // check if we have extends
if (StringHelper::check($power->extends_name)) if (isset($power->extends_name) && StringHelper::check($power->extends_name))
{ {
$declaration .= ' extends ' . $power->extends_name; $declaration .= ' extends ' . $power->extends_name;
} }
// check if we have implements // check if we have implements
if (ArrayHelper::check($power->implement_names)) if (isset($power->implement_names) && ArrayHelper::check($power->implement_names))
{ {
$declaration .= ' implements ' . implode(', ', $power->implement_names); $declaration .= ' implements ' . implode(', ', $power->implement_names);
} }
@ -434,7 +434,7 @@ final class Infusion
$code[] = '{'; $code[] = '{';
// add the main code if set // add the main code if set
if (StringHelper::check($power->main_class_code)) if (isset($power->main_class_code) && StringHelper::check($power->main_class_code))
{ {
$code[] = $power->main_class_code; $code[] = $power->main_class_code;
} }

View File

@ -364,13 +364,13 @@
$code[] = 'namespace ' . $power->_namespace . ';' . PHP_EOL; $code[] = 'namespace ' . $power->_namespace . ';' . PHP_EOL;
// check if we have header data // check if we have header data
if (StringHelper::check($power->head)) if (isset($power->head) && StringHelper::check($power->head))
{ {
$code[] = PHP_EOL . $power->head; $code[] = PHP_EOL . $power->head;
} }
// add description if set // add description if set
if (StringHelper::check($power->description)) if (isset($power->description) && StringHelper::check($power->description))
{ {
// check if this is escaped // check if this is escaped
if (strpos((string) $power->description, '/*') === false) if (strpos((string) $power->description, '/*') === false)
@ -385,13 +385,13 @@
$declaration = $power->type . ' ' . $power->class_name; $declaration = $power->type . ' ' . $power->class_name;
// check if we have extends // check if we have extends
if (StringHelper::check($power->extends_name)) if (isset($power->extends_name) && StringHelper::check($power->extends_name))
{ {
$declaration .= ' extends ' . $power->extends_name; $declaration .= ' extends ' . $power->extends_name;
} }
// check if we have implements // check if we have implements
if (ArrayHelper::check($power->implement_names)) if (isset($power->implement_names) && ArrayHelper::check($power->implement_names))
{ {
$declaration .= ' implements ' . implode(', ', $power->implement_names); $declaration .= ' implements ' . implode(', ', $power->implement_names);
} }
@ -400,7 +400,7 @@
$code[] = '{'; $code[] = '{';
// add the main code if set // add the main code if set
if (StringHelper::check($power->main_class_code)) if (isset($power->main_class_code) && StringHelper::check($power->main_class_code))
{ {
$code[] = $power->main_class_code; $code[] = $power->main_class_code;
} }

View File

@ -154,7 +154,7 @@ final class InputButton implements InputButtonInterface
. "\$button_code_name = \$this->getAttribute('name');"; . "\$button_code_name = \$this->getAttribute('name');";
$addButton[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__) $addButton[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__)
. " get the input from url"; . " get the input from url";
$addButton[] = Indent::_(3) . "\$app = Factory::getApplication();"; $addButton[] = Indent::_(3) . "\$app = Joomla__"."_39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication();";
$addButton[] = Indent::_(3) . "\$jinput = \$app->input;"; $addButton[] = Indent::_(3) . "\$jinput = \$app->input;";
$addButton[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__) $addButton[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__)
. " get the view name & id"; . " get the view name & id";
@ -181,7 +181,7 @@ final class InputButton implements InputButtonInterface
$addButton[] = Indent::_(4) . "//" . Line::_(__Line__, __Class__) $addButton[] = Indent::_(4) . "//" . Line::_(__Line__, __Class__)
. " get the return value."; . " get the return value.";
$addButton[] = Indent::_(4) $addButton[] = Indent::_(4)
. "\$_uri = (string) \Joomla\CMS\Uri\Uri::getInstance();"; . "\$_uri = (string) Joomla__"."_eecc143e_b5cf_4c33_ba4d_97da1df61422___Power::getInstance();";
$addButton[] = Indent::_(4) $addButton[] = Indent::_(4)
. "\$_return = urlencode(base64_encode(\$_uri));"; . "\$_return = urlencode(base64_encode(\$_uri));";
$addButton[] = Indent::_(4) . "//" . Line::_(__Line__, __Class__) $addButton[] = Indent::_(4) . "//" . Line::_(__Line__, __Class__)
@ -206,7 +206,7 @@ final class InputButton implements InputButtonInterface
$addButton[] = Indent::_(4) . "//" . Line::_(__Line__, __Class__) $addButton[] = Indent::_(4) . "//" . Line::_(__Line__, __Class__)
. " get the return value."; . " get the return value.";
$addButton[] = Indent::_(4) $addButton[] = Indent::_(4)
. "\$_uri = (string) \Joomla\CMS\Uri\Uri::getInstance();"; . "\$_uri = (string) Joomla__"."_eecc143e_b5cf_4c33_ba4d_97da1df61422___Power::getInstance();";
$addButton[] = Indent::_(4) $addButton[] = Indent::_(4)
. "\$_return = urlencode(base64_encode(\$_uri));"; . "\$_return = urlencode(base64_encode(\$_uri));";
$addButton[] = Indent::_(4) . "//" . Line::_(__Line__, __Class__) $addButton[] = Indent::_(4) . "//" . Line::_(__Line__, __Class__)
@ -231,7 +231,7 @@ final class InputButton implements InputButtonInterface
. "\$button_label = ucfirst(strtolower(\$button_label));"; . "\$button_label = ucfirst(strtolower(\$button_label));";
$addButton[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__) $addButton[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__)
. " get user object"; . " get user object";
$addButton[] = Indent::_(3) . "\$user = Factory::getApplication()->getIdentity();"; $addButton[] = Indent::_(3) . "\$user = Joomla__"."_39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication()->getIdentity();";
$addButton[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__) $addButton[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__)
. " only add if user allowed to create " . $fieldData['view']; . " only add if user allowed to create " . $fieldData['view'];
// check if the item has permissions. // check if the item has permissions.
@ -272,7 +272,11 @@ final class InputButton implements InputButtonInterface
$addButton[] = Indent::_(4) . "\$script[] = \""; $addButton[] = Indent::_(4) . "\$script[] = \"";
$addButton[] = Indent::_(5) . "document.addEventListener('DOMContentLoaded', function() {"; $addButton[] = Indent::_(5) . "document.addEventListener('DOMContentLoaded', function() {";
$addButton[] = Indent::_(6) $addButton[] = Indent::_(6)
. "document.getElementById('jform_\".\$button_code_name.\"').addEventListener('change', function(e) {"; . "let \".\$button_code_name.\"Field = document.getElementById('jform_\".\$button_code_name.\"');";
$addButton[] = Indent::_(6)
. "if (!\".\$button_code_name.\"Field) { return; }";
$addButton[] = Indent::_(6)
. "\".\$button_code_name.\"Field.addEventListener('change', function(e) {";
$addButton[] = Indent::_(7) . "e.preventDefault();"; $addButton[] = Indent::_(7) . "e.preventDefault();";
$addButton[] = Indent::_(7) $addButton[] = Indent::_(7)
. "let \".\$button_code_name.\"Value = this.value;"; . "let \".\$button_code_name.\"Value = this.value;";
@ -280,7 +284,7 @@ $addButton[] = Indent::_(4) . "\$script[] = \"";
. "\".\$button_code_name.\"Button(\".\$button_code_name.\"Value);"; . "\".\$button_code_name.\"Button(\".\$button_code_name.\"Value);";
$addButton[] = Indent::_(6) . "});"; $addButton[] = Indent::_(6) . "});";
$addButton[] = Indent::_(6) $addButton[] = Indent::_(6)
. "let \".\$button_code_name.\"Value = document.getElementById('jform_\".\$button_code_name.\"').value;"; . "let \".\$button_code_name.\"Value = \".\$button_code_name.\"Field.value;";
$addButton[] = Indent::_(6) $addButton[] = Indent::_(6)
. "\".\$button_code_name.\"Button(\".\$button_code_name.\"Value);"; . "\".\$button_code_name.\"Button(\".\$button_code_name.\"Value);";
$addButton[] = Indent::_(5) . "});"; $addButton[] = Indent::_(5) . "});";
@ -324,7 +328,7 @@ $addButton[] = Indent::_(4) . "\$script[] = \"";
$addButton[] = Indent::_(4) . "//" . Line::_(__Line__, __Class__) $addButton[] = Indent::_(4) . "//" . Line::_(__Line__, __Class__)
. " Load the needed script."; . " Load the needed script.";
$addButton[] = Indent::_(4) $addButton[] = Indent::_(4)
. "\$document = Factory::getApplication()->getDocument();"; . "\$document = Joomla__"."_39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication()->getDocument();";
$addButton[] = Indent::_(4) $addButton[] = Indent::_(4)
. "\$document->addScriptDeclaration(implode(' ',\$script));"; . "\$document->addScriptDeclaration(implode(' ',\$script));";
$addButton[] = Indent::_(4) . "//" . Line::_(__Line__, __Class__) $addButton[] = Indent::_(4) . "//" . Line::_(__Line__, __Class__)

View File

@ -123,7 +123,7 @@
. "\$button_code_name = \$this->getAttribute('name');"; . "\$button_code_name = \$this->getAttribute('name');";
$addButton[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__) $addButton[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__)
. " get the input from url"; . " get the input from url";
$addButton[] = Indent::_(3) . "\$app = Factory::getApplication();"; $addButton[] = Indent::_(3) . "\$app = Joomla__"."_39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication();";
$addButton[] = Indent::_(3) . "\$jinput = \$app->input;"; $addButton[] = Indent::_(3) . "\$jinput = \$app->input;";
$addButton[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__) $addButton[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__)
. " get the view name & id"; . " get the view name & id";
@ -150,7 +150,7 @@
$addButton[] = Indent::_(4) . "//" . Line::_(__Line__, __Class__) $addButton[] = Indent::_(4) . "//" . Line::_(__Line__, __Class__)
. " get the return value."; . " get the return value.";
$addButton[] = Indent::_(4) $addButton[] = Indent::_(4)
. "\$_uri = (string) \Joomla\CMS\Uri\Uri::getInstance();"; . "\$_uri = (string) Joomla__"."_eecc143e_b5cf_4c33_ba4d_97da1df61422___Power::getInstance();";
$addButton[] = Indent::_(4) $addButton[] = Indent::_(4)
. "\$_return = urlencode(base64_encode(\$_uri));"; . "\$_return = urlencode(base64_encode(\$_uri));";
$addButton[] = Indent::_(4) . "//" . Line::_(__Line__, __Class__) $addButton[] = Indent::_(4) . "//" . Line::_(__Line__, __Class__)
@ -175,7 +175,7 @@
$addButton[] = Indent::_(4) . "//" . Line::_(__Line__, __Class__) $addButton[] = Indent::_(4) . "//" . Line::_(__Line__, __Class__)
. " get the return value."; . " get the return value.";
$addButton[] = Indent::_(4) $addButton[] = Indent::_(4)
. "\$_uri = (string) \Joomla\CMS\Uri\Uri::getInstance();"; . "\$_uri = (string) Joomla__"."_eecc143e_b5cf_4c33_ba4d_97da1df61422___Power::getInstance();";
$addButton[] = Indent::_(4) $addButton[] = Indent::_(4)
. "\$_return = urlencode(base64_encode(\$_uri));"; . "\$_return = urlencode(base64_encode(\$_uri));";
$addButton[] = Indent::_(4) . "//" . Line::_(__Line__, __Class__) $addButton[] = Indent::_(4) . "//" . Line::_(__Line__, __Class__)
@ -200,7 +200,7 @@
. "\$button_label = ucfirst(strtolower(\$button_label));"; . "\$button_label = ucfirst(strtolower(\$button_label));";
$addButton[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__) $addButton[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__)
. " get user object"; . " get user object";
$addButton[] = Indent::_(3) . "\$user = Factory::getApplication()->getIdentity();"; $addButton[] = Indent::_(3) . "\$user = Joomla__"."_39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication()->getIdentity();";
$addButton[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__) $addButton[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__)
. " only add if user allowed to create " . $fieldData['view']; . " only add if user allowed to create " . $fieldData['view'];
// check if the item has permissions. // check if the item has permissions.
@ -241,7 +241,11 @@
$addButton[] = Indent::_(4) . "\$script[] = \""; $addButton[] = Indent::_(4) . "\$script[] = \"";
$addButton[] = Indent::_(5) . "document.addEventListener('DOMContentLoaded', function() {"; $addButton[] = Indent::_(5) . "document.addEventListener('DOMContentLoaded', function() {";
$addButton[] = Indent::_(6) $addButton[] = Indent::_(6)
. "document.getElementById('jform_\".\$button_code_name.\"').addEventListener('change', function(e) {"; . "let \".\$button_code_name.\"Field = document.getElementById('jform_\".\$button_code_name.\"');";
$addButton[] = Indent::_(6)
. "if (!\".\$button_code_name.\"Field) { return; }";
$addButton[] = Indent::_(6)
. "\".\$button_code_name.\"Field.addEventListener('change', function(e) {";
$addButton[] = Indent::_(7) . "e.preventDefault();"; $addButton[] = Indent::_(7) . "e.preventDefault();";
$addButton[] = Indent::_(7) $addButton[] = Indent::_(7)
. "let \".\$button_code_name.\"Value = this.value;"; . "let \".\$button_code_name.\"Value = this.value;";
@ -249,7 +253,7 @@ $addButton[] = Indent::_(4) . "\$script[] = \"";
. "\".\$button_code_name.\"Button(\".\$button_code_name.\"Value);"; . "\".\$button_code_name.\"Button(\".\$button_code_name.\"Value);";
$addButton[] = Indent::_(6) . "});"; $addButton[] = Indent::_(6) . "});";
$addButton[] = Indent::_(6) $addButton[] = Indent::_(6)
. "let \".\$button_code_name.\"Value = document.getElementById('jform_\".\$button_code_name.\"').value;"; . "let \".\$button_code_name.\"Value = \".\$button_code_name.\"Field.value;";
$addButton[] = Indent::_(6) $addButton[] = Indent::_(6)
. "\".\$button_code_name.\"Button(\".\$button_code_name.\"Value);"; . "\".\$button_code_name.\"Button(\".\$button_code_name.\"Value);";
$addButton[] = Indent::_(5) . "});"; $addButton[] = Indent::_(5) . "});";
@ -293,7 +297,7 @@ $addButton[] = Indent::_(4) . "\$script[] = \"";
$addButton[] = Indent::_(4) . "//" . Line::_(__Line__, __Class__) $addButton[] = Indent::_(4) . "//" . Line::_(__Line__, __Class__)
. " Load the needed script."; . " Load the needed script.";
$addButton[] = Indent::_(4) $addButton[] = Indent::_(4)
. "\$document = Factory::getApplication()->getDocument();"; . "\$document = Joomla__"."_39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication()->getDocument();";
$addButton[] = Indent::_(4) $addButton[] = Indent::_(4)
. "\$document->addScriptDeclaration(implode(' ',\$script));"; . "\$document->addScriptDeclaration(implode(' ',\$script));";
$addButton[] = Indent::_(4) . "//" . Line::_(__Line__, __Class__) $addButton[] = Indent::_(4) . "//" . Line::_(__Line__, __Class__)

View File

@ -154,7 +154,7 @@ final class InputButton implements InputButtonInterface
. "\$button_code_name = \$this->getAttribute('name');"; . "\$button_code_name = \$this->getAttribute('name');";
$addButton[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__) $addButton[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__)
. " get the input from url"; . " get the input from url";
$addButton[] = Indent::_(3) . "\$app = Factory::getApplication();"; $addButton[] = Indent::_(3) . "\$app = Joomla__"."_39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication();";
$addButton[] = Indent::_(3) . "\$jinput = \$app->input;"; $addButton[] = Indent::_(3) . "\$jinput = \$app->input;";
$addButton[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__) $addButton[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__)
. " get the view name & id"; . " get the view name & id";
@ -181,7 +181,7 @@ final class InputButton implements InputButtonInterface
$addButton[] = Indent::_(4) . "//" . Line::_(__Line__, __Class__) $addButton[] = Indent::_(4) . "//" . Line::_(__Line__, __Class__)
. " get the return value."; . " get the return value.";
$addButton[] = Indent::_(4) $addButton[] = Indent::_(4)
. "\$_uri = (string) \Joomla\CMS\Uri\Uri::getInstance();"; . "\$_uri = (string) Joomla__"."_eecc143e_b5cf_4c33_ba4d_97da1df61422___Power::getInstance();";
$addButton[] = Indent::_(4) $addButton[] = Indent::_(4)
. "\$_return = urlencode(base64_encode(\$_uri));"; . "\$_return = urlencode(base64_encode(\$_uri));";
$addButton[] = Indent::_(4) . "//" . Line::_(__Line__, __Class__) $addButton[] = Indent::_(4) . "//" . Line::_(__Line__, __Class__)
@ -206,7 +206,7 @@ final class InputButton implements InputButtonInterface
$addButton[] = Indent::_(4) . "//" . Line::_(__Line__, __Class__) $addButton[] = Indent::_(4) . "//" . Line::_(__Line__, __Class__)
. " get the return value."; . " get the return value.";
$addButton[] = Indent::_(4) $addButton[] = Indent::_(4)
. "\$_uri = (string) \Joomla\CMS\Uri\Uri::getInstance();"; . "\$_uri = (string) Joomla__"."_eecc143e_b5cf_4c33_ba4d_97da1df61422___Power::getInstance();";
$addButton[] = Indent::_(4) $addButton[] = Indent::_(4)
. "\$_return = urlencode(base64_encode(\$_uri));"; . "\$_return = urlencode(base64_encode(\$_uri));";
$addButton[] = Indent::_(4) . "//" . Line::_(__Line__, __Class__) $addButton[] = Indent::_(4) . "//" . Line::_(__Line__, __Class__)
@ -231,7 +231,7 @@ final class InputButton implements InputButtonInterface
. "\$button_label = ucfirst(strtolower(\$button_label));"; . "\$button_label = ucfirst(strtolower(\$button_label));";
$addButton[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__) $addButton[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__)
. " get user object"; . " get user object";
$addButton[] = Indent::_(3) . "\$user = Factory::getApplication()->getIdentity();"; $addButton[] = Indent::_(3) . "\$user = Joomla__"."_39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication()->getIdentity();";
$addButton[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__) $addButton[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__)
. " only add if user allowed to create " . $fieldData['view']; . " only add if user allowed to create " . $fieldData['view'];
// check if the item has permissions. // check if the item has permissions.
@ -272,7 +272,11 @@ final class InputButton implements InputButtonInterface
$addButton[] = Indent::_(4) . "\$script[] = \""; $addButton[] = Indent::_(4) . "\$script[] = \"";
$addButton[] = Indent::_(5) . "document.addEventListener('DOMContentLoaded', function() {"; $addButton[] = Indent::_(5) . "document.addEventListener('DOMContentLoaded', function() {";
$addButton[] = Indent::_(6) $addButton[] = Indent::_(6)
. "document.getElementById('jform_\".\$button_code_name.\"').addEventListener('change', function(e) {"; . "let \".\$button_code_name.\"Field = document.getElementById('jform_\".\$button_code_name.\"');";
$addButton[] = Indent::_(6)
. "if (!\".\$button_code_name.\"Field) { return; }";
$addButton[] = Indent::_(6)
. "\".\$button_code_name.\"Field.addEventListener('change', function(e) {";
$addButton[] = Indent::_(7) . "e.preventDefault();"; $addButton[] = Indent::_(7) . "e.preventDefault();";
$addButton[] = Indent::_(7) $addButton[] = Indent::_(7)
. "let \".\$button_code_name.\"Value = this.value;"; . "let \".\$button_code_name.\"Value = this.value;";
@ -280,7 +284,7 @@ $addButton[] = Indent::_(4) . "\$script[] = \"";
. "\".\$button_code_name.\"Button(\".\$button_code_name.\"Value);"; . "\".\$button_code_name.\"Button(\".\$button_code_name.\"Value);";
$addButton[] = Indent::_(6) . "});"; $addButton[] = Indent::_(6) . "});";
$addButton[] = Indent::_(6) $addButton[] = Indent::_(6)
. "let \".\$button_code_name.\"Value = document.getElementById('jform_\".\$button_code_name.\"').value;"; . "let \".\$button_code_name.\"Value = \".\$button_code_name.\"Field.value;";
$addButton[] = Indent::_(6) $addButton[] = Indent::_(6)
. "\".\$button_code_name.\"Button(\".\$button_code_name.\"Value);"; . "\".\$button_code_name.\"Button(\".\$button_code_name.\"Value);";
$addButton[] = Indent::_(5) . "});"; $addButton[] = Indent::_(5) . "});";
@ -324,7 +328,7 @@ $addButton[] = Indent::_(4) . "\$script[] = \"";
$addButton[] = Indent::_(4) . "//" . Line::_(__Line__, __Class__) $addButton[] = Indent::_(4) . "//" . Line::_(__Line__, __Class__)
. " Load the needed script."; . " Load the needed script.";
$addButton[] = Indent::_(4) $addButton[] = Indent::_(4)
. "\$document = Factory::getApplication()->getDocument();"; . "\$document = Joomla__"."_39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication()->getDocument();";
$addButton[] = Indent::_(4) $addButton[] = Indent::_(4)
. "\$document->addScriptDeclaration(implode(' ',\$script));"; . "\$document->addScriptDeclaration(implode(' ',\$script));";
$addButton[] = Indent::_(4) . "//" . Line::_(__Line__, __Class__) $addButton[] = Indent::_(4) . "//" . Line::_(__Line__, __Class__)

View File

@ -123,7 +123,7 @@
. "\$button_code_name = \$this->getAttribute('name');"; . "\$button_code_name = \$this->getAttribute('name');";
$addButton[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__) $addButton[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__)
. " get the input from url"; . " get the input from url";
$addButton[] = Indent::_(3) . "\$app = Factory::getApplication();"; $addButton[] = Indent::_(3) . "\$app = Joomla__"."_39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication();";
$addButton[] = Indent::_(3) . "\$jinput = \$app->input;"; $addButton[] = Indent::_(3) . "\$jinput = \$app->input;";
$addButton[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__) $addButton[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__)
. " get the view name & id"; . " get the view name & id";
@ -150,7 +150,7 @@
$addButton[] = Indent::_(4) . "//" . Line::_(__Line__, __Class__) $addButton[] = Indent::_(4) . "//" . Line::_(__Line__, __Class__)
. " get the return value."; . " get the return value.";
$addButton[] = Indent::_(4) $addButton[] = Indent::_(4)
. "\$_uri = (string) \Joomla\CMS\Uri\Uri::getInstance();"; . "\$_uri = (string) Joomla__"."_eecc143e_b5cf_4c33_ba4d_97da1df61422___Power::getInstance();";
$addButton[] = Indent::_(4) $addButton[] = Indent::_(4)
. "\$_return = urlencode(base64_encode(\$_uri));"; . "\$_return = urlencode(base64_encode(\$_uri));";
$addButton[] = Indent::_(4) . "//" . Line::_(__Line__, __Class__) $addButton[] = Indent::_(4) . "//" . Line::_(__Line__, __Class__)
@ -175,7 +175,7 @@
$addButton[] = Indent::_(4) . "//" . Line::_(__Line__, __Class__) $addButton[] = Indent::_(4) . "//" . Line::_(__Line__, __Class__)
. " get the return value."; . " get the return value.";
$addButton[] = Indent::_(4) $addButton[] = Indent::_(4)
. "\$_uri = (string) \Joomla\CMS\Uri\Uri::getInstance();"; . "\$_uri = (string) Joomla__"."_eecc143e_b5cf_4c33_ba4d_97da1df61422___Power::getInstance();";
$addButton[] = Indent::_(4) $addButton[] = Indent::_(4)
. "\$_return = urlencode(base64_encode(\$_uri));"; . "\$_return = urlencode(base64_encode(\$_uri));";
$addButton[] = Indent::_(4) . "//" . Line::_(__Line__, __Class__) $addButton[] = Indent::_(4) . "//" . Line::_(__Line__, __Class__)
@ -200,7 +200,7 @@
. "\$button_label = ucfirst(strtolower(\$button_label));"; . "\$button_label = ucfirst(strtolower(\$button_label));";
$addButton[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__) $addButton[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__)
. " get user object"; . " get user object";
$addButton[] = Indent::_(3) . "\$user = Factory::getApplication()->getIdentity();"; $addButton[] = Indent::_(3) . "\$user = Joomla__"."_39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication()->getIdentity();";
$addButton[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__) $addButton[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__)
. " only add if user allowed to create " . $fieldData['view']; . " only add if user allowed to create " . $fieldData['view'];
// check if the item has permissions. // check if the item has permissions.
@ -241,7 +241,11 @@
$addButton[] = Indent::_(4) . "\$script[] = \""; $addButton[] = Indent::_(4) . "\$script[] = \"";
$addButton[] = Indent::_(5) . "document.addEventListener('DOMContentLoaded', function() {"; $addButton[] = Indent::_(5) . "document.addEventListener('DOMContentLoaded', function() {";
$addButton[] = Indent::_(6) $addButton[] = Indent::_(6)
. "document.getElementById('jform_\".\$button_code_name.\"').addEventListener('change', function(e) {"; . "let \".\$button_code_name.\"Field = document.getElementById('jform_\".\$button_code_name.\"');";
$addButton[] = Indent::_(6)
. "if (!\".\$button_code_name.\"Field) { return; }";
$addButton[] = Indent::_(6)
. "\".\$button_code_name.\"Field.addEventListener('change', function(e) {";
$addButton[] = Indent::_(7) . "e.preventDefault();"; $addButton[] = Indent::_(7) . "e.preventDefault();";
$addButton[] = Indent::_(7) $addButton[] = Indent::_(7)
. "let \".\$button_code_name.\"Value = this.value;"; . "let \".\$button_code_name.\"Value = this.value;";
@ -249,7 +253,7 @@ $addButton[] = Indent::_(4) . "\$script[] = \"";
. "\".\$button_code_name.\"Button(\".\$button_code_name.\"Value);"; . "\".\$button_code_name.\"Button(\".\$button_code_name.\"Value);";
$addButton[] = Indent::_(6) . "});"; $addButton[] = Indent::_(6) . "});";
$addButton[] = Indent::_(6) $addButton[] = Indent::_(6)
. "let \".\$button_code_name.\"Value = document.getElementById('jform_\".\$button_code_name.\"').value;"; . "let \".\$button_code_name.\"Value = \".\$button_code_name.\"Field.value;";
$addButton[] = Indent::_(6) $addButton[] = Indent::_(6)
. "\".\$button_code_name.\"Button(\".\$button_code_name.\"Value);"; . "\".\$button_code_name.\"Button(\".\$button_code_name.\"Value);";
$addButton[] = Indent::_(5) . "});"; $addButton[] = Indent::_(5) . "});";
@ -293,7 +297,7 @@ $addButton[] = Indent::_(4) . "\$script[] = \"";
$addButton[] = Indent::_(4) . "//" . Line::_(__Line__, __Class__) $addButton[] = Indent::_(4) . "//" . Line::_(__Line__, __Class__)
. " Load the needed script."; . " Load the needed script.";
$addButton[] = Indent::_(4) $addButton[] = Indent::_(4)
. "\$document = Factory::getApplication()->getDocument();"; . "\$document = Joomla__"."_39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication()->getDocument();";
$addButton[] = Indent::_(4) $addButton[] = Indent::_(4)
. "\$document->addScriptDeclaration(implode(' ',\$script));"; . "\$document->addScriptDeclaration(implode(' ',\$script));";
$addButton[] = Indent::_(4) . "//" . Line::_(__Line__, __Class__) $addButton[] = Indent::_(4) . "//" . Line::_(__Line__, __Class__)

View File

@ -329,10 +329,11 @@ final class ConfigFieldsets
$field['custom_value'] $field['custom_value']
)) ))
{ {
// add array if found // add array or object if found
if ((strpos((string) $field['custom_value'], '["') !== false) if (((strpos((string) $field['custom_value'], '["') !== false)
&& (strpos((string) $field['custom_value'], '"]') && (strpos((string) $field['custom_value'], '"]') !== false)) ||
!== false)) ((strpos((string) $field['custom_value'], '{"') !== false)
&& (strpos((string) $field['custom_value'], '"}') !== false)))
{ {
// load the Global checkin defautls // load the Global checkin defautls
$this->extensionsparams->add('component', '"' . $fieldName $this->extensionsparams->add('component', '"' . $fieldName

View File

@ -283,10 +283,11 @@
$field['custom_value'] $field['custom_value']
)) ))
{ {
// add array if found // add array or object if found
if ((strpos((string) $field['custom_value'], '["') !== false) if (((strpos((string) $field['custom_value'], '["') !== false)
&& (strpos((string) $field['custom_value'], '"]') && (strpos((string) $field['custom_value'], '"]') !== false)) ||
!== false)) ((strpos((string) $field['custom_value'], '{"') !== false)
&& (strpos((string) $field['custom_value'], '"}') !== false)))
{ {
// load the Global checkin defautls // load the Global checkin defautls
$this->extensionsparams->add('component', '"' . $fieldName $this->extensionsparams->add('component', '"' . $fieldName

View File

@ -2,7 +2,7 @@
/** /**
* @package Joomla.Component.Builder * @package Joomla.Component.Builder
* *
* @created 3rd September, 2020 * @created 4th September, 2020
* @author Llewellyn van der Merwe <https://dev.vdm.io> * @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder> * @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved. * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.

View File

@ -30,7 +30,7 @@
"extendsinterfaces": null, "extendsinterfaces": null,
"namespace": "[[[NamespacePrefix]]]\\Joomla\\[[[ComponentNamespace]]].Compiler.Utilities.File", "namespace": "[[[NamespacePrefix]]]\\Joomla\\[[[ComponentNamespace]]].Compiler.Utilities.File",
"description": "File helper\r\n\r\n@since 3.2.0", "description": "File helper\r\n\r\n@since 3.2.0",
"licensing_template": "\/**\r\n * @package Joomla.Component.Builder\r\n *\r\n * @created 3rd September, 2020\r\n * @author Llewellyn van der Merwe <https:\/\/dev.vdm.io>\r\n * @git Joomla Component Builder <https:\/\/git.vdm.dev\/joomla\/Component-Builder>\r\n * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.\r\n * @license GNU General Public License version 2 or later; see LICENSE.txt\r\n *\/\r\n", "licensing_template": "\/**\r\n * @package Joomla.Component.Builder\r\n *\r\n * @created 4th September, 2020\r\n * @author Llewellyn van der Merwe <https:\/\/dev.vdm.io>\r\n * @git Joomla Component Builder <https:\/\/git.vdm.dev\/joomla\/Component-Builder>\r\n * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.\r\n * @license GNU General Public License version 2 or later; see LICENSE.txt\r\n *\/\r\n",
"head": "use Joomla\\CMS\\Filesystem\\File as JoomlaFile;", "head": "use Joomla\\CMS\\Filesystem\\File as JoomlaFile;",
"composer": "" "composer": ""
} }

View File

@ -2,7 +2,7 @@
/** /**
* @package Joomla.Component.Builder * @package Joomla.Component.Builder
* *
* @created 3rd September, 2020 * @created 4th September, 2020
* @author Llewellyn van der Merwe <https://dev.vdm.io> * @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder> * @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved. * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.

View File

@ -30,7 +30,7 @@
"extendsinterfaces": null, "extendsinterfaces": null,
"namespace": "[[[NamespacePrefix]]]\\Joomla\\[[[ComponentNamespace]]].Compiler.Utilities.Folder", "namespace": "[[[NamespacePrefix]]]\\Joomla\\[[[ComponentNamespace]]].Compiler.Utilities.Folder",
"description": "Folder helper\r\n\r\n@since 3.2.0", "description": "Folder helper\r\n\r\n@since 3.2.0",
"licensing_template": "\/**\r\n * @package Joomla.Component.Builder\r\n *\r\n * @created 3rd September, 2020\r\n * @author Llewellyn van der Merwe <https:\/\/dev.vdm.io>\r\n * @git Joomla Component Builder <https:\/\/git.vdm.dev\/joomla\/Component-Builder>\r\n * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.\r\n * @license GNU General Public License version 2 or later; see LICENSE.txt\r\n *\/\r\n", "licensing_template": "\/**\r\n * @package Joomla.Component.Builder\r\n *\r\n * @created 4th September, 2020\r\n * @author Llewellyn van der Merwe <https:\/\/dev.vdm.io>\r\n * @git Joomla Component Builder <https:\/\/git.vdm.dev\/joomla\/Component-Builder>\r\n * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.\r\n * @license GNU General Public License version 2 or later; see LICENSE.txt\r\n *\/\r\n",
"head": "use Joomla\\CMS\\Filesystem\\Folder as JoomlaFolder;\r\nuse Joomla\\CMS\\Filesystem\\File as JoomlaFile;", "head": "use Joomla\\CMS\\Filesystem\\Folder as JoomlaFolder;\r\nuse Joomla\\CMS\\Filesystem\\File as JoomlaFile;",
"composer": "" "composer": ""
} }

View File

@ -87,8 +87,7 @@ final class CreateUser implements CreateUserInterface
$method[] = Indent::_(2) . "\$lang = Factory::getLanguage();"; $method[] = Indent::_(2) . "\$lang = Factory::getLanguage();";
$method[] = Indent::_(2) . "\$extension = 'com_users';"; $method[] = Indent::_(2) . "\$extension = 'com_users';";
$method[] = Indent::_(2) . "\$base_dir = JPATH_SITE;"; $method[] = Indent::_(2) . "\$base_dir = JPATH_SITE;";
$method[] = Indent::_(2) . "\$language_tag = '" . CFactory::_('Config')->get('lang_tag', 'en-GB') $method[] = Indent::_(2) . "\$language_tag = 'en-GB';";
. "';";
$method[] = Indent::_(2) . "\$reload = true;"; $method[] = Indent::_(2) . "\$reload = true;";
$method[] = Indent::_(2) $method[] = Indent::_(2)
. "\$lang->load(\$extension, \$base_dir, \$language_tag, \$reload);"; . "\$lang->load(\$extension, \$base_dir, \$language_tag, \$reload);";
@ -306,8 +305,7 @@ final class CreateUser implements CreateUserInterface
$method[] = Indent::_(2) . "\$lang = Factory::getLanguage();"; $method[] = Indent::_(2) . "\$lang = Factory::getLanguage();";
$method[] = Indent::_(2) . "\$extension = 'com_users';"; $method[] = Indent::_(2) . "\$extension = 'com_users';";
$method[] = Indent::_(2) . "\$base_dir = JPATH_ADMINISTRATOR;"; $method[] = Indent::_(2) . "\$base_dir = JPATH_ADMINISTRATOR;";
$method[] = Indent::_(2) . "\$language_tag = '" . CFactory::_('Config')->get('lang_tag', 'en-GB') $method[] = Indent::_(2) . "\$language_tag = 'en-GB';";
. "';";
$method[] = Indent::_(2) . "\$reload = true;"; $method[] = Indent::_(2) . "\$reload = true;";
$method[] = Indent::_(2) $method[] = Indent::_(2)
. "\$lang->load(\$extension, \$base_dir, \$language_tag, \$reload);"; . "\$lang->load(\$extension, \$base_dir, \$language_tag, \$reload);";

View File

@ -61,8 +61,7 @@
$method[] = Indent::_(2) . "\$lang = Factory::getLanguage();"; $method[] = Indent::_(2) . "\$lang = Factory::getLanguage();";
$method[] = Indent::_(2) . "\$extension = 'com_users';"; $method[] = Indent::_(2) . "\$extension = 'com_users';";
$method[] = Indent::_(2) . "\$base_dir = JPATH_SITE;"; $method[] = Indent::_(2) . "\$base_dir = JPATH_SITE;";
$method[] = Indent::_(2) . "\$language_tag = '" . CFactory::_('Config')->get('lang_tag', 'en-GB') $method[] = Indent::_(2) . "\$language_tag = 'en-GB';";
. "';";
$method[] = Indent::_(2) . "\$reload = true;"; $method[] = Indent::_(2) . "\$reload = true;";
$method[] = Indent::_(2) $method[] = Indent::_(2)
. "\$lang->load(\$extension, \$base_dir, \$language_tag, \$reload);"; . "\$lang->load(\$extension, \$base_dir, \$language_tag, \$reload);";
@ -280,8 +279,7 @@
$method[] = Indent::_(2) . "\$lang = Factory::getLanguage();"; $method[] = Indent::_(2) . "\$lang = Factory::getLanguage();";
$method[] = Indent::_(2) . "\$extension = 'com_users';"; $method[] = Indent::_(2) . "\$extension = 'com_users';";
$method[] = Indent::_(2) . "\$base_dir = JPATH_ADMINISTRATOR;"; $method[] = Indent::_(2) . "\$base_dir = JPATH_ADMINISTRATOR;";
$method[] = Indent::_(2) . "\$language_tag = '" . CFactory::_('Config')->get('lang_tag', 'en-GB') $method[] = Indent::_(2) . "\$language_tag = 'en-GB';";
. "';";
$method[] = Indent::_(2) . "\$reload = true;"; $method[] = Indent::_(2) . "\$reload = true;";
$method[] = Indent::_(2) $method[] = Indent::_(2)
. "\$lang->load(\$extension, \$base_dir, \$language_tag, \$reload);"; . "\$lang->load(\$extension, \$base_dir, \$language_tag, \$reload);";

View File

@ -14,7 +14,7 @@
class Sqldump #Gold { class Sqldump #Gold {
# Registry $registry # Registry $registry
# $db # $db
+ __construct(?Registry $registry = null) + __construct(Registry $registry)
+ get(array $tables, string $view, ...) : ?string + get(array $tables, string $view, ...) : ?string
# escape(string|array $value) : string|array # escape(string|array $value) : string|array
} }

View File

@ -13,7 +13,6 @@ namespace VDM\Joomla\Componentbuilder\Compiler\Model;
use Joomla\CMS\Factory; use Joomla\CMS\Factory;
use VDM\Joomla\Componentbuilder\Compiler\Factory as Compiler;
use VDM\Joomla\Componentbuilder\Compiler\Registry; use VDM\Joomla\Componentbuilder\Compiler\Registry;
use VDM\Joomla\Utilities\ArrayHelper; use VDM\Joomla\Utilities\ArrayHelper;
use VDM\Joomla\Componentbuilder\Compiler\Utilities\Placefix; use VDM\Joomla\Componentbuilder\Compiler\Utilities\Placefix;
@ -45,14 +44,13 @@ class Sqldump
/** /**
* Constructor * Constructor
* *
* @param Registry|null $registry The compiler registry object. * @param Registry $registry The compiler registry object.
* @param \JDatabaseDriver|null $db The database object.
* @since 3.2.0 * @since 3.2.0
*/ */
public function __construct(?Registry $registry = null) public function __construct(Registry $registry)
{ {
$this->registry = $registry ?: Compiler::_('Registry'); $this->registry = $registry;
$this->db = Factory::getDbo(); $this->db = Factory::getDbo();
} }

View File

@ -16,14 +16,13 @@
/** /**
* Constructor * Constructor
* *
* @param Registry|null $registry The compiler registry object. * @param Registry $registry The compiler registry object.
* @param \JDatabaseDriver|null $db The database object.
* @since 3.2.0 * @since 3.2.0
*/ */
public function __construct(?Registry $registry = null) public function __construct(Registry $registry)
{ {
$this->registry = $registry ?: Compiler::_('Registry'); $this->registry = $registry;
$this->db = Factory::getDbo(); $this->db = Factory::getDbo();
} }

View File

@ -10,10 +10,6 @@
"system_name": "JCB.Compiler.Model.Sqldump", "system_name": "JCB.Compiler.Model.Sqldump",
"type": "class", "type": "class",
"use_selection": { "use_selection": {
"use_selection0": {
"use": "d910d8b8-4c23-4f3e-8cda-438f2d2bd7ac",
"as": "Compiler"
},
"use_selection1": { "use_selection1": {
"use": "e5d9804f-0eb0-4ee9-b406-ad4e8cdbc1f6", "use": "e5d9804f-0eb0-4ee9-b406-ad4e8cdbc1f6",
"as": "default" "as": "default"

View File

@ -14,7 +14,7 @@
class Updatesql #Gold { class Updatesql #Gold {
# array $name # array $name
# Registry $registry # Registry $registry
+ __construct(?Registry $registry = null) + __construct(Registry $registry)
+ set(mixed $old, mixed $new, ...) : void + set(mixed $old, mixed $new, ...) : void
# add(string $type, int $item, ...) : void # add(string $type, int $item, ...) : void
# name(int $id) : string # name(int $id) : string

View File

@ -12,7 +12,6 @@
namespace VDM\Joomla\Componentbuilder\Compiler\Model; namespace VDM\Joomla\Componentbuilder\Compiler\Model;
use VDM\Joomla\Componentbuilder\Compiler\Factory as Compiler;
use VDM\Joomla\Componentbuilder\Compiler\Registry; use VDM\Joomla\Componentbuilder\Compiler\Registry;
use VDM\Joomla\Utilities\ArrayHelper; use VDM\Joomla\Utilities\ArrayHelper;
use VDM\Joomla\Utilities\StringHelper; use VDM\Joomla\Utilities\StringHelper;
@ -45,13 +44,13 @@ class Updatesql
/** /**
* Constructor * Constructor
* *
* @param Registry|null $registry The compiler registry object. * @param Registry $registry The compiler registry object.
* *
* @since 3.2.0 * @since 3.2.0
*/ */
public function __construct(?Registry $registry = null) public function __construct(Registry $registry)
{ {
$this->registry = $registry ?: Compiler::_('Registry'); $this->registry = $registry;
} }
/** /**

View File

@ -17,13 +17,13 @@
/** /**
* Constructor * Constructor
* *
* @param Registry|null $registry The compiler registry object. * @param Registry $registry The compiler registry object.
* *
* @since 3.2.0 * @since 3.2.0
*/ */
public function __construct(?Registry $registry = null) public function __construct(Registry $registry)
{ {
$this->registry = $registry ?: Compiler::_('Registry'); $this->registry = $registry;
} }
/** /**

View File

@ -10,10 +10,6 @@
"system_name": "JCB.Compiler.Model.Updatesql", "system_name": "JCB.Compiler.Model.Updatesql",
"type": "class", "type": "class",
"use_selection": { "use_selection": {
"use_selection0": {
"use": "d910d8b8-4c23-4f3e-8cda-438f2d2bd7ac",
"as": "Compiler"
},
"use_selection1": { "use_selection1": {
"use": "e5d9804f-0eb0-4ee9-b406-ad4e8cdbc1f6", "use": "e5d9804f-0eb0-4ee9-b406-ad4e8cdbc1f6",
"as": "default" "as": "default"

View File

@ -492,7 +492,7 @@ class Power implements PowerInterface
$this->active[$guid]->file_name = array_pop($src_array); $this->active[$guid]->file_name = array_pop($src_array);
// namespace array // namespace array
$namespace_array = [...$path_array, ...$src_array]; $namespace_array = array_merge($path_array, $src_array);
} }
else else
{ {
@ -534,12 +534,12 @@ class Power implements PowerInterface
// set the actual class namespace // set the actual class namespace
$this->active[$guid]->_namespace = implode('\\', $namespace_array); $this->active[$guid]->_namespace = implode('\\', $namespace_array);
// set global namespaces for autoloader
$this->namespace[implode('.', $path_array)] = $path_array;
// get the parent folder (the first value in array) // get the parent folder (the first value in array)
$prefix_folder = implode('.', $path_array); $prefix_folder = implode('.', $path_array);
// set global namespaces for autoloader
$this->namespace[$prefix_folder] = $path_array;
// make sub folders if still found // make sub folders if still found
$sub_folder = ''; $sub_folder = '';
if (ArrayHelper::check($src_array)) if (ArrayHelper::check($src_array))

View File

@ -454,7 +454,7 @@
$this->active[$guid]->file_name = array_pop($src_array); $this->active[$guid]->file_name = array_pop($src_array);
// namespace array // namespace array
$namespace_array = [...$path_array, ...$src_array]; $namespace_array = array_merge($path_array, $src_array);
} }
else else
{ {
@ -496,12 +496,12 @@
// set the actual class namespace // set the actual class namespace
$this->active[$guid]->_namespace = implode('\\', $namespace_array); $this->active[$guid]->_namespace = implode('\\', $namespace_array);
// set global namespaces for autoloader
$this->namespace[implode('.', $path_array)] = $path_array;
// get the parent folder (the first value in array) // get the parent folder (the first value in array)
$prefix_folder = implode('.', $path_array); $prefix_folder = implode('.', $path_array);
// set global namespaces for autoloader
$this->namespace[$prefix_folder] = $path_array;
// make sub folders if still found // make sub folders if still found
$sub_folder = ''; $sub_folder = '';
if (ArrayHelper::check($src_array)) if (ArrayHelper::check($src_array))

View File

@ -14,7 +14,7 @@
class Sql #Gold { class Sql #Gold {
# Dispenser $dispenser # Dispenser $dispenser
# Sqldump $dump # Sqldump $dump
+ __construct(?Dispenser $dispenser = null, ?Sqldump $dump = null) + __construct(Dispenser $dispenser, Sqldump $dump)
+ set(object $item) : void + set(object $item) : void
} }

View File

@ -12,7 +12,6 @@
namespace VDM\Joomla\Componentbuilder\Compiler\Model; namespace VDM\Joomla\Componentbuilder\Compiler\Model;
use VDM\Joomla\Componentbuilder\Compiler\Factory as Compiler;
use VDM\Joomla\Componentbuilder\Compiler\Customcode\Dispenser; use VDM\Joomla\Componentbuilder\Compiler\Customcode\Dispenser;
use VDM\Joomla\Componentbuilder\Compiler\Model\Sqldump; use VDM\Joomla\Componentbuilder\Compiler\Model\Sqldump;
@ -43,15 +42,15 @@ class Sql
/** /**
* Constructor * Constructor
* *
* @param Dispenser|null $dispenser The compiler customcode dispenser. * @param Dispenser $dispenser The compiler customcode dispenser.
* @param Sqldump|null $dump The compiler SQL dump. * @param Sqldump $dump The compiler SQL dump.
* *
* @since 3.2.0 * @since 3.2.0
*/ */
public function __construct(?Dispenser $dispenser = null, ?Sqldump $dump = null) public function __construct(Dispenser $dispenser, Sqldump $dump)
{ {
$this->dispenser = $dispenser ?: Compiler::_('Customcode.Dispenser'); $this->dispenser = $dispenser;
$this->dump = $dump ?: Compiler::_('Model.Sqldump'); $this->dump = $dump;
} }
/** /**
@ -92,6 +91,5 @@ class Sql
unset($item->tables); unset($item->tables);
unset($item->sql); unset($item->sql);
} }
} }

View File

@ -17,15 +17,15 @@
/** /**
* Constructor * Constructor
* *
* @param Dispenser|null $dispenser The compiler customcode dispenser. * @param Dispenser $dispenser The compiler customcode dispenser.
* @param Sqldump|null $dump The compiler SQL dump. * @param Sqldump $dump The compiler SQL dump.
* *
* @since 3.2.0 * @since 3.2.0
*/ */
public function __construct(?Dispenser $dispenser = null, ?Sqldump $dump = null) public function __construct(Dispenser $dispenser, Sqldump $dump)
{ {
$this->dispenser = $dispenser ?: Compiler::_('Customcode.Dispenser'); $this->dispenser = $dispenser;
$this->dump = $dump ?: Compiler::_('Model.Sqldump'); $this->dump = $dump;
} }
/** /**

View File

@ -10,10 +10,6 @@
"system_name": "JCB.Compiler.Model.Sql", "system_name": "JCB.Compiler.Model.Sql",
"type": "class", "type": "class",
"use_selection": { "use_selection": {
"use_selection0": {
"use": "d910d8b8-4c23-4f3e-8cda-438f2d2bd7ac",
"as": "Compiler"
},
"use_selection1": { "use_selection1": {
"use": "f1dc6430-fb54-452e-aa53-ce32ae93db88", "use": "f1dc6430-fb54-452e-aa53-ce32ae93db88",
"as": "default" "as": "default"

View File

@ -13,7 +13,7 @@
@startuml @startuml
class Sqltweaking #Gold { class Sqltweaking #Gold {
# Registry $registry # Registry $registry
+ __construct(?Registry $registry = null) + __construct(Registry $registry)
+ set(object $item) : void + set(object $item) : void
# tweak(array $settings) : void # tweak(array $settings) : void
} }

View File

@ -12,7 +12,6 @@
namespace VDM\Joomla\Componentbuilder\Compiler\Model; namespace VDM\Joomla\Componentbuilder\Compiler\Model;
use VDM\Joomla\Componentbuilder\Compiler\Factory as Compiler;
use VDM\Joomla\Componentbuilder\Compiler\Registry; use VDM\Joomla\Componentbuilder\Compiler\Registry;
use VDM\Joomla\Utilities\JsonHelper; use VDM\Joomla\Utilities\JsonHelper;
use VDM\Joomla\Utilities\ArrayHelper; use VDM\Joomla\Utilities\ArrayHelper;
@ -37,13 +36,13 @@ class Sqltweaking
/** /**
* Constructor * Constructor
* *
* @param Registry|null $registry The compiler registry object. * @param Registry $registry The compiler registry object.
* *
* @since 3.2.0 * @since 3.2.0
*/ */
public function __construct(?Registry $registry = null) public function __construct(Registry $registry)
{ {
$this->registry = $registry ?: Compiler::_('Registry'); $this->registry = $registry;
} }
/** /**

View File

@ -9,13 +9,13 @@
/** /**
* Constructor * Constructor
* *
* @param Registry|null $registry The compiler registry object. * @param Registry $registry The compiler registry object.
* *
* @since 3.2.0 * @since 3.2.0
*/ */
public function __construct(?Registry $registry = null) public function __construct(Registry $registry)
{ {
$this->registry = $registry ?: Compiler::_('Registry'); $this->registry = $registry;
} }
/** /**

View File

@ -10,10 +10,6 @@
"system_name": "JCB.Compiler.Model.Sqltweaking", "system_name": "JCB.Compiler.Model.Sqltweaking",
"type": "class", "type": "class",
"use_selection": { "use_selection": {
"use_selection0": {
"use": "d910d8b8-4c23-4f3e-8cda-438f2d2bd7ac",
"as": "Compiler"
},
"use_selection1": { "use_selection1": {
"use": "e5d9804f-0eb0-4ee9-b406-ad4e8cdbc1f6", "use": "e5d9804f-0eb0-4ee9-b406-ad4e8cdbc1f6",
"as": "default" "as": "default"

View File

@ -18,7 +18,7 @@ class Dispenser #Gold {
# Gui $gui # Gui $gui
# Hash $hash # Hash $hash
# LockBase $base64 # LockBase $base64
+ __construct(?Placeholder $placeholder = null, ?Customcode $customcode = null, ...) + __construct(Placeholder $placeholder, Customcode $customcode, ...)
+ set(string $script, string $first, ...) : bool + set(string $script, string $first, ...) : bool
+ get(string $first, string $second, ...) : mixed + get(string $first, string $second, ...) : mixed
# initHub(string $first, ?string $second = null, ...) : void # initHub(string $first, ?string $second = null, ...) : void
@ -31,11 +31,11 @@ note right of Dispenser::__construct
since: 3.2.0 since: 3.2.0
arguments: arguments:
?Placeholder $placeholder = null Placeholder $placeholder
?Customcode $customcode = null Customcode $customcode
?Gui $gui = null Gui $gui
?Hash $hash = null Hash $hash
?LockBase $base64 = null LockBase $lockbase
end note end note
note right of Dispenser::set note right of Dispenser::set

View File

@ -12,13 +12,12 @@
namespace VDM\Joomla\Componentbuilder\Compiler\Customcode; namespace VDM\Joomla\Componentbuilder\Compiler\Customcode;
use VDM\Joomla\Utilities\StringHelper;
use VDM\Joomla\Componentbuilder\Compiler\Factory as Compiler;
use VDM\Joomla\Componentbuilder\Compiler\Customcode;
use VDM\Joomla\Componentbuilder\Compiler\Placeholder; use VDM\Joomla\Componentbuilder\Compiler\Placeholder;
use VDM\Joomla\Componentbuilder\Compiler\Customcode;
use VDM\Joomla\Componentbuilder\Compiler\Customcode\Gui; use VDM\Joomla\Componentbuilder\Compiler\Customcode\Gui;
use VDM\Joomla\Componentbuilder\Compiler\Customcode\Hash; use VDM\Joomla\Componentbuilder\Compiler\Customcode\Hash;
use VDM\Joomla\Componentbuilder\Compiler\Customcode\LockBase; use VDM\Joomla\Componentbuilder\Compiler\Customcode\LockBase;
use VDM\Joomla\Utilities\StringHelper;
use VDM\Joomla\Componentbuilder\Compiler\Interfaces\Customcode\DispenserInterface; use VDM\Joomla\Componentbuilder\Compiler\Interfaces\Customcode\DispenserInterface;
@ -80,22 +79,22 @@ class Dispenser implements DispenserInterface
/** /**
* Constructor. * Constructor.
* *
* @param Placeholder|null $placeholder The compiler placeholder object. * @param Placeholder $placeholder The Placeholder Class.
* @param Customcode|null $customcode The compiler customcode object. * @param Customcode $customcode The Customcode Class.
* @param Gui|null $gui The compiler customcode gui object. * @param Gui $gui The Gui Class.
* @param Hash|null $hash The compiler customcode hash object. * @param Hash $hash The Hash Class.
* @param LockBase|null $base64 The compiler customcode lock base64 object. * @param LockBase $lockbase The LockBase Class.
* *
* @since 3.2.0 * @since 3.2.0
*/ */
public function __construct(?Placeholder $placeholder = null, ?Customcode $customcode = null, public function __construct(Placeholder $placeholder, Customcode $customcode, Gui $gui,
?Gui $gui = null, ?Hash $hash = null, ?LockBase $base64 = null) Hash $hash, LockBase $lockbase)
{ {
$this->placeholder = $placeholder ?: Compiler::_('Placeholder'); $this->placeholder = $placeholder;
$this->customcode = $customcode ?: Compiler::_('Customcode'); $this->customcode = $customcode;
$this->gui = $gui ?: Compiler::_('Customcode.Gui'); $this->gui = $gui;
$this->hash = $hash ?: Compiler::_('Customcode.Hash'); $this->hash = $hash;
$this->base64 = $base64 ?: Compiler::_('Customcode.LockBase'); $this->base64 = $lockbase;
} }
/** /**

View File

@ -49,22 +49,22 @@
/** /**
* Constructor. * Constructor.
* *
* @param Placeholder|null $placeholder The compiler placeholder object. * @param Placeholder $placeholder The Placeholder Class.
* @param Customcode|null $customcode The compiler customcode object. * @param Customcode $customcode The Customcode Class.
* @param Gui|null $gui The compiler customcode gui object. * @param Gui $gui The Gui Class.
* @param Hash|null $hash The compiler customcode hash object. * @param Hash $hash The Hash Class.
* @param LockBase|null $base64 The compiler customcode lock base64 object. * @param LockBase $lockbase The LockBase Class.
* *
* @since 3.2.0 * @since 3.2.0
*/ */
public function __construct(?Placeholder $placeholder = null, ?Customcode $customcode = null, public function __construct(Placeholder $placeholder, Customcode $customcode, Gui $gui,
?Gui $gui = null, ?Hash $hash = null, ?LockBase $base64 = null) Hash $hash, LockBase $lockbase)
{ {
$this->placeholder = $placeholder ?: Compiler::_('Placeholder'); $this->placeholder = $placeholder;
$this->customcode = $customcode ?: Compiler::_('Customcode'); $this->customcode = $customcode;
$this->gui = $gui ?: Compiler::_('Customcode.Gui'); $this->gui = $gui;
$this->hash = $hash ?: Compiler::_('Customcode.Hash'); $this->hash = $hash;
$this->base64 = $base64 ?: Compiler::_('Customcode.LockBase'); $this->base64 = $lockbase;
} }
/** /**

View File

@ -13,32 +13,28 @@
"type": "class", "type": "class",
"use_selection": { "use_selection": {
"use_selection0": { "use_selection0": {
"use": "1f28cb53-60d9-4db1-b517-3c7dc6b429ef",
"as": "default"
},
"use_selection1": {
"use": "d910d8b8-4c23-4f3e-8cda-438f2d2bd7ac",
"as": "Compiler"
},
"use_selection2": {
"use": "313b43c4-98c3-4f62-9177-2d73ec8eba31",
"as": "default"
},
"use_selection3": {
"use": "06453ada-e370-49f0-b262-e3f5a8ed0c2c", "use": "06453ada-e370-49f0-b262-e3f5a8ed0c2c",
"as": "default" "as": "default"
}, },
"use_selection4": { "use_selection1": {
"use": "313b43c4-98c3-4f62-9177-2d73ec8eba31",
"as": "default"
},
"use_selection2": {
"use": "1bd48df2-4f7e-4581-9fe9-4b54e59105e3", "use": "1bd48df2-4f7e-4581-9fe9-4b54e59105e3",
"as": "default" "as": "default"
}, },
"use_selection5": { "use_selection3": {
"use": "797579e8-b272-41ed-91de-428cb0b3e089", "use": "797579e8-b272-41ed-91de-428cb0b3e089",
"as": "default" "as": "default"
}, },
"use_selection6": { "use_selection4": {
"use": "7c07c9d6-34cd-4491-934a-ef0a83f414c0", "use": "7c07c9d6-34cd-4491-934a-ef0a83f414c0",
"as": "default" "as": "default"
},
"use_selection5": {
"use": "1f28cb53-60d9-4db1-b517-3c7dc6b429ef",
"as": "default"
} }
}, },
"extendsinterfaces": null, "extendsinterfaces": null,

View File

@ -543,14 +543,7 @@ class Config extends BaseConfig
*/ */
protected function getRemovelinebreaks(): bool protected function getRemovelinebreaks(): bool
{ {
// get posted value return (bool) true;
$value = $this->input->post->get('remove_line_breaks', 2, 'INT');
// get global
if ($value > 1)
{
return (bool) GetHelper::var('joomla_component', $this->component_id, 'id', 'remove_line_breaks');
}
return (bool) $value;
} }
/** /**

View File

@ -507,14 +507,7 @@
*/ */
protected function getRemovelinebreaks(): bool protected function getRemovelinebreaks(): bool
{ {
// get posted value return (bool) true;
$value = $this->input->post->get('remove_line_breaks', 2, 'INT');
// get global
if ($value > 1)
{
return (bool) GetHelper::var('joomla_component', $this->component_id, 'id', 'remove_line_breaks');
}
return (bool) $value;
} }
/** /**