Update 2024-09-20 03:29:01
This commit is contained in:
parent
c5c80e3482
commit
74e964753a
@ -398,13 +398,13 @@ final class Infusion
|
||||
$code[] = 'namespace ' . $power->_namespace . ';' . PHP_EOL;
|
||||
|
||||
// check if we have header data
|
||||
if (StringHelper::check($power->head))
|
||||
if (isset($power->head) && StringHelper::check($power->head))
|
||||
{
|
||||
$code[] = PHP_EOL . $power->head;
|
||||
}
|
||||
|
||||
// add description if set
|
||||
if (StringHelper::check($power->description))
|
||||
if (isset($power->description) && StringHelper::check($power->description))
|
||||
{
|
||||
// check if this is escaped
|
||||
if (strpos((string) $power->description, '/*') === false)
|
||||
@ -419,13 +419,13 @@ final class Infusion
|
||||
$declaration = $power->type . ' ' . $power->class_name;
|
||||
|
||||
// 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;
|
||||
}
|
||||
|
||||
// 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);
|
||||
}
|
||||
@ -434,7 +434,7 @@ final class Infusion
|
||||
$code[] = '{';
|
||||
|
||||
// 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;
|
||||
}
|
||||
|
@ -364,13 +364,13 @@
|
||||
$code[] = 'namespace ' . $power->_namespace . ';' . PHP_EOL;
|
||||
|
||||
// check if we have header data
|
||||
if (StringHelper::check($power->head))
|
||||
if (isset($power->head) && StringHelper::check($power->head))
|
||||
{
|
||||
$code[] = PHP_EOL . $power->head;
|
||||
}
|
||||
|
||||
// add description if set
|
||||
if (StringHelper::check($power->description))
|
||||
if (isset($power->description) && StringHelper::check($power->description))
|
||||
{
|
||||
// check if this is escaped
|
||||
if (strpos((string) $power->description, '/*') === false)
|
||||
@ -385,13 +385,13 @@
|
||||
$declaration = $power->type . ' ' . $power->class_name;
|
||||
|
||||
// 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;
|
||||
}
|
||||
|
||||
// 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);
|
||||
}
|
||||
@ -400,7 +400,7 @@
|
||||
$code[] = '{';
|
||||
|
||||
// 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;
|
||||
}
|
||||
|
@ -154,7 +154,7 @@ final class InputButton implements InputButtonInterface
|
||||
. "\$button_code_name = \$this->getAttribute('name');";
|
||||
$addButton[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__)
|
||||
. " 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) . "//" . Line::_(__Line__, __Class__)
|
||||
. " get the view name & id";
|
||||
@ -181,7 +181,7 @@ final class InputButton implements InputButtonInterface
|
||||
$addButton[] = Indent::_(4) . "//" . Line::_(__Line__, __Class__)
|
||||
. " get the return value.";
|
||||
$addButton[] = Indent::_(4)
|
||||
. "\$_uri = (string) \Joomla\CMS\Uri\Uri::getInstance();";
|
||||
. "\$_uri = (string) Joomla__"."_eecc143e_b5cf_4c33_ba4d_97da1df61422___Power::getInstance();";
|
||||
$addButton[] = Indent::_(4)
|
||||
. "\$_return = urlencode(base64_encode(\$_uri));";
|
||||
$addButton[] = Indent::_(4) . "//" . Line::_(__Line__, __Class__)
|
||||
@ -206,7 +206,7 @@ final class InputButton implements InputButtonInterface
|
||||
$addButton[] = Indent::_(4) . "//" . Line::_(__Line__, __Class__)
|
||||
. " get the return value.";
|
||||
$addButton[] = Indent::_(4)
|
||||
. "\$_uri = (string) \Joomla\CMS\Uri\Uri::getInstance();";
|
||||
. "\$_uri = (string) Joomla__"."_eecc143e_b5cf_4c33_ba4d_97da1df61422___Power::getInstance();";
|
||||
$addButton[] = Indent::_(4)
|
||||
. "\$_return = urlencode(base64_encode(\$_uri));";
|
||||
$addButton[] = Indent::_(4) . "//" . Line::_(__Line__, __Class__)
|
||||
@ -231,7 +231,7 @@ final class InputButton implements InputButtonInterface
|
||||
. "\$button_label = ucfirst(strtolower(\$button_label));";
|
||||
$addButton[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__)
|
||||
. " 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__)
|
||||
. " only add if user allowed to create " . $fieldData['view'];
|
||||
// check if the item has permissions.
|
||||
@ -272,7 +272,11 @@ final class InputButton implements InputButtonInterface
|
||||
$addButton[] = Indent::_(4) . "\$script[] = \"";
|
||||
$addButton[] = Indent::_(5) . "document.addEventListener('DOMContentLoaded', function() {";
|
||||
$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)
|
||||
. "let \".\$button_code_name.\"Value = this.value;";
|
||||
@ -280,7 +284,7 @@ $addButton[] = Indent::_(4) . "\$script[] = \"";
|
||||
. "\".\$button_code_name.\"Button(\".\$button_code_name.\"Value);";
|
||||
$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)
|
||||
. "\".\$button_code_name.\"Button(\".\$button_code_name.\"Value);";
|
||||
$addButton[] = Indent::_(5) . "});";
|
||||
@ -324,7 +328,7 @@ $addButton[] = Indent::_(4) . "\$script[] = \"";
|
||||
$addButton[] = Indent::_(4) . "//" . Line::_(__Line__, __Class__)
|
||||
. " Load the needed script.";
|
||||
$addButton[] = Indent::_(4)
|
||||
. "\$document = Factory::getApplication()->getDocument();";
|
||||
. "\$document = Joomla__"."_39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication()->getDocument();";
|
||||
$addButton[] = Indent::_(4)
|
||||
. "\$document->addScriptDeclaration(implode(' ',\$script));";
|
||||
$addButton[] = Indent::_(4) . "//" . Line::_(__Line__, __Class__)
|
||||
|
@ -123,7 +123,7 @@
|
||||
. "\$button_code_name = \$this->getAttribute('name');";
|
||||
$addButton[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__)
|
||||
. " 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) . "//" . Line::_(__Line__, __Class__)
|
||||
. " get the view name & id";
|
||||
@ -150,7 +150,7 @@
|
||||
$addButton[] = Indent::_(4) . "//" . Line::_(__Line__, __Class__)
|
||||
. " get the return value.";
|
||||
$addButton[] = Indent::_(4)
|
||||
. "\$_uri = (string) \Joomla\CMS\Uri\Uri::getInstance();";
|
||||
. "\$_uri = (string) Joomla__"."_eecc143e_b5cf_4c33_ba4d_97da1df61422___Power::getInstance();";
|
||||
$addButton[] = Indent::_(4)
|
||||
. "\$_return = urlencode(base64_encode(\$_uri));";
|
||||
$addButton[] = Indent::_(4) . "//" . Line::_(__Line__, __Class__)
|
||||
@ -175,7 +175,7 @@
|
||||
$addButton[] = Indent::_(4) . "//" . Line::_(__Line__, __Class__)
|
||||
. " get the return value.";
|
||||
$addButton[] = Indent::_(4)
|
||||
. "\$_uri = (string) \Joomla\CMS\Uri\Uri::getInstance();";
|
||||
. "\$_uri = (string) Joomla__"."_eecc143e_b5cf_4c33_ba4d_97da1df61422___Power::getInstance();";
|
||||
$addButton[] = Indent::_(4)
|
||||
. "\$_return = urlencode(base64_encode(\$_uri));";
|
||||
$addButton[] = Indent::_(4) . "//" . Line::_(__Line__, __Class__)
|
||||
@ -200,7 +200,7 @@
|
||||
. "\$button_label = ucfirst(strtolower(\$button_label));";
|
||||
$addButton[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__)
|
||||
. " 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__)
|
||||
. " only add if user allowed to create " . $fieldData['view'];
|
||||
// check if the item has permissions.
|
||||
@ -241,7 +241,11 @@
|
||||
$addButton[] = Indent::_(4) . "\$script[] = \"";
|
||||
$addButton[] = Indent::_(5) . "document.addEventListener('DOMContentLoaded', function() {";
|
||||
$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)
|
||||
. "let \".\$button_code_name.\"Value = this.value;";
|
||||
@ -249,7 +253,7 @@ $addButton[] = Indent::_(4) . "\$script[] = \"";
|
||||
. "\".\$button_code_name.\"Button(\".\$button_code_name.\"Value);";
|
||||
$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)
|
||||
. "\".\$button_code_name.\"Button(\".\$button_code_name.\"Value);";
|
||||
$addButton[] = Indent::_(5) . "});";
|
||||
@ -293,7 +297,7 @@ $addButton[] = Indent::_(4) . "\$script[] = \"";
|
||||
$addButton[] = Indent::_(4) . "//" . Line::_(__Line__, __Class__)
|
||||
. " Load the needed script.";
|
||||
$addButton[] = Indent::_(4)
|
||||
. "\$document = Factory::getApplication()->getDocument();";
|
||||
. "\$document = Joomla__"."_39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication()->getDocument();";
|
||||
$addButton[] = Indent::_(4)
|
||||
. "\$document->addScriptDeclaration(implode(' ',\$script));";
|
||||
$addButton[] = Indent::_(4) . "//" . Line::_(__Line__, __Class__)
|
||||
|
@ -154,7 +154,7 @@ final class InputButton implements InputButtonInterface
|
||||
. "\$button_code_name = \$this->getAttribute('name');";
|
||||
$addButton[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__)
|
||||
. " 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) . "//" . Line::_(__Line__, __Class__)
|
||||
. " get the view name & id";
|
||||
@ -181,7 +181,7 @@ final class InputButton implements InputButtonInterface
|
||||
$addButton[] = Indent::_(4) . "//" . Line::_(__Line__, __Class__)
|
||||
. " get the return value.";
|
||||
$addButton[] = Indent::_(4)
|
||||
. "\$_uri = (string) \Joomla\CMS\Uri\Uri::getInstance();";
|
||||
. "\$_uri = (string) Joomla__"."_eecc143e_b5cf_4c33_ba4d_97da1df61422___Power::getInstance();";
|
||||
$addButton[] = Indent::_(4)
|
||||
. "\$_return = urlencode(base64_encode(\$_uri));";
|
||||
$addButton[] = Indent::_(4) . "//" . Line::_(__Line__, __Class__)
|
||||
@ -206,7 +206,7 @@ final class InputButton implements InputButtonInterface
|
||||
$addButton[] = Indent::_(4) . "//" . Line::_(__Line__, __Class__)
|
||||
. " get the return value.";
|
||||
$addButton[] = Indent::_(4)
|
||||
. "\$_uri = (string) \Joomla\CMS\Uri\Uri::getInstance();";
|
||||
. "\$_uri = (string) Joomla__"."_eecc143e_b5cf_4c33_ba4d_97da1df61422___Power::getInstance();";
|
||||
$addButton[] = Indent::_(4)
|
||||
. "\$_return = urlencode(base64_encode(\$_uri));";
|
||||
$addButton[] = Indent::_(4) . "//" . Line::_(__Line__, __Class__)
|
||||
@ -231,7 +231,7 @@ final class InputButton implements InputButtonInterface
|
||||
. "\$button_label = ucfirst(strtolower(\$button_label));";
|
||||
$addButton[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__)
|
||||
. " 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__)
|
||||
. " only add if user allowed to create " . $fieldData['view'];
|
||||
// check if the item has permissions.
|
||||
@ -272,7 +272,11 @@ final class InputButton implements InputButtonInterface
|
||||
$addButton[] = Indent::_(4) . "\$script[] = \"";
|
||||
$addButton[] = Indent::_(5) . "document.addEventListener('DOMContentLoaded', function() {";
|
||||
$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)
|
||||
. "let \".\$button_code_name.\"Value = this.value;";
|
||||
@ -280,7 +284,7 @@ $addButton[] = Indent::_(4) . "\$script[] = \"";
|
||||
. "\".\$button_code_name.\"Button(\".\$button_code_name.\"Value);";
|
||||
$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)
|
||||
. "\".\$button_code_name.\"Button(\".\$button_code_name.\"Value);";
|
||||
$addButton[] = Indent::_(5) . "});";
|
||||
@ -324,7 +328,7 @@ $addButton[] = Indent::_(4) . "\$script[] = \"";
|
||||
$addButton[] = Indent::_(4) . "//" . Line::_(__Line__, __Class__)
|
||||
. " Load the needed script.";
|
||||
$addButton[] = Indent::_(4)
|
||||
. "\$document = Factory::getApplication()->getDocument();";
|
||||
. "\$document = Joomla__"."_39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication()->getDocument();";
|
||||
$addButton[] = Indent::_(4)
|
||||
. "\$document->addScriptDeclaration(implode(' ',\$script));";
|
||||
$addButton[] = Indent::_(4) . "//" . Line::_(__Line__, __Class__)
|
||||
|
@ -123,7 +123,7 @@
|
||||
. "\$button_code_name = \$this->getAttribute('name');";
|
||||
$addButton[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__)
|
||||
. " 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) . "//" . Line::_(__Line__, __Class__)
|
||||
. " get the view name & id";
|
||||
@ -150,7 +150,7 @@
|
||||
$addButton[] = Indent::_(4) . "//" . Line::_(__Line__, __Class__)
|
||||
. " get the return value.";
|
||||
$addButton[] = Indent::_(4)
|
||||
. "\$_uri = (string) \Joomla\CMS\Uri\Uri::getInstance();";
|
||||
. "\$_uri = (string) Joomla__"."_eecc143e_b5cf_4c33_ba4d_97da1df61422___Power::getInstance();";
|
||||
$addButton[] = Indent::_(4)
|
||||
. "\$_return = urlencode(base64_encode(\$_uri));";
|
||||
$addButton[] = Indent::_(4) . "//" . Line::_(__Line__, __Class__)
|
||||
@ -175,7 +175,7 @@
|
||||
$addButton[] = Indent::_(4) . "//" . Line::_(__Line__, __Class__)
|
||||
. " get the return value.";
|
||||
$addButton[] = Indent::_(4)
|
||||
. "\$_uri = (string) \Joomla\CMS\Uri\Uri::getInstance();";
|
||||
. "\$_uri = (string) Joomla__"."_eecc143e_b5cf_4c33_ba4d_97da1df61422___Power::getInstance();";
|
||||
$addButton[] = Indent::_(4)
|
||||
. "\$_return = urlencode(base64_encode(\$_uri));";
|
||||
$addButton[] = Indent::_(4) . "//" . Line::_(__Line__, __Class__)
|
||||
@ -200,7 +200,7 @@
|
||||
. "\$button_label = ucfirst(strtolower(\$button_label));";
|
||||
$addButton[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__)
|
||||
. " 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__)
|
||||
. " only add if user allowed to create " . $fieldData['view'];
|
||||
// check if the item has permissions.
|
||||
@ -241,7 +241,11 @@
|
||||
$addButton[] = Indent::_(4) . "\$script[] = \"";
|
||||
$addButton[] = Indent::_(5) . "document.addEventListener('DOMContentLoaded', function() {";
|
||||
$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)
|
||||
. "let \".\$button_code_name.\"Value = this.value;";
|
||||
@ -249,7 +253,7 @@ $addButton[] = Indent::_(4) . "\$script[] = \"";
|
||||
. "\".\$button_code_name.\"Button(\".\$button_code_name.\"Value);";
|
||||
$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)
|
||||
. "\".\$button_code_name.\"Button(\".\$button_code_name.\"Value);";
|
||||
$addButton[] = Indent::_(5) . "});";
|
||||
@ -293,7 +297,7 @@ $addButton[] = Indent::_(4) . "\$script[] = \"";
|
||||
$addButton[] = Indent::_(4) . "//" . Line::_(__Line__, __Class__)
|
||||
. " Load the needed script.";
|
||||
$addButton[] = Indent::_(4)
|
||||
. "\$document = Factory::getApplication()->getDocument();";
|
||||
. "\$document = Joomla__"."_39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication()->getDocument();";
|
||||
$addButton[] = Indent::_(4)
|
||||
. "\$document->addScriptDeclaration(implode(' ',\$script));";
|
||||
$addButton[] = Indent::_(4) . "//" . Line::_(__Line__, __Class__)
|
||||
|
@ -329,10 +329,11 @@ final class ConfigFieldsets
|
||||
$field['custom_value']
|
||||
))
|
||||
{
|
||||
// add array if found
|
||||
if ((strpos((string) $field['custom_value'], '["') !== false)
|
||||
&& (strpos((string) $field['custom_value'], '"]')
|
||||
!== false))
|
||||
// add array or object if found
|
||||
if (((strpos((string) $field['custom_value'], '["') !== false)
|
||||
&& (strpos((string) $field['custom_value'], '"]') !== false)) ||
|
||||
((strpos((string) $field['custom_value'], '{"') !== false)
|
||||
&& (strpos((string) $field['custom_value'], '"}') !== false)))
|
||||
{
|
||||
// load the Global checkin defautls
|
||||
$this->extensionsparams->add('component', '"' . $fieldName
|
||||
|
@ -283,10 +283,11 @@
|
||||
$field['custom_value']
|
||||
))
|
||||
{
|
||||
// add array if found
|
||||
if ((strpos((string) $field['custom_value'], '["') !== false)
|
||||
&& (strpos((string) $field['custom_value'], '"]')
|
||||
!== false))
|
||||
// add array or object if found
|
||||
if (((strpos((string) $field['custom_value'], '["') !== false)
|
||||
&& (strpos((string) $field['custom_value'], '"]') !== false)) ||
|
||||
((strpos((string) $field['custom_value'], '{"') !== false)
|
||||
&& (strpos((string) $field['custom_value'], '"}') !== false)))
|
||||
{
|
||||
// load the Global checkin defautls
|
||||
$this->extensionsparams->add('component', '"' . $fieldName
|
||||
|
@ -2,7 +2,7 @@
|
||||
/**
|
||||
* @package Joomla.Component.Builder
|
||||
*
|
||||
* @created 3rd September, 2020
|
||||
* @created 4th September, 2020
|
||||
* @author Llewellyn van der Merwe <https://dev.vdm.io>
|
||||
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
|
||||
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
|
||||
|
@ -30,7 +30,7 @@
|
||||
"extendsinterfaces": null,
|
||||
"namespace": "[[[NamespacePrefix]]]\\Joomla\\[[[ComponentNamespace]]].Compiler.Utilities.File",
|
||||
"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;",
|
||||
"composer": ""
|
||||
}
|
@ -2,7 +2,7 @@
|
||||
/**
|
||||
* @package Joomla.Component.Builder
|
||||
*
|
||||
* @created 3rd September, 2020
|
||||
* @created 4th September, 2020
|
||||
* @author Llewellyn van der Merwe <https://dev.vdm.io>
|
||||
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
|
||||
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
|
||||
|
@ -30,7 +30,7 @@
|
||||
"extendsinterfaces": null,
|
||||
"namespace": "[[[NamespacePrefix]]]\\Joomla\\[[[ComponentNamespace]]].Compiler.Utilities.Folder",
|
||||
"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;",
|
||||
"composer": ""
|
||||
}
|
@ -87,8 +87,7 @@ final class CreateUser implements CreateUserInterface
|
||||
$method[] = Indent::_(2) . "\$lang = Factory::getLanguage();";
|
||||
$method[] = Indent::_(2) . "\$extension = 'com_users';";
|
||||
$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)
|
||||
. "\$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) . "\$extension = 'com_users';";
|
||||
$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)
|
||||
. "\$lang->load(\$extension, \$base_dir, \$language_tag, \$reload);";
|
||||
|
@ -61,8 +61,7 @@
|
||||
$method[] = Indent::_(2) . "\$lang = Factory::getLanguage();";
|
||||
$method[] = Indent::_(2) . "\$extension = 'com_users';";
|
||||
$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)
|
||||
. "\$lang->load(\$extension, \$base_dir, \$language_tag, \$reload);";
|
||||
@ -280,8 +279,7 @@
|
||||
$method[] = Indent::_(2) . "\$lang = Factory::getLanguage();";
|
||||
$method[] = Indent::_(2) . "\$extension = 'com_users';";
|
||||
$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)
|
||||
. "\$lang->load(\$extension, \$base_dir, \$language_tag, \$reload);";
|
||||
|
@ -14,7 +14,7 @@
|
||||
class Sqldump #Gold {
|
||||
# Registry $registry
|
||||
# $db
|
||||
+ __construct(?Registry $registry = null)
|
||||
+ __construct(Registry $registry)
|
||||
+ get(array $tables, string $view, ...) : ?string
|
||||
# escape(string|array $value) : string|array
|
||||
}
|
||||
|
@ -13,7 +13,6 @@ namespace VDM\Joomla\Componentbuilder\Compiler\Model;
|
||||
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use VDM\Joomla\Componentbuilder\Compiler\Factory as Compiler;
|
||||
use VDM\Joomla\Componentbuilder\Compiler\Registry;
|
||||
use VDM\Joomla\Utilities\ArrayHelper;
|
||||
use VDM\Joomla\Componentbuilder\Compiler\Utilities\Placefix;
|
||||
@ -45,14 +44,13 @@ class Sqldump
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param Registry|null $registry The compiler registry object.
|
||||
* @param \JDatabaseDriver|null $db The database object.
|
||||
* @param Registry $registry The compiler registry object.
|
||||
|
||||
* @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();
|
||||
}
|
||||
|
||||
|
@ -16,14 +16,13 @@
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param Registry|null $registry The compiler registry object.
|
||||
* @param \JDatabaseDriver|null $db The database object.
|
||||
* @param Registry $registry The compiler registry object.
|
||||
|
||||
* @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();
|
||||
}
|
||||
|
||||
|
@ -10,10 +10,6 @@
|
||||
"system_name": "JCB.Compiler.Model.Sqldump",
|
||||
"type": "class",
|
||||
"use_selection": {
|
||||
"use_selection0": {
|
||||
"use": "d910d8b8-4c23-4f3e-8cda-438f2d2bd7ac",
|
||||
"as": "Compiler"
|
||||
},
|
||||
"use_selection1": {
|
||||
"use": "e5d9804f-0eb0-4ee9-b406-ad4e8cdbc1f6",
|
||||
"as": "default"
|
||||
|
@ -14,7 +14,7 @@
|
||||
class Updatesql #Gold {
|
||||
# array $name
|
||||
# Registry $registry
|
||||
+ __construct(?Registry $registry = null)
|
||||
+ __construct(Registry $registry)
|
||||
+ set(mixed $old, mixed $new, ...) : void
|
||||
# add(string $type, int $item, ...) : void
|
||||
# name(int $id) : string
|
||||
|
@ -12,7 +12,6 @@
|
||||
namespace VDM\Joomla\Componentbuilder\Compiler\Model;
|
||||
|
||||
|
||||
use VDM\Joomla\Componentbuilder\Compiler\Factory as Compiler;
|
||||
use VDM\Joomla\Componentbuilder\Compiler\Registry;
|
||||
use VDM\Joomla\Utilities\ArrayHelper;
|
||||
use VDM\Joomla\Utilities\StringHelper;
|
||||
@ -45,13 +44,13 @@ class Updatesql
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param Registry|null $registry The compiler registry object.
|
||||
* @param Registry $registry The compiler registry object.
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function __construct(?Registry $registry = null)
|
||||
public function __construct(Registry $registry)
|
||||
{
|
||||
$this->registry = $registry ?: Compiler::_('Registry');
|
||||
$this->registry = $registry;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -17,13 +17,13 @@
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param Registry|null $registry The compiler registry object.
|
||||
* @param Registry $registry The compiler registry object.
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function __construct(?Registry $registry = null)
|
||||
public function __construct(Registry $registry)
|
||||
{
|
||||
$this->registry = $registry ?: Compiler::_('Registry');
|
||||
$this->registry = $registry;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -10,10 +10,6 @@
|
||||
"system_name": "JCB.Compiler.Model.Updatesql",
|
||||
"type": "class",
|
||||
"use_selection": {
|
||||
"use_selection0": {
|
||||
"use": "d910d8b8-4c23-4f3e-8cda-438f2d2bd7ac",
|
||||
"as": "Compiler"
|
||||
},
|
||||
"use_selection1": {
|
||||
"use": "e5d9804f-0eb0-4ee9-b406-ad4e8cdbc1f6",
|
||||
"as": "default"
|
||||
|
@ -492,7 +492,7 @@ class Power implements PowerInterface
|
||||
$this->active[$guid]->file_name = array_pop($src_array);
|
||||
|
||||
// namespace array
|
||||
$namespace_array = [...$path_array, ...$src_array];
|
||||
$namespace_array = array_merge($path_array, $src_array);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -534,12 +534,12 @@ class Power implements PowerInterface
|
||||
// set the actual class namespace
|
||||
$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)
|
||||
$prefix_folder = implode('.', $path_array);
|
||||
|
||||
// set global namespaces for autoloader
|
||||
$this->namespace[$prefix_folder] = $path_array;
|
||||
|
||||
// make sub folders if still found
|
||||
$sub_folder = '';
|
||||
if (ArrayHelper::check($src_array))
|
||||
|
@ -454,7 +454,7 @@
|
||||
$this->active[$guid]->file_name = array_pop($src_array);
|
||||
|
||||
// namespace array
|
||||
$namespace_array = [...$path_array, ...$src_array];
|
||||
$namespace_array = array_merge($path_array, $src_array);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -496,12 +496,12 @@
|
||||
// set the actual class namespace
|
||||
$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)
|
||||
$prefix_folder = implode('.', $path_array);
|
||||
|
||||
// set global namespaces for autoloader
|
||||
$this->namespace[$prefix_folder] = $path_array;
|
||||
|
||||
// make sub folders if still found
|
||||
$sub_folder = '';
|
||||
if (ArrayHelper::check($src_array))
|
||||
|
@ -14,7 +14,7 @@
|
||||
class Sql #Gold {
|
||||
# Dispenser $dispenser
|
||||
# Sqldump $dump
|
||||
+ __construct(?Dispenser $dispenser = null, ?Sqldump $dump = null)
|
||||
+ __construct(Dispenser $dispenser, Sqldump $dump)
|
||||
+ set(object $item) : void
|
||||
}
|
||||
|
||||
|
@ -12,7 +12,6 @@
|
||||
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\Model\Sqldump;
|
||||
|
||||
@ -43,15 +42,15 @@ class Sql
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param Dispenser|null $dispenser The compiler customcode dispenser.
|
||||
* @param Sqldump|null $dump The compiler SQL dump.
|
||||
* @param Dispenser $dispenser The compiler customcode dispenser.
|
||||
* @param Sqldump $dump The compiler SQL dump.
|
||||
*
|
||||
* @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->dump = $dump ?: Compiler::_('Model.Sqldump');
|
||||
$this->dispenser = $dispenser;
|
||||
$this->dump = $dump;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -91,7 +90,6 @@ class Sql
|
||||
|
||||
unset($item->tables);
|
||||
unset($item->sql);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -17,15 +17,15 @@
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param Dispenser|null $dispenser The compiler customcode dispenser.
|
||||
* @param Sqldump|null $dump The compiler SQL dump.
|
||||
* @param Dispenser $dispenser The compiler customcode dispenser.
|
||||
* @param Sqldump $dump The compiler SQL dump.
|
||||
*
|
||||
* @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->dump = $dump ?: Compiler::_('Model.Sqldump');
|
||||
$this->dispenser = $dispenser;
|
||||
$this->dump = $dump;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -65,4 +65,4 @@
|
||||
|
||||
unset($item->tables);
|
||||
unset($item->sql);
|
||||
}
|
||||
}
|
@ -10,10 +10,6 @@
|
||||
"system_name": "JCB.Compiler.Model.Sql",
|
||||
"type": "class",
|
||||
"use_selection": {
|
||||
"use_selection0": {
|
||||
"use": "d910d8b8-4c23-4f3e-8cda-438f2d2bd7ac",
|
||||
"as": "Compiler"
|
||||
},
|
||||
"use_selection1": {
|
||||
"use": "f1dc6430-fb54-452e-aa53-ce32ae93db88",
|
||||
"as": "default"
|
||||
|
@ -13,7 +13,7 @@
|
||||
@startuml
|
||||
class Sqltweaking #Gold {
|
||||
# Registry $registry
|
||||
+ __construct(?Registry $registry = null)
|
||||
+ __construct(Registry $registry)
|
||||
+ set(object $item) : void
|
||||
# tweak(array $settings) : void
|
||||
}
|
||||
|
@ -12,7 +12,6 @@
|
||||
namespace VDM\Joomla\Componentbuilder\Compiler\Model;
|
||||
|
||||
|
||||
use VDM\Joomla\Componentbuilder\Compiler\Factory as Compiler;
|
||||
use VDM\Joomla\Componentbuilder\Compiler\Registry;
|
||||
use VDM\Joomla\Utilities\JsonHelper;
|
||||
use VDM\Joomla\Utilities\ArrayHelper;
|
||||
@ -37,13 +36,13 @@ class Sqltweaking
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param Registry|null $registry The compiler registry object.
|
||||
* @param Registry $registry The compiler registry object.
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function __construct(?Registry $registry = null)
|
||||
public function __construct(Registry $registry)
|
||||
{
|
||||
$this->registry = $registry ?: Compiler::_('Registry');
|
||||
$this->registry = $registry;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -9,13 +9,13 @@
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param Registry|null $registry The compiler registry object.
|
||||
* @param Registry $registry The compiler registry object.
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function __construct(?Registry $registry = null)
|
||||
public function __construct(Registry $registry)
|
||||
{
|
||||
$this->registry = $registry ?: Compiler::_('Registry');
|
||||
$this->registry = $registry;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -10,10 +10,6 @@
|
||||
"system_name": "JCB.Compiler.Model.Sqltweaking",
|
||||
"type": "class",
|
||||
"use_selection": {
|
||||
"use_selection0": {
|
||||
"use": "d910d8b8-4c23-4f3e-8cda-438f2d2bd7ac",
|
||||
"as": "Compiler"
|
||||
},
|
||||
"use_selection1": {
|
||||
"use": "e5d9804f-0eb0-4ee9-b406-ad4e8cdbc1f6",
|
||||
"as": "default"
|
||||
|
@ -18,7 +18,7 @@ class Dispenser #Gold {
|
||||
# Gui $gui
|
||||
# Hash $hash
|
||||
# LockBase $base64
|
||||
+ __construct(?Placeholder $placeholder = null, ?Customcode $customcode = null, ...)
|
||||
+ __construct(Placeholder $placeholder, Customcode $customcode, ...)
|
||||
+ set(string $script, string $first, ...) : bool
|
||||
+ get(string $first, string $second, ...) : mixed
|
||||
# initHub(string $first, ?string $second = null, ...) : void
|
||||
@ -31,11 +31,11 @@ note right of Dispenser::__construct
|
||||
since: 3.2.0
|
||||
|
||||
arguments:
|
||||
?Placeholder $placeholder = null
|
||||
?Customcode $customcode = null
|
||||
?Gui $gui = null
|
||||
?Hash $hash = null
|
||||
?LockBase $base64 = null
|
||||
Placeholder $placeholder
|
||||
Customcode $customcode
|
||||
Gui $gui
|
||||
Hash $hash
|
||||
LockBase $lockbase
|
||||
end note
|
||||
|
||||
note right of Dispenser::set
|
||||
|
@ -12,13 +12,12 @@
|
||||
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\Customcode;
|
||||
use VDM\Joomla\Componentbuilder\Compiler\Customcode\Gui;
|
||||
use VDM\Joomla\Componentbuilder\Compiler\Customcode\Hash;
|
||||
use VDM\Joomla\Componentbuilder\Compiler\Customcode\LockBase;
|
||||
use VDM\Joomla\Utilities\StringHelper;
|
||||
use VDM\Joomla\Componentbuilder\Compiler\Interfaces\Customcode\DispenserInterface;
|
||||
|
||||
|
||||
@ -33,7 +32,7 @@ class Dispenser implements DispenserInterface
|
||||
* Customcode Dispenser Hub
|
||||
*
|
||||
* @var array
|
||||
* @since 3.2.0
|
||||
* @since 3.2.0
|
||||
**/
|
||||
public array $hub;
|
||||
|
||||
@ -41,7 +40,7 @@ class Dispenser implements DispenserInterface
|
||||
* Compiler Placeholder
|
||||
*
|
||||
* @var Placeholder
|
||||
* @since 3.2.0
|
||||
* @since 3.2.0
|
||||
**/
|
||||
protected Placeholder $placeholder;
|
||||
|
||||
@ -49,7 +48,7 @@ class Dispenser implements DispenserInterface
|
||||
* Compiler Customcode
|
||||
*
|
||||
* @var Customcode
|
||||
* @since 3.2.0
|
||||
* @since 3.2.0
|
||||
**/
|
||||
protected Customcode $customcode;
|
||||
|
||||
@ -57,7 +56,7 @@ class Dispenser implements DispenserInterface
|
||||
* Compiler Customcode in Gui
|
||||
*
|
||||
* @var Gui
|
||||
* @since 3.2.0
|
||||
* @since 3.2.0
|
||||
**/
|
||||
protected Gui $gui;
|
||||
|
||||
@ -65,7 +64,7 @@ class Dispenser implements DispenserInterface
|
||||
* Compiler Customcode to Hash
|
||||
*
|
||||
* @var Hash
|
||||
* @since 3.2.0
|
||||
* @since 3.2.0
|
||||
**/
|
||||
protected Hash $hash;
|
||||
|
||||
@ -73,29 +72,29 @@ class Dispenser implements DispenserInterface
|
||||
* Compiler Customcode to LockBase
|
||||
*
|
||||
* @var LockBase
|
||||
* @since 3.2.0
|
||||
* @since 3.2.0
|
||||
**/
|
||||
protected LockBase $base64;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param Placeholder|null $placeholder The compiler placeholder object.
|
||||
* @param Customcode|null $customcode The compiler customcode object.
|
||||
* @param Gui|null $gui The compiler customcode gui object.
|
||||
* @param Hash|null $hash The compiler customcode hash object.
|
||||
* @param LockBase|null $base64 The compiler customcode lock base64 object.
|
||||
* @param Placeholder $placeholder The Placeholder Class.
|
||||
* @param Customcode $customcode The Customcode Class.
|
||||
* @param Gui $gui The Gui Class.
|
||||
* @param Hash $hash The Hash Class.
|
||||
* @param LockBase $lockbase The LockBase Class.
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function __construct(?Placeholder $placeholder = null, ?Customcode $customcode = null,
|
||||
?Gui $gui = null, ?Hash $hash = null, ?LockBase $base64 = null)
|
||||
public function __construct(Placeholder $placeholder, Customcode $customcode, Gui $gui,
|
||||
Hash $hash, LockBase $lockbase)
|
||||
{
|
||||
$this->placeholder = $placeholder ?: Compiler::_('Placeholder');
|
||||
$this->customcode = $customcode ?: Compiler::_('Customcode');
|
||||
$this->gui = $gui ?: Compiler::_('Customcode.Gui');
|
||||
$this->hash = $hash ?: Compiler::_('Customcode.Hash');
|
||||
$this->base64 = $base64 ?: Compiler::_('Customcode.LockBase');
|
||||
$this->placeholder = $placeholder;
|
||||
$this->customcode = $customcode;
|
||||
$this->gui = $gui;
|
||||
$this->hash = $hash;
|
||||
$this->base64 = $lockbase;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -114,7 +113,7 @@ class Dispenser implements DispenserInterface
|
||||
* default: false
|
||||
*
|
||||
* @return bool true on success
|
||||
* @since 3.2.0
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function set(&$script, string $first, ?string $second = null, ?string $third = null,
|
||||
array $config = [], bool $base64 = true, bool $dynamic = true, bool $add = false): bool
|
||||
@ -177,7 +176,7 @@ class Dispenser implements DispenserInterface
|
||||
* @param string $suffix The suffix to add after the script if found
|
||||
*
|
||||
* @return mixed The string/script if found or the default value if not found
|
||||
* @since 3.2.0
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function get(string $first, string $second, string $prefix = '', ?string $note = null,
|
||||
bool $unset = false, $default = null, string $suffix = '')
|
||||
@ -224,7 +223,7 @@ class Dispenser implements DispenserInterface
|
||||
* default: false
|
||||
*
|
||||
* @return void
|
||||
* @since 3.2.0
|
||||
* @since 3.2.0
|
||||
*/
|
||||
protected function initHub(string $first, ?string $second = null, ?string $third = null, bool $add = false)
|
||||
{
|
||||
@ -255,7 +254,7 @@ class Dispenser implements DispenserInterface
|
||||
* default: false
|
||||
*
|
||||
* @return void
|
||||
* @since 3.2.0
|
||||
* @since 3.2.0
|
||||
*/
|
||||
protected function setHub(string $script, string $first, ?string $second = null, ?string $third = null, bool $add = false)
|
||||
{
|
||||
|
@ -2,7 +2,7 @@
|
||||
* Customcode Dispenser Hub
|
||||
*
|
||||
* @var array
|
||||
* @since 3.2.0
|
||||
* @since 3.2.0
|
||||
**/
|
||||
public array $hub;
|
||||
|
||||
@ -10,7 +10,7 @@
|
||||
* Compiler Placeholder
|
||||
*
|
||||
* @var Placeholder
|
||||
* @since 3.2.0
|
||||
* @since 3.2.0
|
||||
**/
|
||||
protected Placeholder $placeholder;
|
||||
|
||||
@ -18,7 +18,7 @@
|
||||
* Compiler Customcode
|
||||
*
|
||||
* @var Customcode
|
||||
* @since 3.2.0
|
||||
* @since 3.2.0
|
||||
**/
|
||||
protected Customcode $customcode;
|
||||
|
||||
@ -26,7 +26,7 @@
|
||||
* Compiler Customcode in Gui
|
||||
*
|
||||
* @var Gui
|
||||
* @since 3.2.0
|
||||
* @since 3.2.0
|
||||
**/
|
||||
protected Gui $gui;
|
||||
|
||||
@ -34,7 +34,7 @@
|
||||
* Compiler Customcode to Hash
|
||||
*
|
||||
* @var Hash
|
||||
* @since 3.2.0
|
||||
* @since 3.2.0
|
||||
**/
|
||||
protected Hash $hash;
|
||||
|
||||
@ -42,29 +42,29 @@
|
||||
* Compiler Customcode to LockBase
|
||||
*
|
||||
* @var LockBase
|
||||
* @since 3.2.0
|
||||
* @since 3.2.0
|
||||
**/
|
||||
protected LockBase $base64;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param Placeholder|null $placeholder The compiler placeholder object.
|
||||
* @param Customcode|null $customcode The compiler customcode object.
|
||||
* @param Gui|null $gui The compiler customcode gui object.
|
||||
* @param Hash|null $hash The compiler customcode hash object.
|
||||
* @param LockBase|null $base64 The compiler customcode lock base64 object.
|
||||
* @param Placeholder $placeholder The Placeholder Class.
|
||||
* @param Customcode $customcode The Customcode Class.
|
||||
* @param Gui $gui The Gui Class.
|
||||
* @param Hash $hash The Hash Class.
|
||||
* @param LockBase $lockbase The LockBase Class.
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function __construct(?Placeholder $placeholder = null, ?Customcode $customcode = null,
|
||||
?Gui $gui = null, ?Hash $hash = null, ?LockBase $base64 = null)
|
||||
public function __construct(Placeholder $placeholder, Customcode $customcode, Gui $gui,
|
||||
Hash $hash, LockBase $lockbase)
|
||||
{
|
||||
$this->placeholder = $placeholder ?: Compiler::_('Placeholder');
|
||||
$this->customcode = $customcode ?: Compiler::_('Customcode');
|
||||
$this->gui = $gui ?: Compiler::_('Customcode.Gui');
|
||||
$this->hash = $hash ?: Compiler::_('Customcode.Hash');
|
||||
$this->base64 = $base64 ?: Compiler::_('Customcode.LockBase');
|
||||
$this->placeholder = $placeholder;
|
||||
$this->customcode = $customcode;
|
||||
$this->gui = $gui;
|
||||
$this->hash = $hash;
|
||||
$this->base64 = $lockbase;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -83,7 +83,7 @@
|
||||
* default: false
|
||||
*
|
||||
* @return bool true on success
|
||||
* @since 3.2.0
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function set(&$script, string $first, ?string $second = null, ?string $third = null,
|
||||
array $config = [], bool $base64 = true, bool $dynamic = true, bool $add = false): bool
|
||||
@ -146,7 +146,7 @@
|
||||
* @param string $suffix The suffix to add after the script if found
|
||||
*
|
||||
* @return mixed The string/script if found or the default value if not found
|
||||
* @since 3.2.0
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function get(string $first, string $second, string $prefix = '', ?string $note = null,
|
||||
bool $unset = false, $default = null, string $suffix = '')
|
||||
@ -193,7 +193,7 @@
|
||||
* default: false
|
||||
*
|
||||
* @return void
|
||||
* @since 3.2.0
|
||||
* @since 3.2.0
|
||||
*/
|
||||
protected function initHub(string $first, ?string $second = null, ?string $third = null, bool $add = false)
|
||||
{
|
||||
@ -224,7 +224,7 @@
|
||||
* default: false
|
||||
*
|
||||
* @return void
|
||||
* @since 3.2.0
|
||||
* @since 3.2.0
|
||||
*/
|
||||
protected function setHub(string $script, string $first, ?string $second = null, ?string $third = null, bool $add = false)
|
||||
{
|
||||
|
@ -13,32 +13,28 @@
|
||||
"type": "class",
|
||||
"use_selection": {
|
||||
"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",
|
||||
"as": "default"
|
||||
},
|
||||
"use_selection4": {
|
||||
"use_selection1": {
|
||||
"use": "313b43c4-98c3-4f62-9177-2d73ec8eba31",
|
||||
"as": "default"
|
||||
},
|
||||
"use_selection2": {
|
||||
"use": "1bd48df2-4f7e-4581-9fe9-4b54e59105e3",
|
||||
"as": "default"
|
||||
},
|
||||
"use_selection5": {
|
||||
"use_selection3": {
|
||||
"use": "797579e8-b272-41ed-91de-428cb0b3e089",
|
||||
"as": "default"
|
||||
},
|
||||
"use_selection6": {
|
||||
"use_selection4": {
|
||||
"use": "7c07c9d6-34cd-4491-934a-ef0a83f414c0",
|
||||
"as": "default"
|
||||
},
|
||||
"use_selection5": {
|
||||
"use": "1f28cb53-60d9-4db1-b517-3c7dc6b429ef",
|
||||
"as": "default"
|
||||
}
|
||||
},
|
||||
"extendsinterfaces": null,
|
||||
|
@ -543,14 +543,7 @@ class Config extends BaseConfig
|
||||
*/
|
||||
protected function getRemovelinebreaks(): bool
|
||||
{
|
||||
// get posted value
|
||||
$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;
|
||||
return (bool) true;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -507,14 +507,7 @@
|
||||
*/
|
||||
protected function getRemovelinebreaks(): bool
|
||||
{
|
||||
// get posted value
|
||||
$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;
|
||||
return (bool) true;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user