forked from joomla/Component-Builder
Release of v5.0.4-beta2
Improve the [VDM Registry] to be Joomla Registry Compatible. Move all registries to the [VDM Registry] class. Fix Checked Out to be null and not 0. (#1194). Fix created_by, modified_by, checked_out fields in the compiler of the SQL. (#1194). Update all core date fields in table class. (#1188). Update created_by, modified_by, checked_out fields in table class. Implementation of the decentralized Super-Power CORE repository network. (#1190).
This commit is contained in:
parent
703e8e0133
commit
df8f55b61a
12
CHANGELOG.md
12
CHANGELOG.md
@ -1,4 +1,14 @@
|
||||
# v5.0.4-beta1
|
||||
# v5.0.4-beta2
|
||||
|
||||
- Improve the [VDM Registry] to be Joomla Registry Compatible
|
||||
- Move all registries to the [VDM Registry] class
|
||||
- Fix Checked Out to be null and not 0. (#1194)
|
||||
- Fix created_by, modified_by, checked_out fields in the compiler of the SQL. (#1194)
|
||||
- Update all core date fields in table class. (#1188)
|
||||
- Update created_by, modified_by, checked_out fields in table class.
|
||||
- Implementation of the decentralized Super-Power CORE repository network. (#1190)
|
||||
|
||||
# v5.0.4-beta
|
||||
|
||||
- Add first classes for the new import engine.
|
||||
|
||||
|
@ -3270,7 +3270,7 @@ class Com_ComponentbuilderInstallerScript implements InstallerScriptInterface
|
||||
echo '<div style="background-color: #fff;" class="alert alert-info"><a target="_blank" href="https://dev.vdm.io" title="Component Builder">
|
||||
<img src="components/com_componentbuilder/assets/images/vdm-component.jpg"/>
|
||||
</a>
|
||||
<h3>Upgrade to Version 5.0.4-beta1 Was Successful! Let us know if anything is not working as expected.</h3></div>';
|
||||
<h3>Upgrade to Version 5.0.4-beta2 Was Successful! Let us know if anything is not working as expected.</h3></div>';
|
||||
|
||||
// Add/Update component in the action logs extensions table.
|
||||
$this->setActionLogsExtensions();
|
||||
|
12
README.md
12
README.md
@ -9,7 +9,7 @@ The Component Builder for [Joomla](https://extensions.joomla.org/extension/compo
|
||||
|
||||
Whether you're a seasoned [Joomla](https://extensions.joomla.org/extension/component-builder/) developer, or have just started, Component Builder will save you lots of time and money. A real must have!
|
||||
|
||||
You can install it quite easily and with no limitations. On [gitea](https://git.vdm.dev/joomla/Component-Builder/tags) is the latest release (5.0.4-beta1) with **ALL** its features and **ALL** concepts totally open-source and free!
|
||||
You can install it quite easily and with no limitations. On [gitea](https://git.vdm.dev/joomla/Component-Builder/tags) is the latest release (5.0.4-beta2) with **ALL** its features and **ALL** concepts totally open-source and free!
|
||||
|
||||
> Watch Quick Build of a Hello World component in [JCB on Youtube](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=45)
|
||||
|
||||
@ -144,14 +144,14 @@ TODO
|
||||
+ *Author*: [Llewellyn van der Merwe](mailto:joomla@vdm.io)
|
||||
+ *Name*: [Component Builder](https://git.vdm.dev/joomla/Component-Builder)
|
||||
+ *First Build*: 30th April, 2015
|
||||
+ *Last Build*: 7th November, 2024
|
||||
+ *Version*: 5.0.4-beta1
|
||||
+ *Last Build*: 16th December, 2024
|
||||
+ *Version*: 5.0.4-beta2
|
||||
+ *Copyright*: Copyright (C) 2015 Vast Development Method. All rights reserved.
|
||||
+ *License*: GNU General Public License version 2 or later; see LICENSE.txt
|
||||
+ *Line count*: **890506**
|
||||
+ *Line count*: **910278**
|
||||
+ *Field count*: **2104**
|
||||
+ *File count*: **6228**
|
||||
+ *Folder count*: **636**
|
||||
+ *File count*: **6346**
|
||||
+ *Folder count*: **638**
|
||||
|
||||
> This **component** was build with a [Joomla](https://extensions.joomla.org/extension/component-builder/) [Automated Component Builder](https://www.joomlacomponentbuilder.com).
|
||||
> Developed by [Llewellyn van der Merwe](mailto:joomla@vdm.io)
|
||||
|
@ -9,7 +9,7 @@ The Component Builder for [Joomla](https://extensions.joomla.org/extension/compo
|
||||
|
||||
Whether you're a seasoned [Joomla](https://extensions.joomla.org/extension/component-builder/) developer, or have just started, Component Builder will save you lots of time and money. A real must have!
|
||||
|
||||
You can install it quite easily and with no limitations. On [gitea](https://git.vdm.dev/joomla/Component-Builder/tags) is the latest release (5.0.4-beta1) with **ALL** its features and **ALL** concepts totally open-source and free!
|
||||
You can install it quite easily and with no limitations. On [gitea](https://git.vdm.dev/joomla/Component-Builder/tags) is the latest release (5.0.4-beta2) with **ALL** its features and **ALL** concepts totally open-source and free!
|
||||
|
||||
> Watch Quick Build of a Hello World component in [JCB on Youtube](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=45)
|
||||
|
||||
@ -144,14 +144,14 @@ TODO
|
||||
+ *Author*: [Llewellyn van der Merwe](mailto:joomla@vdm.io)
|
||||
+ *Name*: [Component Builder](https://git.vdm.dev/joomla/Component-Builder)
|
||||
+ *First Build*: 30th April, 2015
|
||||
+ *Last Build*: 7th November, 2024
|
||||
+ *Version*: 5.0.4-beta1
|
||||
+ *Last Build*: 16th December, 2024
|
||||
+ *Version*: 5.0.4-beta2
|
||||
+ *Copyright*: Copyright (C) 2015 Vast Development Method. All rights reserved.
|
||||
+ *License*: GNU General Public License version 2 or later; see LICENSE.txt
|
||||
+ *Line count*: **890506**
|
||||
+ *Line count*: **910278**
|
||||
+ *Field count*: **2104**
|
||||
+ *File count*: **6228**
|
||||
+ *Folder count*: **636**
|
||||
+ *File count*: **6346**
|
||||
+ *Folder count*: **638**
|
||||
|
||||
> This **component** was build with a [Joomla](https://extensions.joomla.org/extension/component-builder/) [Automated Component Builder](https://www.joomlacomponentbuilder.com).
|
||||
> Developed by [Llewellyn van der Merwe](mailto:joomla@vdm.io)
|
||||
|
@ -15,6 +15,7 @@ use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper;
|
||||
use VDM\Joomla\Utilities\StringHelper;
|
||||
use VDM\Joomla\Utilities\ArrayHelper;
|
||||
use Joomla\CMS\User\UserFactoryInterface;
|
||||
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die;
|
||||
@ -96,8 +97,8 @@ $can = ComponentbuilderHelper::getActions('field');
|
||||
<?php
|
||||
$canCheckin = $user->authorise('core.manage', 'com_checkin') || $item->checked_out == $user->id || $item->checked_out == 0;
|
||||
$userChkOut = Factory::getContainer()->
|
||||
get(\Joomla\CMS\User\UserFactoryInterface::class)->
|
||||
loadUserById($item->checked_out);
|
||||
get(UserFactoryInterface::class)->
|
||||
loadUserById($item->checked_out ?? 0);
|
||||
$canDo = ComponentbuilderHelper::getActions('field',$item,'fields');
|
||||
?>
|
||||
<tr>
|
||||
|
@ -45,7 +45,7 @@ $headers ??= [Text::_('COM_COMPONENTBUILDER_NO'), Text::_('COM_COMPONENTBUILDER_
|
||||
$items ??= 6;
|
||||
|
||||
?>
|
||||
<div class="<?php echo $$table_container_class; ?>">
|
||||
<div class="<?php echo $table_container_class; ?>">
|
||||
<table id="<?php echo $table_id; ?>" class="<?php echo $table_class; ?>">
|
||||
<thead>
|
||||
<?php if (is_array($headers)): ?>
|
||||
|
File diff suppressed because one or more lines are too long
1
admin/sql/updates/mysql/5.0.4-beta.sql
Normal file
1
admin/sql/updates/mysql/5.0.4-beta.sql
Normal file
@ -0,0 +1 @@
|
||||
|
@ -15,6 +15,7 @@ use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper;
|
||||
use VDM\Joomla\Utilities\ArrayHelper;
|
||||
use VDM\Joomla\Utilities\GetHelper;
|
||||
use Joomla\CMS\User\UserFactoryInterface;
|
||||
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die;
|
||||
@ -26,8 +27,8 @@ $edit = "index.php?option=com_componentbuilder&view=admin_views&task=admin_view.
|
||||
<?php
|
||||
$canCheckin = $this->user->authorise('core.manage', 'com_checkin') || $item->checked_out == $this->user->id || $item->checked_out == 0;
|
||||
$userChkOut = Factory::getContainer()->
|
||||
get(\Joomla\CMS\User\UserFactoryInterface::class)->
|
||||
loadUserById($item->checked_out);
|
||||
get(UserFactoryInterface::class)->
|
||||
loadUserById($item->checked_out ?? 0);
|
||||
$canDo = ComponentbuilderHelper::getActions('admin_view',$item,'admin_views');
|
||||
?>
|
||||
<tr class="row<?php echo $i % 2; ?>">
|
||||
|
@ -13,6 +13,7 @@ use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper;
|
||||
use Joomla\CMS\User\UserFactoryInterface;
|
||||
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die;
|
||||
@ -24,8 +25,8 @@ $edit = "index.php?option=com_componentbuilder&view=admins_custom_tabs&task=admi
|
||||
<?php
|
||||
$canCheckin = $this->user->authorise('core.manage', 'com_checkin') || $item->checked_out == $this->user->id || $item->checked_out == 0;
|
||||
$userChkOut = Factory::getContainer()->
|
||||
get(\Joomla\CMS\User\UserFactoryInterface::class)->
|
||||
loadUserById($item->checked_out);
|
||||
get(UserFactoryInterface::class)->
|
||||
loadUserById($item->checked_out ?? 0);
|
||||
$canDo = ComponentbuilderHelper::getActions('admin_custom_tabs',$item,'admins_custom_tabs');
|
||||
?>
|
||||
<tr class="row<?php echo $i % 2; ?>">
|
||||
|
@ -13,6 +13,7 @@ use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper;
|
||||
use Joomla\CMS\User\UserFactoryInterface;
|
||||
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die;
|
||||
@ -24,8 +25,8 @@ $edit = "index.php?option=com_componentbuilder&view=admins_fields&task=admin_fie
|
||||
<?php
|
||||
$canCheckin = $this->user->authorise('core.manage', 'com_checkin') || $item->checked_out == $this->user->id || $item->checked_out == 0;
|
||||
$userChkOut = Factory::getContainer()->
|
||||
get(\Joomla\CMS\User\UserFactoryInterface::class)->
|
||||
loadUserById($item->checked_out);
|
||||
get(UserFactoryInterface::class)->
|
||||
loadUserById($item->checked_out ?? 0);
|
||||
$canDo = ComponentbuilderHelper::getActions('admin_fields',$item,'admins_fields');
|
||||
?>
|
||||
<tr class="row<?php echo $i % 2; ?>">
|
||||
|
@ -13,6 +13,7 @@ use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper;
|
||||
use Joomla\CMS\User\UserFactoryInterface;
|
||||
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die;
|
||||
@ -24,8 +25,8 @@ $edit = "index.php?option=com_componentbuilder&view=admins_fields_conditions&tas
|
||||
<?php
|
||||
$canCheckin = $this->user->authorise('core.manage', 'com_checkin') || $item->checked_out == $this->user->id || $item->checked_out == 0;
|
||||
$userChkOut = Factory::getContainer()->
|
||||
get(\Joomla\CMS\User\UserFactoryInterface::class)->
|
||||
loadUserById($item->checked_out);
|
||||
get(UserFactoryInterface::class)->
|
||||
loadUserById($item->checked_out ?? 0);
|
||||
$canDo = ComponentbuilderHelper::getActions('admin_fields_conditions',$item,'admins_fields_conditions');
|
||||
?>
|
||||
<tr class="row<?php echo $i % 2; ?>">
|
||||
|
@ -13,6 +13,7 @@ use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper;
|
||||
use Joomla\CMS\User\UserFactoryInterface;
|
||||
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die;
|
||||
@ -24,8 +25,8 @@ $edit = "index.php?option=com_componentbuilder&view=admins_fields_relations&task
|
||||
<?php
|
||||
$canCheckin = $this->user->authorise('core.manage', 'com_checkin') || $item->checked_out == $this->user->id || $item->checked_out == 0;
|
||||
$userChkOut = Factory::getContainer()->
|
||||
get(\Joomla\CMS\User\UserFactoryInterface::class)->
|
||||
loadUserById($item->checked_out);
|
||||
get(UserFactoryInterface::class)->
|
||||
loadUserById($item->checked_out ?? 0);
|
||||
$canDo = ComponentbuilderHelper::getActions('admin_fields_relations',$item,'admins_fields_relations');
|
||||
?>
|
||||
<tr class="row<?php echo $i % 2; ?>">
|
||||
|
@ -13,6 +13,7 @@ use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper;
|
||||
use Joomla\CMS\User\UserFactoryInterface;
|
||||
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die;
|
||||
@ -24,8 +25,8 @@ $edit = "index.php?option=com_componentbuilder&view=class_extendings&task=class_
|
||||
<?php
|
||||
$canCheckin = $this->user->authorise('core.manage', 'com_checkin') || $item->checked_out == $this->user->id || $item->checked_out == 0;
|
||||
$userChkOut = Factory::getContainer()->
|
||||
get(\Joomla\CMS\User\UserFactoryInterface::class)->
|
||||
loadUserById($item->checked_out);
|
||||
get(UserFactoryInterface::class)->
|
||||
loadUserById($item->checked_out ?? 0);
|
||||
$canDo = ComponentbuilderHelper::getActions('class_extends',$item,'class_extendings');
|
||||
?>
|
||||
<tr class="row<?php echo $i % 2; ?>">
|
||||
|
@ -13,6 +13,7 @@ use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper;
|
||||
use Joomla\CMS\User\UserFactoryInterface;
|
||||
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die;
|
||||
@ -24,8 +25,8 @@ $edit = "index.php?option=com_componentbuilder&view=class_methods&task=class_met
|
||||
<?php
|
||||
$canCheckin = $this->user->authorise('core.manage', 'com_checkin') || $item->checked_out == $this->user->id || $item->checked_out == 0;
|
||||
$userChkOut = Factory::getContainer()->
|
||||
get(\Joomla\CMS\User\UserFactoryInterface::class)->
|
||||
loadUserById($item->checked_out);
|
||||
get(UserFactoryInterface::class)->
|
||||
loadUserById($item->checked_out ?? 0);
|
||||
$canDo = ComponentbuilderHelper::getActions('class_method',$item,'class_methods');
|
||||
?>
|
||||
<tr class="row<?php echo $i % 2; ?>">
|
||||
|
@ -14,6 +14,7 @@ use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper;
|
||||
use VDM\Joomla\Utilities\StringHelper;
|
||||
use Joomla\CMS\User\UserFactoryInterface;
|
||||
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die;
|
||||
@ -25,8 +26,8 @@ $edit = "index.php?option=com_componentbuilder&view=class_properties&task=class_
|
||||
<?php
|
||||
$canCheckin = $this->user->authorise('core.manage', 'com_checkin') || $item->checked_out == $this->user->id || $item->checked_out == 0;
|
||||
$userChkOut = Factory::getContainer()->
|
||||
get(\Joomla\CMS\User\UserFactoryInterface::class)->
|
||||
loadUserById($item->checked_out);
|
||||
get(UserFactoryInterface::class)->
|
||||
loadUserById($item->checked_out ?? 0);
|
||||
$canDo = ComponentbuilderHelper::getActions('class_property',$item,'class_properties');
|
||||
?>
|
||||
<tr class="row<?php echo $i % 2; ?>">
|
||||
|
@ -13,6 +13,7 @@ use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper;
|
||||
use Joomla\CMS\User\UserFactoryInterface;
|
||||
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die;
|
||||
@ -24,8 +25,8 @@ $edit = "index.php?option=com_componentbuilder&view=components_admin_views&task=
|
||||
<?php
|
||||
$canCheckin = $this->user->authorise('core.manage', 'com_checkin') || $item->checked_out == $this->user->id || $item->checked_out == 0;
|
||||
$userChkOut = Factory::getContainer()->
|
||||
get(\Joomla\CMS\User\UserFactoryInterface::class)->
|
||||
loadUserById($item->checked_out);
|
||||
get(UserFactoryInterface::class)->
|
||||
loadUserById($item->checked_out ?? 0);
|
||||
$canDo = ComponentbuilderHelper::getActions('component_admin_views',$item,'components_admin_views');
|
||||
?>
|
||||
<tr class="row<?php echo $i % 2; ?>">
|
||||
|
@ -13,6 +13,7 @@ use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper;
|
||||
use Joomla\CMS\User\UserFactoryInterface;
|
||||
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die;
|
||||
@ -24,8 +25,8 @@ $edit = "index.php?option=com_componentbuilder&view=components_config&task=compo
|
||||
<?php
|
||||
$canCheckin = $this->user->authorise('core.manage', 'com_checkin') || $item->checked_out == $this->user->id || $item->checked_out == 0;
|
||||
$userChkOut = Factory::getContainer()->
|
||||
get(\Joomla\CMS\User\UserFactoryInterface::class)->
|
||||
loadUserById($item->checked_out);
|
||||
get(UserFactoryInterface::class)->
|
||||
loadUserById($item->checked_out ?? 0);
|
||||
$canDo = ComponentbuilderHelper::getActions('component_config',$item,'components_config');
|
||||
?>
|
||||
<tr class="row<?php echo $i % 2; ?>">
|
||||
|
@ -13,6 +13,7 @@ use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper;
|
||||
use Joomla\CMS\User\UserFactoryInterface;
|
||||
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die;
|
||||
@ -24,8 +25,8 @@ $edit = "index.php?option=com_componentbuilder&view=components_custom_admin_menu
|
||||
<?php
|
||||
$canCheckin = $this->user->authorise('core.manage', 'com_checkin') || $item->checked_out == $this->user->id || $item->checked_out == 0;
|
||||
$userChkOut = Factory::getContainer()->
|
||||
get(\Joomla\CMS\User\UserFactoryInterface::class)->
|
||||
loadUserById($item->checked_out);
|
||||
get(UserFactoryInterface::class)->
|
||||
loadUserById($item->checked_out ?? 0);
|
||||
$canDo = ComponentbuilderHelper::getActions('component_custom_admin_menus',$item,'components_custom_admin_menus');
|
||||
?>
|
||||
<tr class="row<?php echo $i % 2; ?>">
|
||||
|
@ -13,6 +13,7 @@ use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper;
|
||||
use Joomla\CMS\User\UserFactoryInterface;
|
||||
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die;
|
||||
@ -24,8 +25,8 @@ $edit = "index.php?option=com_componentbuilder&view=components_custom_admin_view
|
||||
<?php
|
||||
$canCheckin = $this->user->authorise('core.manage', 'com_checkin') || $item->checked_out == $this->user->id || $item->checked_out == 0;
|
||||
$userChkOut = Factory::getContainer()->
|
||||
get(\Joomla\CMS\User\UserFactoryInterface::class)->
|
||||
loadUserById($item->checked_out);
|
||||
get(UserFactoryInterface::class)->
|
||||
loadUserById($item->checked_out ?? 0);
|
||||
$canDo = ComponentbuilderHelper::getActions('component_custom_admin_views',$item,'components_custom_admin_views');
|
||||
?>
|
||||
<tr class="row<?php echo $i % 2; ?>">
|
||||
|
@ -13,6 +13,7 @@ use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper;
|
||||
use Joomla\CMS\User\UserFactoryInterface;
|
||||
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die;
|
||||
@ -24,8 +25,8 @@ $edit = "index.php?option=com_componentbuilder&view=components_dashboard&task=co
|
||||
<?php
|
||||
$canCheckin = $this->user->authorise('core.manage', 'com_checkin') || $item->checked_out == $this->user->id || $item->checked_out == 0;
|
||||
$userChkOut = Factory::getContainer()->
|
||||
get(\Joomla\CMS\User\UserFactoryInterface::class)->
|
||||
loadUserById($item->checked_out);
|
||||
get(UserFactoryInterface::class)->
|
||||
loadUserById($item->checked_out ?? 0);
|
||||
$canDo = ComponentbuilderHelper::getActions('component_dashboard',$item,'components_dashboard');
|
||||
?>
|
||||
<tr class="row<?php echo $i % 2; ?>">
|
||||
|
@ -13,6 +13,7 @@ use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper;
|
||||
use Joomla\CMS\User\UserFactoryInterface;
|
||||
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die;
|
||||
@ -24,8 +25,8 @@ $edit = "index.php?option=com_componentbuilder&view=components_files_folders&tas
|
||||
<?php
|
||||
$canCheckin = $this->user->authorise('core.manage', 'com_checkin') || $item->checked_out == $this->user->id || $item->checked_out == 0;
|
||||
$userChkOut = Factory::getContainer()->
|
||||
get(\Joomla\CMS\User\UserFactoryInterface::class)->
|
||||
loadUserById($item->checked_out);
|
||||
get(UserFactoryInterface::class)->
|
||||
loadUserById($item->checked_out ?? 0);
|
||||
$canDo = ComponentbuilderHelper::getActions('component_files_folders',$item,'components_files_folders');
|
||||
?>
|
||||
<tr class="row<?php echo $i % 2; ?>">
|
||||
|
@ -13,6 +13,7 @@ use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper;
|
||||
use Joomla\CMS\User\UserFactoryInterface;
|
||||
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die;
|
||||
@ -24,8 +25,8 @@ $edit = "index.php?option=com_componentbuilder&view=components_modules&task=comp
|
||||
<?php
|
||||
$canCheckin = $this->user->authorise('core.manage', 'com_checkin') || $item->checked_out == $this->user->id || $item->checked_out == 0;
|
||||
$userChkOut = Factory::getContainer()->
|
||||
get(\Joomla\CMS\User\UserFactoryInterface::class)->
|
||||
loadUserById($item->checked_out);
|
||||
get(UserFactoryInterface::class)->
|
||||
loadUserById($item->checked_out ?? 0);
|
||||
$canDo = ComponentbuilderHelper::getActions('component_modules',$item,'components_modules');
|
||||
?>
|
||||
<tr class="row<?php echo $i % 2; ?>">
|
||||
|
@ -13,6 +13,7 @@ use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper;
|
||||
use Joomla\CMS\User\UserFactoryInterface;
|
||||
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die;
|
||||
@ -24,8 +25,8 @@ $edit = "index.php?option=com_componentbuilder&view=components_mysql_tweaks&task
|
||||
<?php
|
||||
$canCheckin = $this->user->authorise('core.manage', 'com_checkin') || $item->checked_out == $this->user->id || $item->checked_out == 0;
|
||||
$userChkOut = Factory::getContainer()->
|
||||
get(\Joomla\CMS\User\UserFactoryInterface::class)->
|
||||
loadUserById($item->checked_out);
|
||||
get(UserFactoryInterface::class)->
|
||||
loadUserById($item->checked_out ?? 0);
|
||||
$canDo = ComponentbuilderHelper::getActions('component_mysql_tweaks',$item,'components_mysql_tweaks');
|
||||
?>
|
||||
<tr class="row<?php echo $i % 2; ?>">
|
||||
|
@ -13,6 +13,7 @@ use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper;
|
||||
use Joomla\CMS\User\UserFactoryInterface;
|
||||
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die;
|
||||
@ -24,8 +25,8 @@ $edit = "index.php?option=com_componentbuilder&view=components_placeholders&task
|
||||
<?php
|
||||
$canCheckin = $this->user->authorise('core.manage', 'com_checkin') || $item->checked_out == $this->user->id || $item->checked_out == 0;
|
||||
$userChkOut = Factory::getContainer()->
|
||||
get(\Joomla\CMS\User\UserFactoryInterface::class)->
|
||||
loadUserById($item->checked_out);
|
||||
get(UserFactoryInterface::class)->
|
||||
loadUserById($item->checked_out ?? 0);
|
||||
$canDo = ComponentbuilderHelper::getActions('component_placeholders',$item,'components_placeholders');
|
||||
?>
|
||||
<tr class="row<?php echo $i % 2; ?>">
|
||||
|
@ -13,6 +13,7 @@ use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper;
|
||||
use Joomla\CMS\User\UserFactoryInterface;
|
||||
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die;
|
||||
@ -24,8 +25,8 @@ $edit = "index.php?option=com_componentbuilder&view=components_plugins&task=comp
|
||||
<?php
|
||||
$canCheckin = $this->user->authorise('core.manage', 'com_checkin') || $item->checked_out == $this->user->id || $item->checked_out == 0;
|
||||
$userChkOut = Factory::getContainer()->
|
||||
get(\Joomla\CMS\User\UserFactoryInterface::class)->
|
||||
loadUserById($item->checked_out);
|
||||
get(UserFactoryInterface::class)->
|
||||
loadUserById($item->checked_out ?? 0);
|
||||
$canDo = ComponentbuilderHelper::getActions('component_plugins',$item,'components_plugins');
|
||||
?>
|
||||
<tr class="row<?php echo $i % 2; ?>">
|
||||
|
@ -13,6 +13,7 @@ use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper;
|
||||
use Joomla\CMS\User\UserFactoryInterface;
|
||||
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die;
|
||||
@ -24,8 +25,8 @@ $edit = "index.php?option=com_componentbuilder&view=components_routers&task=comp
|
||||
<?php
|
||||
$canCheckin = $this->user->authorise('core.manage', 'com_checkin') || $item->checked_out == $this->user->id || $item->checked_out == 0;
|
||||
$userChkOut = Factory::getContainer()->
|
||||
get(\Joomla\CMS\User\UserFactoryInterface::class)->
|
||||
loadUserById($item->checked_out);
|
||||
get(UserFactoryInterface::class)->
|
||||
loadUserById($item->checked_out ?? 0);
|
||||
$canDo = ComponentbuilderHelper::getActions('component_router',$item,'components_routers');
|
||||
?>
|
||||
<tr class="row<?php echo $i % 2; ?>">
|
||||
|
@ -13,6 +13,7 @@ use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper;
|
||||
use Joomla\CMS\User\UserFactoryInterface;
|
||||
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die;
|
||||
@ -24,8 +25,8 @@ $edit = "index.php?option=com_componentbuilder&view=components_site_views&task=c
|
||||
<?php
|
||||
$canCheckin = $this->user->authorise('core.manage', 'com_checkin') || $item->checked_out == $this->user->id || $item->checked_out == 0;
|
||||
$userChkOut = Factory::getContainer()->
|
||||
get(\Joomla\CMS\User\UserFactoryInterface::class)->
|
||||
loadUserById($item->checked_out);
|
||||
get(UserFactoryInterface::class)->
|
||||
loadUserById($item->checked_out ?? 0);
|
||||
$canDo = ComponentbuilderHelper::getActions('component_site_views',$item,'components_site_views');
|
||||
?>
|
||||
<tr class="row<?php echo $i % 2; ?>">
|
||||
|
@ -13,6 +13,7 @@ use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper;
|
||||
use Joomla\CMS\User\UserFactoryInterface;
|
||||
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die;
|
||||
@ -24,8 +25,8 @@ $edit = "index.php?option=com_componentbuilder&view=components_updates&task=comp
|
||||
<?php
|
||||
$canCheckin = $this->user->authorise('core.manage', 'com_checkin') || $item->checked_out == $this->user->id || $item->checked_out == 0;
|
||||
$userChkOut = Factory::getContainer()->
|
||||
get(\Joomla\CMS\User\UserFactoryInterface::class)->
|
||||
loadUserById($item->checked_out);
|
||||
get(UserFactoryInterface::class)->
|
||||
loadUserById($item->checked_out ?? 0);
|
||||
$canDo = ComponentbuilderHelper::getActions('component_updates',$item,'components_updates');
|
||||
?>
|
||||
<tr class="row<?php echo $i % 2; ?>">
|
||||
|
@ -14,6 +14,7 @@ use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper;
|
||||
use VDM\Joomla\Utilities\StringHelper;
|
||||
use Joomla\CMS\User\UserFactoryInterface;
|
||||
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die;
|
||||
@ -25,8 +26,8 @@ $edit = "index.php?option=com_componentbuilder&view=custom_admin_views&task=cust
|
||||
<?php
|
||||
$canCheckin = $this->user->authorise('core.manage', 'com_checkin') || $item->checked_out == $this->user->id || $item->checked_out == 0;
|
||||
$userChkOut = Factory::getContainer()->
|
||||
get(\Joomla\CMS\User\UserFactoryInterface::class)->
|
||||
loadUserById($item->checked_out);
|
||||
get(UserFactoryInterface::class)->
|
||||
loadUserById($item->checked_out ?? 0);
|
||||
$canDo = ComponentbuilderHelper::getActions('custom_admin_view',$item,'custom_admin_views');
|
||||
?>
|
||||
<tr class="row<?php echo $i % 2; ?>">
|
||||
|
@ -13,6 +13,7 @@ use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper;
|
||||
use Joomla\CMS\User\UserFactoryInterface;
|
||||
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die;
|
||||
@ -24,8 +25,8 @@ $edit = "index.php?option=com_componentbuilder&view=custom_codes&task=custom_cod
|
||||
<?php
|
||||
$canCheckin = $this->user->authorise('core.manage', 'com_checkin') || $item->checked_out == $this->user->id || $item->checked_out == 0;
|
||||
$userChkOut = Factory::getContainer()->
|
||||
get(\Joomla\CMS\User\UserFactoryInterface::class)->
|
||||
loadUserById($item->checked_out);
|
||||
get(UserFactoryInterface::class)->
|
||||
loadUserById($item->checked_out ?? 0);
|
||||
$canDo = ComponentbuilderHelper::getActions('custom_code',$item,'custom_codes');
|
||||
?>
|
||||
<tr class="row<?php echo $i % 2; ?>">
|
||||
|
@ -13,6 +13,7 @@ use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper;
|
||||
use Joomla\CMS\User\UserFactoryInterface;
|
||||
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die;
|
||||
@ -24,8 +25,8 @@ $edit = "index.php?option=com_componentbuilder&view=dynamic_gets&task=dynamic_ge
|
||||
<?php
|
||||
$canCheckin = $this->user->authorise('core.manage', 'com_checkin') || $item->checked_out == $this->user->id || $item->checked_out == 0;
|
||||
$userChkOut = Factory::getContainer()->
|
||||
get(\Joomla\CMS\User\UserFactoryInterface::class)->
|
||||
loadUserById($item->checked_out);
|
||||
get(UserFactoryInterface::class)->
|
||||
loadUserById($item->checked_out ?? 0);
|
||||
$canDo = ComponentbuilderHelper::getActions('dynamic_get',$item,'dynamic_gets');
|
||||
?>
|
||||
<tr class="row<?php echo $i % 2; ?>">
|
||||
|
@ -13,6 +13,7 @@ use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper;
|
||||
use Joomla\CMS\User\UserFactoryInterface;
|
||||
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die;
|
||||
@ -24,8 +25,8 @@ $edit = "index.php?option=com_componentbuilder&view=fields&task=field.edit";
|
||||
<?php
|
||||
$canCheckin = $this->user->authorise('core.manage', 'com_checkin') || $item->checked_out == $this->user->id || $item->checked_out == 0;
|
||||
$userChkOut = Factory::getContainer()->
|
||||
get(\Joomla\CMS\User\UserFactoryInterface::class)->
|
||||
loadUserById($item->checked_out);
|
||||
get(UserFactoryInterface::class)->
|
||||
loadUserById($item->checked_out ?? 0);
|
||||
$canDo = ComponentbuilderHelper::getActions('field',$item,'fields');
|
||||
?>
|
||||
<tr class="row<?php echo $i % 2; ?>">
|
||||
|
@ -13,6 +13,7 @@ use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper;
|
||||
use Joomla\CMS\User\UserFactoryInterface;
|
||||
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die;
|
||||
@ -24,8 +25,8 @@ $edit = "index.php?option=com_componentbuilder&view=fieldtypes&task=fieldtype.ed
|
||||
<?php
|
||||
$canCheckin = $this->user->authorise('core.manage', 'com_checkin') || $item->checked_out == $this->user->id || $item->checked_out == 0;
|
||||
$userChkOut = Factory::getContainer()->
|
||||
get(\Joomla\CMS\User\UserFactoryInterface::class)->
|
||||
loadUserById($item->checked_out);
|
||||
get(UserFactoryInterface::class)->
|
||||
loadUserById($item->checked_out ?? 0);
|
||||
$canDo = ComponentbuilderHelper::getActions('fieldtype',$item,'fieldtypes');
|
||||
?>
|
||||
<tr class="row<?php echo $i % 2; ?>">
|
||||
|
@ -13,6 +13,7 @@ use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper;
|
||||
use Joomla\CMS\User\UserFactoryInterface;
|
||||
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die;
|
||||
@ -24,8 +25,8 @@ $edit = "index.php?option=com_componentbuilder&view=help_documents&task=help_doc
|
||||
<?php
|
||||
$canCheckin = $this->user->authorise('core.manage', 'com_checkin') || $item->checked_out == $this->user->id || $item->checked_out == 0;
|
||||
$userChkOut = Factory::getContainer()->
|
||||
get(\Joomla\CMS\User\UserFactoryInterface::class)->
|
||||
loadUserById($item->checked_out);
|
||||
get(UserFactoryInterface::class)->
|
||||
loadUserById($item->checked_out ?? 0);
|
||||
$canDo = ComponentbuilderHelper::getActions('help_document',$item,'help_documents');
|
||||
?>
|
||||
<tr class="row<?php echo $i % 2; ?>">
|
||||
|
@ -16,6 +16,7 @@ use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper;
|
||||
use VDM\Joomla\Utilities\ArrayHelper;
|
||||
use VDM\Joomla\Utilities\GetHelper;
|
||||
use VDM\Joomla\Utilities\StringHelper;
|
||||
use Joomla\CMS\User\UserFactoryInterface;
|
||||
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die;
|
||||
@ -27,8 +28,8 @@ $edit = "index.php?option=com_componentbuilder&view=joomla_components&task=jooml
|
||||
<?php
|
||||
$canCheckin = $this->user->authorise('core.manage', 'com_checkin') || $item->checked_out == $this->user->id || $item->checked_out == 0;
|
||||
$userChkOut = Factory::getContainer()->
|
||||
get(\Joomla\CMS\User\UserFactoryInterface::class)->
|
||||
loadUserById($item->checked_out);
|
||||
get(UserFactoryInterface::class)->
|
||||
loadUserById($item->checked_out ?? 0);
|
||||
$canDo = ComponentbuilderHelper::getActions('joomla_component',$item,'joomla_components');
|
||||
?>
|
||||
<tr class="row<?php echo $i % 2; ?>">
|
||||
|
@ -15,6 +15,7 @@ use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper;
|
||||
use VDM\Joomla\Utilities\ArrayHelper;
|
||||
use VDM\Joomla\Utilities\GetHelper;
|
||||
use Joomla\CMS\User\UserFactoryInterface;
|
||||
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die;
|
||||
@ -26,8 +27,8 @@ $edit = "index.php?option=com_componentbuilder&view=joomla_modules&task=joomla_m
|
||||
<?php
|
||||
$canCheckin = $this->user->authorise('core.manage', 'com_checkin') || $item->checked_out == $this->user->id || $item->checked_out == 0;
|
||||
$userChkOut = Factory::getContainer()->
|
||||
get(\Joomla\CMS\User\UserFactoryInterface::class)->
|
||||
loadUserById($item->checked_out);
|
||||
get(UserFactoryInterface::class)->
|
||||
loadUserById($item->checked_out ?? 0);
|
||||
$canDo = ComponentbuilderHelper::getActions('joomla_module',$item,'joomla_modules');
|
||||
?>
|
||||
<tr class="row<?php echo $i % 2; ?>">
|
||||
|
@ -13,6 +13,7 @@ use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper;
|
||||
use Joomla\CMS\User\UserFactoryInterface;
|
||||
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die;
|
||||
@ -24,8 +25,8 @@ $edit = "index.php?option=com_componentbuilder&view=joomla_modules_files_folders
|
||||
<?php
|
||||
$canCheckin = $this->user->authorise('core.manage', 'com_checkin') || $item->checked_out == $this->user->id || $item->checked_out == 0;
|
||||
$userChkOut = Factory::getContainer()->
|
||||
get(\Joomla\CMS\User\UserFactoryInterface::class)->
|
||||
loadUserById($item->checked_out);
|
||||
get(UserFactoryInterface::class)->
|
||||
loadUserById($item->checked_out ?? 0);
|
||||
$canDo = ComponentbuilderHelper::getActions('joomla_module_files_folders_urls',$item,'joomla_modules_files_folders_urls');
|
||||
?>
|
||||
<tr class="row<?php echo $i % 2; ?>">
|
||||
|
@ -13,6 +13,7 @@ use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper;
|
||||
use Joomla\CMS\User\UserFactoryInterface;
|
||||
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die;
|
||||
@ -24,8 +25,8 @@ $edit = "index.php?option=com_componentbuilder&view=joomla_modules_updates&task=
|
||||
<?php
|
||||
$canCheckin = $this->user->authorise('core.manage', 'com_checkin') || $item->checked_out == $this->user->id || $item->checked_out == 0;
|
||||
$userChkOut = Factory::getContainer()->
|
||||
get(\Joomla\CMS\User\UserFactoryInterface::class)->
|
||||
loadUserById($item->checked_out);
|
||||
get(UserFactoryInterface::class)->
|
||||
loadUserById($item->checked_out ?? 0);
|
||||
$canDo = ComponentbuilderHelper::getActions('joomla_module_updates',$item,'joomla_modules_updates');
|
||||
?>
|
||||
<tr class="row<?php echo $i % 2; ?>">
|
||||
|
@ -13,6 +13,7 @@ use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper;
|
||||
use Joomla\CMS\User\UserFactoryInterface;
|
||||
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die;
|
||||
@ -24,8 +25,8 @@ $edit = "index.php?option=com_componentbuilder&view=joomla_plugin_groups&task=jo
|
||||
<?php
|
||||
$canCheckin = $this->user->authorise('core.manage', 'com_checkin') || $item->checked_out == $this->user->id || $item->checked_out == 0;
|
||||
$userChkOut = Factory::getContainer()->
|
||||
get(\Joomla\CMS\User\UserFactoryInterface::class)->
|
||||
loadUserById($item->checked_out);
|
||||
get(UserFactoryInterface::class)->
|
||||
loadUserById($item->checked_out ?? 0);
|
||||
$canDo = ComponentbuilderHelper::getActions('joomla_plugin_group',$item,'joomla_plugin_groups');
|
||||
?>
|
||||
<tr class="row<?php echo $i % 2; ?>">
|
||||
|
@ -15,6 +15,7 @@ use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper;
|
||||
use VDM\Joomla\Utilities\ArrayHelper;
|
||||
use VDM\Joomla\Utilities\GetHelper;
|
||||
use Joomla\CMS\User\UserFactoryInterface;
|
||||
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die;
|
||||
@ -26,8 +27,8 @@ $edit = "index.php?option=com_componentbuilder&view=joomla_plugins&task=joomla_p
|
||||
<?php
|
||||
$canCheckin = $this->user->authorise('core.manage', 'com_checkin') || $item->checked_out == $this->user->id || $item->checked_out == 0;
|
||||
$userChkOut = Factory::getContainer()->
|
||||
get(\Joomla\CMS\User\UserFactoryInterface::class)->
|
||||
loadUserById($item->checked_out);
|
||||
get(UserFactoryInterface::class)->
|
||||
loadUserById($item->checked_out ?? 0);
|
||||
$canDo = ComponentbuilderHelper::getActions('joomla_plugin',$item,'joomla_plugins');
|
||||
?>
|
||||
<tr class="row<?php echo $i % 2; ?>">
|
||||
|
@ -13,6 +13,7 @@ use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper;
|
||||
use Joomla\CMS\User\UserFactoryInterface;
|
||||
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die;
|
||||
@ -24,8 +25,8 @@ $edit = "index.php?option=com_componentbuilder&view=joomla_plugins_files_folders
|
||||
<?php
|
||||
$canCheckin = $this->user->authorise('core.manage', 'com_checkin') || $item->checked_out == $this->user->id || $item->checked_out == 0;
|
||||
$userChkOut = Factory::getContainer()->
|
||||
get(\Joomla\CMS\User\UserFactoryInterface::class)->
|
||||
loadUserById($item->checked_out);
|
||||
get(UserFactoryInterface::class)->
|
||||
loadUserById($item->checked_out ?? 0);
|
||||
$canDo = ComponentbuilderHelper::getActions('joomla_plugin_files_folders_urls',$item,'joomla_plugins_files_folders_urls');
|
||||
?>
|
||||
<tr class="row<?php echo $i % 2; ?>">
|
||||
|
@ -13,6 +13,7 @@ use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper;
|
||||
use Joomla\CMS\User\UserFactoryInterface;
|
||||
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die;
|
||||
@ -24,8 +25,8 @@ $edit = "index.php?option=com_componentbuilder&view=joomla_plugins_updates&task=
|
||||
<?php
|
||||
$canCheckin = $this->user->authorise('core.manage', 'com_checkin') || $item->checked_out == $this->user->id || $item->checked_out == 0;
|
||||
$userChkOut = Factory::getContainer()->
|
||||
get(\Joomla\CMS\User\UserFactoryInterface::class)->
|
||||
loadUserById($item->checked_out);
|
||||
get(UserFactoryInterface::class)->
|
||||
loadUserById($item->checked_out ?? 0);
|
||||
$canDo = ComponentbuilderHelper::getActions('joomla_plugin_updates',$item,'joomla_plugins_updates');
|
||||
?>
|
||||
<tr class="row<?php echo $i % 2; ?>">
|
||||
|
@ -13,6 +13,7 @@ use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper;
|
||||
use Joomla\CMS\User\UserFactoryInterface;
|
||||
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die;
|
||||
@ -24,8 +25,8 @@ $edit = "index.php?option=com_componentbuilder&view=joomla_powers&task=joomla_po
|
||||
<?php
|
||||
$canCheckin = $this->user->authorise('core.manage', 'com_checkin') || $item->checked_out == $this->user->id || $item->checked_out == 0;
|
||||
$userChkOut = Factory::getContainer()->
|
||||
get(\Joomla\CMS\User\UserFactoryInterface::class)->
|
||||
loadUserById($item->checked_out);
|
||||
get(UserFactoryInterface::class)->
|
||||
loadUserById($item->checked_out ?? 0);
|
||||
$canDo = ComponentbuilderHelper::getActions('joomla_power',$item,'joomla_powers');
|
||||
?>
|
||||
<tr class="row<?php echo $i % 2; ?>">
|
||||
|
@ -16,6 +16,7 @@ use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper;
|
||||
use VDM\Joomla\Utilities\JsonHelper;
|
||||
use VDM\Joomla\Utilities\ArrayHelper;
|
||||
use VDM\Joomla\Utilities\StringHelper;
|
||||
use Joomla\CMS\User\UserFactoryInterface;
|
||||
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die;
|
||||
@ -27,8 +28,8 @@ $edit = "index.php?option=com_componentbuilder&view=language_translations&task=l
|
||||
<?php
|
||||
$canCheckin = $this->user->authorise('core.manage', 'com_checkin') || $item->checked_out == $this->user->id || $item->checked_out == 0;
|
||||
$userChkOut = Factory::getContainer()->
|
||||
get(\Joomla\CMS\User\UserFactoryInterface::class)->
|
||||
loadUserById($item->checked_out);
|
||||
get(UserFactoryInterface::class)->
|
||||
loadUserById($item->checked_out ?? 0);
|
||||
$canDo = ComponentbuilderHelper::getActions('language_translation',$item,'language_translations');
|
||||
?>
|
||||
<tr class="row<?php echo $i % 2; ?>">
|
||||
|
@ -13,6 +13,7 @@ use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper;
|
||||
use Joomla\CMS\User\UserFactoryInterface;
|
||||
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die;
|
||||
@ -24,8 +25,8 @@ $edit = "index.php?option=com_componentbuilder&view=languages&task=language.edit
|
||||
<?php
|
||||
$canCheckin = $this->user->authorise('core.manage', 'com_checkin') || $item->checked_out == $this->user->id || $item->checked_out == 0;
|
||||
$userChkOut = Factory::getContainer()->
|
||||
get(\Joomla\CMS\User\UserFactoryInterface::class)->
|
||||
loadUserById($item->checked_out);
|
||||
get(UserFactoryInterface::class)->
|
||||
loadUserById($item->checked_out ?? 0);
|
||||
$canDo = ComponentbuilderHelper::getActions('language',$item,'languages');
|
||||
?>
|
||||
<tr class="row<?php echo $i % 2; ?>">
|
||||
|
@ -14,6 +14,7 @@ use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper;
|
||||
use VDM\Joomla\Utilities\StringHelper;
|
||||
use Joomla\CMS\User\UserFactoryInterface;
|
||||
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die;
|
||||
@ -25,8 +26,8 @@ $edit = "index.php?option=com_componentbuilder&view=layouts&task=layout.edit";
|
||||
<?php
|
||||
$canCheckin = $this->user->authorise('core.manage', 'com_checkin') || $item->checked_out == $this->user->id || $item->checked_out == 0;
|
||||
$userChkOut = Factory::getContainer()->
|
||||
get(\Joomla\CMS\User\UserFactoryInterface::class)->
|
||||
loadUserById($item->checked_out);
|
||||
get(UserFactoryInterface::class)->
|
||||
loadUserById($item->checked_out ?? 0);
|
||||
$canDo = ComponentbuilderHelper::getActions('layout',$item,'layouts');
|
||||
?>
|
||||
<tr class="row<?php echo $i % 2; ?>">
|
||||
|
@ -15,6 +15,7 @@ use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper;
|
||||
use VDM\Joomla\Utilities\ArrayHelper;
|
||||
use VDM\Joomla\Utilities\GetHelper;
|
||||
use Joomla\CMS\User\UserFactoryInterface;
|
||||
use Joomla\CMS\Uri\Uri;
|
||||
|
||||
// No direct access to this file
|
||||
@ -27,8 +28,8 @@ $edit = "index.php?option=com_componentbuilder&view=libraries&task=library.edit"
|
||||
<?php
|
||||
$canCheckin = $this->user->authorise('core.manage', 'com_checkin') || $item->checked_out == $this->user->id || $item->checked_out == 0;
|
||||
$userChkOut = Factory::getContainer()->
|
||||
get(\Joomla\CMS\User\UserFactoryInterface::class)->
|
||||
loadUserById($item->checked_out);
|
||||
get(UserFactoryInterface::class)->
|
||||
loadUserById($item->checked_out ?? 0);
|
||||
$canDo = ComponentbuilderHelper::getActions('library',$item,'libraries');
|
||||
?>
|
||||
<tr class="row<?php echo $i % 2; ?>">
|
||||
|
@ -13,6 +13,7 @@ use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper;
|
||||
use Joomla\CMS\User\UserFactoryInterface;
|
||||
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die;
|
||||
@ -24,8 +25,8 @@ $edit = "index.php?option=com_componentbuilder&view=libraries_config&task=librar
|
||||
<?php
|
||||
$canCheckin = $this->user->authorise('core.manage', 'com_checkin') || $item->checked_out == $this->user->id || $item->checked_out == 0;
|
||||
$userChkOut = Factory::getContainer()->
|
||||
get(\Joomla\CMS\User\UserFactoryInterface::class)->
|
||||
loadUserById($item->checked_out);
|
||||
get(UserFactoryInterface::class)->
|
||||
loadUserById($item->checked_out ?? 0);
|
||||
$canDo = ComponentbuilderHelper::getActions('library_config',$item,'libraries_config');
|
||||
?>
|
||||
<tr class="row<?php echo $i % 2; ?>">
|
||||
|
@ -13,6 +13,7 @@ use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper;
|
||||
use Joomla\CMS\User\UserFactoryInterface;
|
||||
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die;
|
||||
@ -24,8 +25,8 @@ $edit = "index.php?option=com_componentbuilder&view=libraries_files_folders_urls
|
||||
<?php
|
||||
$canCheckin = $this->user->authorise('core.manage', 'com_checkin') || $item->checked_out == $this->user->id || $item->checked_out == 0;
|
||||
$userChkOut = Factory::getContainer()->
|
||||
get(\Joomla\CMS\User\UserFactoryInterface::class)->
|
||||
loadUserById($item->checked_out);
|
||||
get(UserFactoryInterface::class)->
|
||||
loadUserById($item->checked_out ?? 0);
|
||||
$canDo = ComponentbuilderHelper::getActions('library_files_folders_urls',$item,'libraries_files_folders_urls');
|
||||
?>
|
||||
<tr class="row<?php echo $i % 2; ?>">
|
||||
|
@ -13,6 +13,7 @@ use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper;
|
||||
use Joomla\CMS\User\UserFactoryInterface;
|
||||
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die;
|
||||
@ -24,8 +25,8 @@ $edit = "index.php?option=com_componentbuilder&view=placeholders&task=placeholde
|
||||
<?php
|
||||
$canCheckin = $this->user->authorise('core.manage', 'com_checkin') || $item->checked_out == $this->user->id || $item->checked_out == 0;
|
||||
$userChkOut = Factory::getContainer()->
|
||||
get(\Joomla\CMS\User\UserFactoryInterface::class)->
|
||||
loadUserById($item->checked_out);
|
||||
get(UserFactoryInterface::class)->
|
||||
loadUserById($item->checked_out ?? 0);
|
||||
$canDo = ComponentbuilderHelper::getActions('placeholder',$item,'placeholders');
|
||||
?>
|
||||
<tr class="row<?php echo $i % 2; ?>">
|
||||
|
@ -13,6 +13,7 @@ use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper;
|
||||
use Joomla\CMS\User\UserFactoryInterface;
|
||||
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die;
|
||||
@ -24,8 +25,8 @@ $edit = "index.php?option=com_componentbuilder&view=powers&task=power.edit";
|
||||
<?php
|
||||
$canCheckin = $this->user->authorise('core.manage', 'com_checkin') || $item->checked_out == $this->user->id || $item->checked_out == 0;
|
||||
$userChkOut = Factory::getContainer()->
|
||||
get(\Joomla\CMS\User\UserFactoryInterface::class)->
|
||||
loadUserById($item->checked_out);
|
||||
get(UserFactoryInterface::class)->
|
||||
loadUserById($item->checked_out ?? 0);
|
||||
$canDo = ComponentbuilderHelper::getActions('power',$item,'powers');
|
||||
?>
|
||||
<tr class="row<?php echo $i % 2; ?>">
|
||||
|
@ -13,6 +13,7 @@ use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper;
|
||||
use Joomla\CMS\User\UserFactoryInterface;
|
||||
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die;
|
||||
@ -24,8 +25,8 @@ $edit = "index.php?option=com_componentbuilder&view=repositories&task=repository
|
||||
<?php
|
||||
$canCheckin = $this->user->authorise('core.manage', 'com_checkin') || $item->checked_out == $this->user->id || $item->checked_out == 0;
|
||||
$userChkOut = Factory::getContainer()->
|
||||
get(\Joomla\CMS\User\UserFactoryInterface::class)->
|
||||
loadUserById($item->checked_out);
|
||||
get(UserFactoryInterface::class)->
|
||||
loadUserById($item->checked_out ?? 0);
|
||||
$canDo = ComponentbuilderHelper::getActions('repository',$item,'repositories');
|
||||
?>
|
||||
<tr class="row<?php echo $i % 2; ?>">
|
||||
|
@ -13,6 +13,7 @@ use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper;
|
||||
use Joomla\CMS\User\UserFactoryInterface;
|
||||
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die;
|
||||
@ -24,8 +25,8 @@ $edit = "index.php?option=com_componentbuilder&view=servers&task=server.edit";
|
||||
<?php
|
||||
$canCheckin = $this->user->authorise('core.manage', 'com_checkin') || $item->checked_out == $this->user->id || $item->checked_out == 0;
|
||||
$userChkOut = Factory::getContainer()->
|
||||
get(\Joomla\CMS\User\UserFactoryInterface::class)->
|
||||
loadUserById($item->checked_out);
|
||||
get(UserFactoryInterface::class)->
|
||||
loadUserById($item->checked_out ?? 0);
|
||||
$canDo = ComponentbuilderHelper::getActions('server',$item,'servers');
|
||||
?>
|
||||
<tr class="row<?php echo $i % 2; ?>">
|
||||
|
@ -14,6 +14,7 @@ use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper;
|
||||
use VDM\Joomla\Utilities\StringHelper;
|
||||
use Joomla\CMS\User\UserFactoryInterface;
|
||||
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die;
|
||||
@ -25,8 +26,8 @@ $edit = "index.php?option=com_componentbuilder&view=site_views&task=site_view.ed
|
||||
<?php
|
||||
$canCheckin = $this->user->authorise('core.manage', 'com_checkin') || $item->checked_out == $this->user->id || $item->checked_out == 0;
|
||||
$userChkOut = Factory::getContainer()->
|
||||
get(\Joomla\CMS\User\UserFactoryInterface::class)->
|
||||
loadUserById($item->checked_out);
|
||||
get(UserFactoryInterface::class)->
|
||||
loadUserById($item->checked_out ?? 0);
|
||||
$canDo = ComponentbuilderHelper::getActions('site_view',$item,'site_views');
|
||||
?>
|
||||
<tr class="row<?php echo $i % 2; ?>">
|
||||
|
@ -13,6 +13,7 @@ use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper;
|
||||
use Joomla\CMS\User\UserFactoryInterface;
|
||||
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die;
|
||||
@ -24,8 +25,8 @@ $edit = "index.php?option=com_componentbuilder&view=snippet_types&task=snippet_t
|
||||
<?php
|
||||
$canCheckin = $this->user->authorise('core.manage', 'com_checkin') || $item->checked_out == $this->user->id || $item->checked_out == 0;
|
||||
$userChkOut = Factory::getContainer()->
|
||||
get(\Joomla\CMS\User\UserFactoryInterface::class)->
|
||||
loadUserById($item->checked_out);
|
||||
get(UserFactoryInterface::class)->
|
||||
loadUserById($item->checked_out ?? 0);
|
||||
$canDo = ComponentbuilderHelper::getActions('snippet_type',$item,'snippet_types');
|
||||
?>
|
||||
<tr class="row<?php echo $i % 2; ?>">
|
||||
|
@ -13,6 +13,7 @@ use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper;
|
||||
use Joomla\CMS\User\UserFactoryInterface;
|
||||
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die;
|
||||
@ -24,8 +25,8 @@ $edit = "index.php?option=com_componentbuilder&view=snippets&task=snippet.edit";
|
||||
<?php
|
||||
$canCheckin = $this->user->authorise('core.manage', 'com_checkin') || $item->checked_out == $this->user->id || $item->checked_out == 0;
|
||||
$userChkOut = Factory::getContainer()->
|
||||
get(\Joomla\CMS\User\UserFactoryInterface::class)->
|
||||
loadUserById($item->checked_out);
|
||||
get(UserFactoryInterface::class)->
|
||||
loadUserById($item->checked_out ?? 0);
|
||||
$canDo = ComponentbuilderHelper::getActions('snippet',$item,'snippets');
|
||||
?>
|
||||
<tr class="row<?php echo $i % 2; ?>">
|
||||
|
@ -14,6 +14,7 @@ use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper;
|
||||
use VDM\Joomla\Utilities\StringHelper;
|
||||
use Joomla\CMS\User\UserFactoryInterface;
|
||||
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die;
|
||||
@ -25,8 +26,8 @@ $edit = "index.php?option=com_componentbuilder&view=templates&task=template.edit
|
||||
<?php
|
||||
$canCheckin = $this->user->authorise('core.manage', 'com_checkin') || $item->checked_out == $this->user->id || $item->checked_out == 0;
|
||||
$userChkOut = Factory::getContainer()->
|
||||
get(\Joomla\CMS\User\UserFactoryInterface::class)->
|
||||
loadUserById($item->checked_out);
|
||||
get(UserFactoryInterface::class)->
|
||||
loadUserById($item->checked_out ?? 0);
|
||||
$canDo = ComponentbuilderHelper::getActions('template',$item,'templates');
|
||||
?>
|
||||
<tr class="row<?php echo $i % 2; ?>">
|
||||
|
@ -13,6 +13,7 @@ use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper;
|
||||
use Joomla\CMS\User\UserFactoryInterface;
|
||||
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die;
|
||||
@ -24,8 +25,8 @@ $edit = "index.php?option=com_componentbuilder&view=validation_rules&task=valida
|
||||
<?php
|
||||
$canCheckin = $this->user->authorise('core.manage', 'com_checkin') || $item->checked_out == $this->user->id || $item->checked_out == 0;
|
||||
$userChkOut = Factory::getContainer()->
|
||||
get(\Joomla\CMS\User\UserFactoryInterface::class)->
|
||||
loadUserById($item->checked_out);
|
||||
get(UserFactoryInterface::class)->
|
||||
loadUserById($item->checked_out ?? 0);
|
||||
$canDo = ComponentbuilderHelper::getActions('validation_rule',$item,'validation_rules');
|
||||
?>
|
||||
<tr class="row<?php echo $i % 2; ?>">
|
||||
|
@ -1,15 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<extension type="component" version="5.0" method="upgrade">
|
||||
<name>COM_COMPONENTBUILDER</name>
|
||||
<creationDate>7th November, 2024</creationDate>
|
||||
<creationDate>16th December, 2024</creationDate>
|
||||
<author>Llewellyn van der Merwe</author>
|
||||
<authorEmail>joomla@vdm.io</authorEmail>
|
||||
<authorUrl>https://dev.vdm.io</authorUrl>
|
||||
<copyright>Copyright (C) 2015 Vast Development Method. All rights reserved.</copyright>
|
||||
<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
|
||||
<version>5.0.4-beta1</version>
|
||||
<version>5.0.4-beta2</version>
|
||||
<description><![CDATA[
|
||||
<h1>Component Builder (v.5.0.4-beta1)</h1>
|
||||
<h1>Component Builder (v.5.0.4-beta2)</h1>
|
||||
<div style="clear: both;"></div>
|
||||
<p>The Component Builder for [Joomla](https://extensions.joomla.org/extension/component-builder/) is highly advanced tool that is truly able to build extremely complex components in a fraction of the time.
|
||||
|
||||
|
@ -131,10 +131,28 @@
|
||||
<element>pkg_component_builder</element>
|
||||
<type>package</type>
|
||||
<client>site</client>
|
||||
<version>5.0.4-beta1</version>
|
||||
<version>5.0.4-beta</version>
|
||||
<infourl title="Component Builder!">https://dev.vdm.io</infourl>
|
||||
<downloads>
|
||||
<downloadurl type="full" format="zip">https://git.vdm.dev/api/v1/repos/joomla/pkg-component-builder/archive/v5.0.4-beta1.zip</downloadurl>
|
||||
<downloadurl type="full" format="zip">https://git.vdm.dev/api/v1/repos/joomla/pkg-component-builder/archive/v5.0.4-beta2.zip</downloadurl>
|
||||
</downloads>
|
||||
<tags>
|
||||
<tag>beta</tag>
|
||||
</tags>
|
||||
<maintainer>Llewellyn van der Merwe</maintainer>
|
||||
<maintainerurl>https://dev.vdm.io</maintainerurl>
|
||||
<targetplatform name="joomla" version="5\.[012]"/>
|
||||
</update>
|
||||
<update>
|
||||
<name>Component Builder</name>
|
||||
<description>Builds Complex Joomla Components</description>
|
||||
<element>pkg_component_builder</element>
|
||||
<type>package</type>
|
||||
<client>site</client>
|
||||
<version>5.0.4-beta2</version>
|
||||
<infourl title="Component Builder!">https://dev.vdm.io</infourl>
|
||||
<downloads>
|
||||
<downloadurl type="full" format="zip">https://git.vdm.dev/api/v1/repos/joomla/pkg-component-builder/archive/v5.0.4-beta2.zip</downloadurl>
|
||||
</downloads>
|
||||
<tags>
|
||||
<tag>beta</tag>
|
||||
|
@ -28,10 +28,10 @@ final class Http extends JoomlaHttp
|
||||
/**
|
||||
* The token
|
||||
*
|
||||
* @var string
|
||||
* @var string|null
|
||||
* @since 3.2.0
|
||||
*/
|
||||
protected string $_token_; // to avoid collisions (but allow swapping)
|
||||
protected ?string $_token_; // to avoid collisions (but allow swapping)
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
@ -41,7 +41,7 @@ final class Http extends JoomlaHttp
|
||||
* @since 3.2.0
|
||||
* @throws \InvalidArgumentException
|
||||
**/
|
||||
public function __construct(?string $token)
|
||||
public function __construct(?string $token = null)
|
||||
{
|
||||
// setup config
|
||||
$config = [
|
||||
@ -52,7 +52,7 @@ final class Http extends JoomlaHttp
|
||||
];
|
||||
|
||||
// add the token if given
|
||||
if (is_string($token))
|
||||
if (is_string($token) && !empty($token))
|
||||
{
|
||||
$config['headers']['Authorization'] = 'token ' . $token;
|
||||
$this->_token_ = $token;
|
||||
@ -79,9 +79,16 @@ final class Http extends JoomlaHttp
|
||||
]
|
||||
);
|
||||
|
||||
// add the token
|
||||
$headers['Authorization'] = 'token ' . $token;
|
||||
$this->_token_ = $token;
|
||||
if (empty($token))
|
||||
{
|
||||
unset($headers['Authorization']);
|
||||
}
|
||||
else
|
||||
{
|
||||
// add the token
|
||||
$headers['Authorization'] = 'token ' . $token;
|
||||
$this->_token_ = $token;
|
||||
}
|
||||
|
||||
$this->setOption('headers', $headers);
|
||||
}
|
||||
|
@ -108,8 +108,7 @@ abstract class BaseTable implements TableInterface
|
||||
'store' => NULL,
|
||||
'tab_name' => NULL,
|
||||
'db' => [
|
||||
'type' => 'INT(10) unsigned',
|
||||
'default' => '0',
|
||||
'type' => 'INT unsigned',
|
||||
'null_switch' => 'NULL',
|
||||
'key' => true,
|
||||
'key_name' => 'modifiedby'
|
||||
@ -125,7 +124,6 @@ abstract class BaseTable implements TableInterface
|
||||
'tab_name' => NULL,
|
||||
'db' => [
|
||||
'type' => 'DATETIME',
|
||||
'default' => '0000-00-00 00:00:00',
|
||||
'null_switch' => 'NULL'
|
||||
]
|
||||
],
|
||||
@ -138,7 +136,7 @@ abstract class BaseTable implements TableInterface
|
||||
'store' => NULL,
|
||||
'tab_name' => NULL,
|
||||
'db' => [
|
||||
'type' => 'INT(10) unsigned',
|
||||
'type' => 'INT unsigned',
|
||||
'default' => '0',
|
||||
'null_switch' => 'NULL',
|
||||
'key' => true,
|
||||
@ -155,7 +153,7 @@ abstract class BaseTable implements TableInterface
|
||||
'tab_name' => NULL,
|
||||
'db' => [
|
||||
'type' => 'DATETIME',
|
||||
'default' => '0000-00-00 00:00:00',
|
||||
'default' => 'CURRENT_TIMESTAMP',
|
||||
'null_switch' => 'NULL'
|
||||
]
|
||||
],
|
||||
@ -168,8 +166,7 @@ abstract class BaseTable implements TableInterface
|
||||
'store' => NULL,
|
||||
'tab_name' => NULL,
|
||||
'db' => [
|
||||
'type' => 'INT(10) unsigned',
|
||||
'default' => '0',
|
||||
'type' => 'INT unsigned',
|
||||
'null_switch' => 'NULL',
|
||||
'key' => true,
|
||||
'key_name' => 'checkout'
|
||||
@ -185,7 +182,6 @@ abstract class BaseTable implements TableInterface
|
||||
'tab_name' => NULL,
|
||||
'db' => [
|
||||
'type' => 'DATETIME',
|
||||
'default' => '0000-00-00 00:00:00',
|
||||
'null_switch' => 'NULL'
|
||||
]
|
||||
],
|
||||
|
@ -12,41 +12,17 @@
|
||||
namespace VDM\Joomla\Abstraction;
|
||||
|
||||
|
||||
use Joomla\Registry\Registry as JoomlaRegistry;
|
||||
use VDM\Joomla\Utilities\String\ClassfunctionHelper;
|
||||
use VDM\Joomla\Abstraction\Registry;
|
||||
|
||||
|
||||
/**
|
||||
* Config
|
||||
* A Dynamic Function Registry
|
||||
*
|
||||
* @since 3.2.0
|
||||
* @since 5.0.4
|
||||
*/
|
||||
abstract class BaseConfig extends JoomlaRegistry
|
||||
abstract class FunctionRegistry extends Registry
|
||||
{
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
// Instantiate the internal data object.
|
||||
$this->data = new \stdClass();
|
||||
}
|
||||
|
||||
/**
|
||||
* setting any config value
|
||||
*
|
||||
* @param string $key The value's key/path name
|
||||
* @param mixed $value Optional default value, returned if the internal value is null.
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function __set($key, $value)
|
||||
{
|
||||
$this->set($key, $value);
|
||||
}
|
||||
|
||||
/**
|
||||
* getting any valid value
|
||||
*
|
||||
@ -76,7 +52,7 @@ abstract class BaseConfig extends JoomlaRegistry
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function get($path, $default = null)
|
||||
public function get(string $path, $default = null): mixed
|
||||
{
|
||||
// function name with no underscores
|
||||
$method = 'get' . ucfirst((string) ClassfunctionHelper::safe(str_replace('_', '', $path)));
|
||||
@ -86,7 +62,8 @@ abstract class BaseConfig extends JoomlaRegistry
|
||||
{
|
||||
return $value;
|
||||
}
|
||||
elseif (method_exists($this, $method))
|
||||
// Use the method if it's callable and not excluded
|
||||
elseif ($this->isCallableMethod($method))
|
||||
{
|
||||
$value = $this->{$method}($default);
|
||||
|
||||
@ -104,19 +81,46 @@ abstract class BaseConfig extends JoomlaRegistry
|
||||
* @param string $path Parent registry Path (e.g. joomla.content.showauthor)
|
||||
* @param mixed $value Value of entry
|
||||
*
|
||||
* @return mixed The value of the that has been set.
|
||||
* @return mixed The values of the path that has been set.
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function appendArray(string $path, $value)
|
||||
{
|
||||
// check if it does not exist
|
||||
if (!$this->exists($path))
|
||||
return $this->add($path, $value, true)->get($path);
|
||||
}
|
||||
|
||||
/**
|
||||
* Determines if a method is callable on this object, excluding certain methods.
|
||||
*
|
||||
* This method checks if a method exists on this object and is callable, but excludes
|
||||
* certain methods to prevent unintended access or recursion. It helps to safely determine
|
||||
* if a dynamic getter method can be invoked without interfering with core methods.
|
||||
*
|
||||
* @param string $method The method name to check.
|
||||
*
|
||||
* @return bool True if the method is callable and not excluded, false otherwise.
|
||||
* @since 5.0.4
|
||||
*/
|
||||
protected function isCallableMethod(string $method): bool
|
||||
{
|
||||
// List of methods to exclude from dynamic access
|
||||
$excludedMethods = [
|
||||
'getActive',
|
||||
'get',
|
||||
'getSeparator',
|
||||
'getIterator',
|
||||
'getName',
|
||||
'getActiveKeys'
|
||||
];
|
||||
|
||||
// Check if the method exists and is not excluded
|
||||
if (method_exists($this, $method) && !in_array($method, $excludedMethods, true))
|
||||
{
|
||||
$this->set($path, []);
|
||||
return true;
|
||||
}
|
||||
|
||||
return $this->append($path, $value);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -17,6 +17,8 @@ use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\Filesystem\Folder;
|
||||
use Joomla\CMS\Application\CMSApplication;
|
||||
use VDM\Joomla\Gitea\Repository\Contents;
|
||||
use VDM\Joomla\Interfaces\Git\ApiInterface as Api;
|
||||
use VDM\Joomla\Componentbuilder\Network\Resolve;
|
||||
use VDM\Joomla\Utilities\FileHelper;
|
||||
use VDM\Joomla\Utilities\JsonHelper;
|
||||
use VDM\Joomla\Interfaces\GrepInterface;
|
||||
@ -50,6 +52,14 @@ abstract class Grep implements GrepInterface
|
||||
**/
|
||||
public ?array $paths;
|
||||
|
||||
/**
|
||||
* The Grep target [network]
|
||||
*
|
||||
* @var string
|
||||
* @since 5.0.4
|
||||
**/
|
||||
protected ?string $target = null;
|
||||
|
||||
/**
|
||||
* Order of global search
|
||||
*
|
||||
@ -82,6 +92,14 @@ abstract class Grep implements GrepInterface
|
||||
*/
|
||||
protected string $index_path = 'index.json';
|
||||
|
||||
/**
|
||||
* The VDM global API base
|
||||
*
|
||||
* @var string
|
||||
* @since 5.0.4
|
||||
**/
|
||||
protected string $api_base = '//git.vdm.dev/';
|
||||
|
||||
/**
|
||||
* Gitea Repository Contents
|
||||
*
|
||||
@ -90,6 +108,14 @@ abstract class Grep implements GrepInterface
|
||||
**/
|
||||
protected Contents $contents;
|
||||
|
||||
/**
|
||||
* The Resolve Class.
|
||||
*
|
||||
* @var Resolve
|
||||
* @since 5.0.4
|
||||
*/
|
||||
protected Resolve $resolve;
|
||||
|
||||
/**
|
||||
* Joomla Application object
|
||||
*
|
||||
@ -101,17 +127,22 @@ abstract class Grep implements GrepInterface
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param Contents $contents The Gitea Repository Contents object.
|
||||
* @param array $paths The approved paths
|
||||
* @param string|null $path The local path
|
||||
* @param CMSApplication|null $app The CMS Application object.
|
||||
* @param Contents $contents The Gitea Repository Contents object.
|
||||
* @param Resolve $resolve The Resolve Class.
|
||||
* @param array $paths The approved paths
|
||||
* @param string|null $path The local path
|
||||
* @param CMSApplication|null $app The CMS Application object.
|
||||
*
|
||||
* @throws \Exception
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function __construct(Contents $contents, array $paths, ?string $path = null, ?CMSApplication $app = null)
|
||||
public function __construct(
|
||||
Contents $contents, Resolve $resolve,
|
||||
array $paths, ?string $path = null,
|
||||
?CMSApplication $app = null)
|
||||
{
|
||||
$this->contents = $contents;
|
||||
$this->resolve = $resolve;
|
||||
$this->paths = $paths;
|
||||
$this->path = $path;
|
||||
$this->app = $app ?: Factory::getApplication();
|
||||
@ -264,6 +295,38 @@ abstract class Grep implements GrepInterface
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Loads API config using the provided base URL and token.
|
||||
*
|
||||
* This method checks if the base URL contains 'https://git.vdm.dev/'.
|
||||
* If it does, it uses the token as is (which may be null).
|
||||
* If not, it ensures the token is not null by defaulting to an empty string.
|
||||
*
|
||||
* @param Api $api The api object with a load_ method.
|
||||
* @param string|null $base The base URL path.
|
||||
* @param string|null $token The token for authentication (can be null).
|
||||
*
|
||||
* @return void
|
||||
* @since 5.0.4
|
||||
*/
|
||||
public function loadApi(Api $api, ?string $base, ?string $token): void
|
||||
{
|
||||
// Determine the token to use based on the base URL
|
||||
if ($base && strpos($base, $this->api_base) !== false)
|
||||
{
|
||||
// If base contains $this->api_base = https://git.vdm.dev/, use the token as is
|
||||
$tokenToUse = $token;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Otherwise, ensure the token is not null (use empty string if null)
|
||||
$tokenToUse = $token ?? '';
|
||||
}
|
||||
|
||||
// Load the content with the determined base and token
|
||||
$api->load_($base, $tokenToUse);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set repository messages and errors based on given conditions.
|
||||
*
|
||||
@ -584,7 +647,7 @@ abstract class Grep implements GrepInterface
|
||||
try
|
||||
{
|
||||
// load the base and token if set
|
||||
$this->contents->load_($path->base ?? null, $path->token ?? null);
|
||||
$this->loadApi($this->contents, $path->base ?? null, $path->token ?? null);
|
||||
$path->index = $this->contents->get($path->organisation, $path->repository, $this->getIndexPath(), $this->getBranchName($path));
|
||||
}
|
||||
catch (\Exception $e)
|
||||
@ -640,6 +703,12 @@ abstract class Grep implements GrepInterface
|
||||
if (isset($path->organisation) && strlen($path->organisation) > 1 &&
|
||||
isset($path->repository) && strlen($path->repository) > 1)
|
||||
{
|
||||
// resolve API if needed
|
||||
if (!empty($path->base))
|
||||
{
|
||||
$this->resolve->api($this->target ?? $path->repository, $path->base, $path->organisation, $path->repository);
|
||||
}
|
||||
|
||||
// build the path
|
||||
$path->path = trim($path->organisation) . '/' . trim($path->repository);
|
||||
|
||||
|
@ -12,6 +12,7 @@
|
||||
namespace VDM\Joomla\Abstraction;
|
||||
|
||||
|
||||
use Joomla\Registry\Factory as FormatFactory;
|
||||
use VDM\Joomla\Interfaces\Registryinterface;
|
||||
use VDM\Joomla\Abstraction\ActiveRegistry;
|
||||
|
||||
@ -21,18 +22,238 @@ use VDM\Joomla\Abstraction\ActiveRegistry;
|
||||
*
|
||||
* Don't use this beyond 10 dimensional depth for best performance.
|
||||
*
|
||||
* @since 3.2.0
|
||||
* @since 3.2.0
|
||||
* @since 5.0.4 Joomla Registry Compatible
|
||||
*/
|
||||
abstract class Registry extends ActiveRegistry implements Registryinterface
|
||||
abstract class Registry extends ActiveRegistry implements Registryinterface, \JsonSerializable, \ArrayAccess, \IteratorAggregate, \Countable
|
||||
{
|
||||
/**
|
||||
* Path separator
|
||||
*
|
||||
* @var string|null
|
||||
* @since 3.2.0
|
||||
* @since 3.2.0
|
||||
*/
|
||||
protected ?string $separator = '.';
|
||||
|
||||
/**
|
||||
* The name of the registry.
|
||||
*
|
||||
* @var string|null
|
||||
* @since 5.0.4
|
||||
*/
|
||||
protected ?string $name = null;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* Initializes the Registry object with optional data.
|
||||
*
|
||||
* @param mixed $data Optional data to load into the registry.
|
||||
* Can be an array, string, or object.
|
||||
* @param string|null $separator The path separator, and empty string will flatten the registry.
|
||||
* @since 5.0.4
|
||||
*/
|
||||
public function __construct($data = null, ?string $separator = null)
|
||||
{
|
||||
// we don't allow null on initialization (default is a dot)
|
||||
// so that all class inheritance can override the separator property
|
||||
// use an empty string if you want to flatten the registry
|
||||
if ($separator !== null)
|
||||
{
|
||||
$this->setSeparator($separator);
|
||||
}
|
||||
|
||||
if ($data !== null)
|
||||
{
|
||||
if (is_array($data))
|
||||
{
|
||||
$this->loadArray($data);
|
||||
}
|
||||
elseif (is_string($data))
|
||||
{
|
||||
$this->loadString($data);
|
||||
}
|
||||
elseif (is_object($data))
|
||||
{
|
||||
$this->loadObject($data);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Magic method to get a value from the registry.
|
||||
*
|
||||
* Allows for accessing registry data using object property syntax.
|
||||
*
|
||||
* @param string $name The name of the property to get.
|
||||
*
|
||||
* @return mixed The value of the property, or null if not found.
|
||||
* @since 5.0.4
|
||||
*/
|
||||
public function __get($name)
|
||||
{
|
||||
return $this->get($name);
|
||||
}
|
||||
|
||||
/**
|
||||
* Magic method to set a value in the registry.
|
||||
*
|
||||
* Allows for setting registry data using object property syntax.
|
||||
*
|
||||
* @param string $name The name of the property to set.
|
||||
* @param mixed $value The value to set.
|
||||
*
|
||||
* @return void
|
||||
* @since 5.0.4
|
||||
*/
|
||||
public function __set($name, $value)
|
||||
{
|
||||
$this->set($name, $value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Magic method to check if a property is set in the registry.
|
||||
*
|
||||
* Allows for using isset() on registry properties.
|
||||
*
|
||||
* @param string $name The name of the property to check.
|
||||
*
|
||||
* @return bool True if the property is set, false otherwise.
|
||||
* @since 5.0.4
|
||||
*/
|
||||
public function __isset($name)
|
||||
{
|
||||
return $this->exists($name);
|
||||
}
|
||||
|
||||
/**
|
||||
* Magic method to unset a property in the registry.
|
||||
*
|
||||
* Allows for using unset() on registry properties.
|
||||
*
|
||||
* @param string $name The name of the property to unset.
|
||||
*
|
||||
* @return void
|
||||
* @since 5.0.4
|
||||
*/
|
||||
public function __unset($name)
|
||||
{
|
||||
$this->remove($name);
|
||||
}
|
||||
|
||||
/**
|
||||
* Magic method to clone the registry.
|
||||
*
|
||||
* Performs a deep copy of the registry data.
|
||||
*
|
||||
* @return void
|
||||
* @since 5.0.4
|
||||
*/
|
||||
public function __clone()
|
||||
{
|
||||
$this->active = unserialize(serialize($this->active));
|
||||
}
|
||||
|
||||
/**
|
||||
* Magic method to convert the registry to a string.
|
||||
*
|
||||
* Returns the registry data in JSON format.
|
||||
*
|
||||
* @return string The registry data in JSON format.
|
||||
* @since 5.0.4
|
||||
*/
|
||||
public function __toString()
|
||||
{
|
||||
return $this->toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Loads data into the registry from a string using Joomla's format classes.
|
||||
*
|
||||
* @param string $data The data string to load.
|
||||
* @param string $format The format of the data string. Supported formats: 'json', 'ini', 'xml', 'php'.
|
||||
* @param array $options Options used by the formatter
|
||||
*
|
||||
* @return self
|
||||
* @throws \InvalidArgumentException If the format is not supported.
|
||||
* @since 5.0.4
|
||||
*/
|
||||
public function loadString(string $data, string $format = 'JSON', array $options = []): self
|
||||
{
|
||||
// Load a string into the given namespace [or default namespace if not given]
|
||||
$object = FormatFactory::getFormat($format, $options)->stringToObject($data, $options);
|
||||
|
||||
// Merge the object into the registry
|
||||
$this->loadObject($object);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Loads data into the registry from an object.
|
||||
*
|
||||
* @param object $object The data object to load.
|
||||
*
|
||||
* @return self
|
||||
* @since 5.0.4
|
||||
*/
|
||||
public function loadObject(object $object): self
|
||||
{
|
||||
// Convert the object to an array
|
||||
$array = $this->objectToArray($object);
|
||||
|
||||
// Merge the array into the registry
|
||||
$this->loadArray($array);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Loads data into the registry from an array.
|
||||
*
|
||||
* The loaded data will be merged into the registry's existing data.
|
||||
*
|
||||
* @param array $array The array of data to load into the registry.
|
||||
*
|
||||
* @return self
|
||||
* @since 5.0.4
|
||||
*/
|
||||
public function loadArray(array $array): self
|
||||
{
|
||||
$this->active = $this->arrayMergeRecursive($this->active, $array);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Loads data into the registry from a file.
|
||||
*
|
||||
* @param string $path The path to the file to load.
|
||||
* @param string $format The format of the file. Supported formats: 'json', 'ini', 'xml', 'php'.
|
||||
*
|
||||
* @return self
|
||||
* @throws \InvalidArgumentException If the file does not exist or is not readable.
|
||||
* @throws \RuntimeException If the file cannot be read.
|
||||
* @since 5.0.4
|
||||
*/
|
||||
public function loadFile(string $path, string $format = 'json'): self
|
||||
{
|
||||
if (!file_exists($path) || !is_readable($path))
|
||||
{
|
||||
throw new \InvalidArgumentException("File does not exist or is not readable: {$path}");
|
||||
}
|
||||
|
||||
$data = file_get_contents($path);
|
||||
|
||||
if ($data === false)
|
||||
{
|
||||
throw new \RuntimeException("Failed to read file: {$path}");
|
||||
}
|
||||
|
||||
$this->loadString($data, $format);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a value into the registry using multiple keys.
|
||||
*
|
||||
@ -41,7 +262,7 @@ abstract class Registry extends ActiveRegistry implements Registryinterface
|
||||
*
|
||||
* @throws \InvalidArgumentException If any of the path values are not a number or string.
|
||||
* @return self
|
||||
* @since 3.2.0
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function set(string $path, $value): self
|
||||
{
|
||||
@ -67,7 +288,7 @@ abstract class Registry extends ActiveRegistry implements Registryinterface
|
||||
*
|
||||
* @throws \InvalidArgumentException If any of the path values are not a number or string.
|
||||
* @return self
|
||||
* @since 3.2.0
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function add(string $path, $value, ?bool $asArray = null): self
|
||||
{
|
||||
@ -89,9 +310,9 @@ abstract class Registry extends ActiveRegistry implements Registryinterface
|
||||
*
|
||||
* @throws \InvalidArgumentException If any of the path values are not a number or string.
|
||||
* @return mixed The value or sub-array from the storage. Null if the location doesn't exist.
|
||||
* @since 3.2.0
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function get(string $path, $default = null)
|
||||
public function get(string $path, $default = null): mixed
|
||||
{
|
||||
if (($keys = $this->getActiveKeys($path)) === null)
|
||||
{
|
||||
@ -108,7 +329,7 @@ abstract class Registry extends ActiveRegistry implements Registryinterface
|
||||
*
|
||||
* @throws \InvalidArgumentException If any of the path values are not a number or string.
|
||||
* @return self
|
||||
* @since 3.2.0
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function remove(string $path): self
|
||||
{
|
||||
@ -129,7 +350,7 @@ abstract class Registry extends ActiveRegistry implements Registryinterface
|
||||
*
|
||||
* @throws \InvalidArgumentException If any of the path values are not a number or string.
|
||||
* @return bool True if the location exists, false otherwise.
|
||||
* @since 3.2.0
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function exists(string $path): bool
|
||||
{
|
||||
@ -141,13 +362,308 @@ abstract class Registry extends ActiveRegistry implements Registryinterface
|
||||
return $this->existsActive(...$keys);
|
||||
}
|
||||
|
||||
/**
|
||||
* Specify data which should be serialized to JSON.
|
||||
*
|
||||
* @return mixed Data which can be serialized by json_encode(),
|
||||
* which is a value of any type other than a resource.
|
||||
* @since 5.0.4
|
||||
*/
|
||||
public function jsonSerialize(): mixed
|
||||
{
|
||||
return $this->active;
|
||||
}
|
||||
|
||||
/**
|
||||
* Count elements of the registry.
|
||||
*
|
||||
* @return int The number of elements in the registry.
|
||||
* @since 5.0.4
|
||||
*/
|
||||
public function count(): int
|
||||
{
|
||||
return count($this->active);
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether a given offset exists in the registry.
|
||||
*
|
||||
* @param mixed $offset An offset to check for.
|
||||
*
|
||||
* @return bool True if the offset exists, false otherwise.
|
||||
* @since 5.0.4
|
||||
*/
|
||||
public function offsetExists(mixed $offset): bool
|
||||
{
|
||||
if (!is_string($offset))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
return $this->exists($offset);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve the value at a given offset.
|
||||
*
|
||||
* @param mixed $offset The offset to retrieve.
|
||||
*
|
||||
* @return mixed The value at the specified offset.
|
||||
* @since 5.0.4
|
||||
*/
|
||||
public function offsetGet(mixed $offset): mixed
|
||||
{
|
||||
if (!is_string($offset))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
return $this->get($offset);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the value at a given offset.
|
||||
*
|
||||
* @param mixed $offset The offset to assign the value to.
|
||||
* @param mixed $value The value to set.
|
||||
*
|
||||
* @return void
|
||||
* @since 5.0.4
|
||||
*/
|
||||
public function offsetSet(mixed $offset, mixed $value): void
|
||||
{
|
||||
if (!is_string($offset))
|
||||
{
|
||||
return;
|
||||
}
|
||||
$this->set($offset, $value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Unset the value at a given offset.
|
||||
*
|
||||
* @param mixed $offset The offset to unset.
|
||||
*
|
||||
* @return void
|
||||
* @since 5.0.4
|
||||
*/
|
||||
public function offsetUnset(mixed $offset): void
|
||||
{
|
||||
if (!is_string($offset))
|
||||
{
|
||||
return;
|
||||
}
|
||||
$this->remove($offset);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve an external iterator for the registry.
|
||||
*
|
||||
* @return \Traversable An instance of an object implementing Iterator or Traversable.
|
||||
* @since 5.0.4
|
||||
*/
|
||||
public function getIterator(): \Traversable
|
||||
{
|
||||
return new \ArrayIterator($this->active);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the registry data as an associative array.
|
||||
*
|
||||
* @return array The registry data.
|
||||
* @since 5.0.4
|
||||
*/
|
||||
public function toArray(): array
|
||||
{
|
||||
return $this->active;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the registry data as an object.
|
||||
*
|
||||
* @return object The registry data converted to an object.
|
||||
* @since 5.0.4
|
||||
*/
|
||||
public function toObject()
|
||||
{
|
||||
return $this->arrayToObject($this->active);
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts the registry data to a string in the specified format.
|
||||
*
|
||||
* @param string $format The format to output the string in. Supported formats: 'json', 'ini', 'xml', 'php'.
|
||||
* @param array $options Options used by the formatter.
|
||||
*
|
||||
* @return string The registry data in the specified format.
|
||||
*
|
||||
* @throws \InvalidArgumentException If the format is not supported.
|
||||
* @since 5.0.4
|
||||
*/
|
||||
public function toString(string $format = 'JSON', array $options = []): string
|
||||
{
|
||||
// Convert the internal array to an object
|
||||
$object = $this->arrayToObject($this->active);
|
||||
|
||||
return FormatFactory::getFormat($format, $options)->objectToString($object, $options);
|
||||
}
|
||||
|
||||
/**
|
||||
* Flattens the registry data into a one-dimensional array.
|
||||
*
|
||||
* @param string|null $separator The separator for the key names.
|
||||
* @param bool $full True to include the full path as keys.
|
||||
*
|
||||
* @return array The flattened data array.
|
||||
* @since 5.0.4
|
||||
*/
|
||||
public function flatten(?string $separator = null, bool $full = false): array
|
||||
{
|
||||
// we use default separator
|
||||
if ($separator === null)
|
||||
{
|
||||
$separator = $this->separator;
|
||||
}
|
||||
|
||||
return $this->flattenArray($this->active, $separator, $full);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a default value if not already set.
|
||||
*
|
||||
* @param string $path The registry path (e.g., 'vdm.content.builder').
|
||||
* @param mixed $default The default value to set if the path does not exist.
|
||||
*
|
||||
* @return mixed The value of the path after the method call.
|
||||
* @since 5.0.4
|
||||
*/
|
||||
public function def(string $path, $default)
|
||||
{
|
||||
if (!$this->exists($path))
|
||||
{
|
||||
$this->set($path, $default);
|
||||
return $default;
|
||||
}
|
||||
return $this->get($path);
|
||||
}
|
||||
|
||||
/**
|
||||
* Merges another registry into this one.
|
||||
*
|
||||
* The data from the source registry will be merged into this registry,
|
||||
* overwriting any existing values with the same keys.
|
||||
*
|
||||
* @param Registryinterface $source The registry to merge with this one.
|
||||
*
|
||||
* @return self
|
||||
* @since 5.0.4
|
||||
*/
|
||||
public function merge(Registryinterface $source): self
|
||||
{
|
||||
$this->active = $this->arrayMergeRecursive($this->active, $source->toArray());
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Clears all data from the registry.
|
||||
*
|
||||
* @return self
|
||||
* @since 5.0.4
|
||||
*/
|
||||
public function clear(): self
|
||||
{
|
||||
$this->active = [];
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Extracts a subset of the registry data based on a given path.
|
||||
*
|
||||
* @param string $path The registry path to extract.
|
||||
* @param mixed $default Optional default value, returned if the path does not exist.
|
||||
* @param string|null $separator The path separator.
|
||||
*
|
||||
* @return self A new Registry instance with the extracted data.
|
||||
* @since 5.0.4
|
||||
*/
|
||||
public function extract(string $path, $default = null, ?string $separator = null): self
|
||||
{
|
||||
$originalSeparator = $this->getSeparator();
|
||||
if ($separator !== null)
|
||||
{
|
||||
$this->setSeparator($separator);
|
||||
}
|
||||
|
||||
$data = $this->get($path, $default);
|
||||
|
||||
if ($separator !== null)
|
||||
{
|
||||
$this->setSeparator($originalSeparator);
|
||||
}
|
||||
|
||||
$newRegistry = new static();
|
||||
|
||||
if ($data !== $default)
|
||||
{
|
||||
if (is_array($data))
|
||||
{
|
||||
$newRegistry->loadArray($data);
|
||||
}
|
||||
else
|
||||
{
|
||||
$newRegistry->set('value', $data);
|
||||
}
|
||||
}
|
||||
|
||||
return $newRegistry;
|
||||
}
|
||||
|
||||
/**
|
||||
* Appends content into the registry.
|
||||
*
|
||||
* If a key exists, the value will be appended to the existing value.
|
||||
*
|
||||
* @param string $path The registry path (e.g., 'vdm.content.builder').
|
||||
* @param mixed $value The value to append.
|
||||
*
|
||||
* @return self
|
||||
* @since 5.0.4
|
||||
*/
|
||||
public function append(string $path, $value): self
|
||||
{
|
||||
return $this->add($path, $value, false);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the name of the registry.
|
||||
*
|
||||
* @return string|null The name of the registry.
|
||||
* @since 5.0.4
|
||||
*/
|
||||
public function getName(): ?string
|
||||
{
|
||||
return $this->name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the name of the registry.
|
||||
*
|
||||
* @param string|null $name The name to set.
|
||||
*
|
||||
* @return self
|
||||
* @since 5.0.4
|
||||
*/
|
||||
public function setName(?string $name): self
|
||||
{
|
||||
$this->name = $name;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a separator value
|
||||
*
|
||||
* @param string|null $value The value to set.
|
||||
*
|
||||
* @return self
|
||||
* @since 3.2.0
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function setSeparator(?string $value): self
|
||||
{
|
||||
@ -156,13 +672,140 @@ abstract class Registry extends ActiveRegistry implements Registryinterface
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the current path separator used in registry paths.
|
||||
*
|
||||
* @return string|null The path separator.
|
||||
* @since 5.0.4
|
||||
*/
|
||||
public function getSeparator(): ?string
|
||||
{
|
||||
return $this->separator;
|
||||
}
|
||||
|
||||
/**
|
||||
* Recursively converts an array to an object.
|
||||
*
|
||||
* This method is used to convert the internal array data into an object
|
||||
* structure suitable for serialization or other operations that require objects.
|
||||
*
|
||||
* @param mixed $data The data to convert.
|
||||
*
|
||||
* @return mixed The converted object, or the original data if not an array.
|
||||
* @since 5.0.4
|
||||
*/
|
||||
protected function arrayToObject($data)
|
||||
{
|
||||
if (is_array($data))
|
||||
{
|
||||
$object = new \stdClass();
|
||||
foreach ($data as $key => $value)
|
||||
{
|
||||
// Handle numeric keys for object properties
|
||||
if (is_numeric($key))
|
||||
{
|
||||
$key = 'item' . $key;
|
||||
}
|
||||
$object->{$key} = $this->arrayToObject($value);
|
||||
}
|
||||
return $object;
|
||||
}
|
||||
else
|
||||
{
|
||||
return $data;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Recursively converts an object to an array.
|
||||
*
|
||||
* This method is used to convert data loaded from formats that produce objects
|
||||
* (e.g., JSON, XML) into an array structure for internal storage.
|
||||
*
|
||||
* @param mixed $data The data to convert.
|
||||
*
|
||||
* @return mixed The converted array, or the original data if not an object.
|
||||
* @since 5.0.4
|
||||
*/
|
||||
protected function objectToArray($data)
|
||||
{
|
||||
return json_decode(json_encode($data), true);
|
||||
}
|
||||
|
||||
/**
|
||||
* Recursively merges two arrays.
|
||||
*
|
||||
* This method merges the elements of two arrays together so that the values of one
|
||||
* are appended to the end of the previous one. It preserves numeric keys.
|
||||
*
|
||||
* @param array $array1 The array to merge into.
|
||||
* @param array $array2 The array to merge from.
|
||||
*
|
||||
* @return array The merged array.
|
||||
* @since 5.0.4
|
||||
*/
|
||||
protected function arrayMergeRecursive(array $array1, array $array2): array
|
||||
{
|
||||
foreach ($array2 as $key => $value)
|
||||
{
|
||||
// If the value is an array and the key exists in both arrays, merge recursively
|
||||
if (is_array($value) && isset($array1[$key]) && is_array($array1[$key]))
|
||||
{
|
||||
$array1[$key] = $this->arrayMergeRecursive($array1[$key], $value);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Otherwise, replace or set the value
|
||||
$array1[$key] = $value;
|
||||
}
|
||||
}
|
||||
return $array1;
|
||||
}
|
||||
|
||||
/**
|
||||
* Helper function to recursively flatten the array.
|
||||
*
|
||||
* @param array $array The array to flatten.
|
||||
* @param string $separator The separator for the key names.
|
||||
* @param bool $full True to include the full path as keys.
|
||||
* @param array $flattened The flattened array (used internally for recursion).
|
||||
* @param string $path The current path (used internally for recursion).
|
||||
*
|
||||
* @return array The flattened array.
|
||||
* @since 5.0.4
|
||||
*/
|
||||
protected function flattenArray(array $array, string $separator, bool $full, array $flattened = [], string $path = ''): array
|
||||
{
|
||||
foreach ($array as $key => $value)
|
||||
{
|
||||
if ($full)
|
||||
{
|
||||
$newPath = $path === '' ? $key : $path . $separator . $key;
|
||||
}
|
||||
else
|
||||
{
|
||||
$newPath = $key;
|
||||
}
|
||||
|
||||
if (is_array($value))
|
||||
{
|
||||
$flattened = $this->flattenArray($value, $separator, $full, $flattened, $newPath);
|
||||
}
|
||||
else
|
||||
{
|
||||
$flattened[$newPath] = $value;
|
||||
}
|
||||
}
|
||||
return $flattened;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get that the active keys from a path
|
||||
*
|
||||
* @param string $path The path to determine the location registry.
|
||||
*
|
||||
* @return array|null The valid array of keys
|
||||
* @since 3.2.0
|
||||
* @since 3.2.0
|
||||
*/
|
||||
protected function getActiveKeys(string $path): ?array
|
||||
{
|
||||
|
@ -13,11 +13,12 @@ namespace VDM\Joomla\Abstraction\Registry\Traits;
|
||||
|
||||
|
||||
/**
|
||||
* Count Values
|
||||
* Count Values in a Path
|
||||
*
|
||||
* @since 3.2.0
|
||||
* @since 3.2.0
|
||||
* @since 5.0.2 name changed to PathCount to avoid collusion in core registry class
|
||||
*/
|
||||
trait Count
|
||||
trait PathCount
|
||||
{
|
||||
/**
|
||||
* Retrieves number of values (or sub-array) from the storage using multiple keys.
|
||||
@ -28,7 +29,7 @@ trait Count
|
||||
* @return int The number of values
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function count(string $path): int
|
||||
public function pathCount(string $path): int
|
||||
{
|
||||
if (($values = $this->get($path)) === null)
|
||||
{
|
@ -13,11 +13,12 @@ namespace VDM\Joomla\Abstraction\Registry\Traits;
|
||||
|
||||
|
||||
/**
|
||||
* To String Values
|
||||
* Path To String Values
|
||||
*
|
||||
* @since 3.2.0
|
||||
* @since 3.2.0
|
||||
* @since 5.0.2 name changed to PathToString to avoid collusion in core registry class
|
||||
*/
|
||||
trait ToString
|
||||
trait PathToString
|
||||
{
|
||||
/**
|
||||
* Convert an array of values to a string (or return string)
|
||||
@ -26,9 +27,9 @@ trait ToString
|
||||
* @param string $seperator Return string separator
|
||||
*
|
||||
* @return string
|
||||
* @since 3.2.0
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function toString(string $path, string $separator = ''): string
|
||||
public function pathToString(string $path, string $separator = ''): string
|
||||
{
|
||||
// Return default value if path is empty
|
||||
if (empty($path))
|
@ -416,6 +416,8 @@ abstract class Set implements SetInterface
|
||||
|
||||
$settings = $this->mergeIndexSettings($repoGuid, $settings);
|
||||
|
||||
$this->grep->loadApi($this->git, $repo->base ?? null, $repo->token ?? null);
|
||||
|
||||
$this->updateIndexMainFile(
|
||||
$repo,
|
||||
$this->getIndexSettingsPath(),
|
||||
@ -429,6 +431,8 @@ abstract class Set implements SetInterface
|
||||
$this->mainReadme->get($settings),
|
||||
'Update main readme file'
|
||||
);
|
||||
|
||||
$this->git->reset_();
|
||||
}
|
||||
|
||||
/**
|
||||
@ -580,7 +584,7 @@ abstract class Set implements SetInterface
|
||||
|
||||
$this->setRepoPlaceholders($repo);
|
||||
|
||||
$this->git->load_($repo->base ?? null, $repo->token ?? null);
|
||||
$this->grep->loadApi($this->git, $repo->base ?? null, $repo->token ?? null);
|
||||
|
||||
if (($existing = $this->grep->get($item->guid, ['remote'], $repo)) !== null)
|
||||
{
|
||||
|
@ -0,0 +1,67 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Component.Builder
|
||||
*
|
||||
* @created 4th September, 2022
|
||||
* @author Llewellyn van der Merwe <https://dev.vdm.io>
|
||||
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
|
||||
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
namespace VDM\Joomla\Componentbuilder\Abstraction;
|
||||
|
||||
|
||||
use VDM\Joomla\Componentbuilder\Utilities\Http;
|
||||
use VDM\Joomla\Componentbuilder\Utilities\Uri;
|
||||
use VDM\Joomla\Componentbuilder\Utilities\Response;
|
||||
|
||||
|
||||
/**
|
||||
* The Joomla Component Builder Api
|
||||
*
|
||||
* @since 5.0.4
|
||||
*/
|
||||
abstract class Api
|
||||
{
|
||||
/**
|
||||
* The Http Class.
|
||||
*
|
||||
* @var Http
|
||||
* @since 5.0.4
|
||||
*/
|
||||
protected Http $http;
|
||||
|
||||
/**
|
||||
* The Uri Class.
|
||||
*
|
||||
* @var Uri
|
||||
* @since 5.0.4
|
||||
*/
|
||||
protected Uri $uri;
|
||||
|
||||
/**
|
||||
* The Response Class.
|
||||
*
|
||||
* @var Response
|
||||
* @since 5.0.4
|
||||
*/
|
||||
protected Response $response;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param Http $http The Http Class.
|
||||
* @param Uri $uri The Uri Class.
|
||||
* @param Response $response The Response Class.
|
||||
*
|
||||
* @since 5.0.4
|
||||
*/
|
||||
public function __construct(Http $http, Uri $uri, Response $response)
|
||||
{
|
||||
$this->http = $http;
|
||||
$this->uri = $uri;
|
||||
$this->response = $response;
|
||||
}
|
||||
}
|
||||
|
@ -17,18 +17,18 @@ use Joomla\CMS\Factory;
|
||||
use Joomla\Input\Input;
|
||||
use VDM\Joomla\Utilities\Component\Helper;
|
||||
use VDM\Joomla\Utilities\String\ClassfunctionHelper;
|
||||
use VDM\Joomla\Abstraction\BaseConfig as ExtendingBaseConfig;
|
||||
use VDM\Joomla\Abstraction\FunctionRegistry;
|
||||
|
||||
|
||||
/**
|
||||
* Config
|
||||
* Component Configurations
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
abstract class BaseConfig extends ExtendingBaseConfig
|
||||
abstract class ComponentConfig extends FunctionRegistry
|
||||
{
|
||||
/**
|
||||
* Hold a JInput object for easier access to the input variables.
|
||||
* Hold a Input object for easier access to the input variables.
|
||||
*
|
||||
* @var Input
|
||||
* @since 3.2.0
|
||||
@ -56,9 +56,6 @@ abstract class BaseConfig extends ExtendingBaseConfig
|
||||
{
|
||||
$this->input = $input ?: Factory::getApplication()->input;
|
||||
$this->params = $params ?: Helper::getParams('com_componentbuilder');
|
||||
|
||||
// run parent constructor
|
||||
parent::__construct();
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,59 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Component.Builder
|
||||
*
|
||||
* @created 4th September, 2022
|
||||
* @author Llewellyn van der Merwe <https://dev.vdm.io>
|
||||
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
|
||||
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
namespace VDM\Joomla\Componentbuilder\Api;
|
||||
|
||||
|
||||
use VDM\Joomla\Componentbuilder\Abstraction\Api;
|
||||
|
||||
|
||||
/**
|
||||
* The Joomla Component Builder Network Api
|
||||
*
|
||||
* @since 5.0.4
|
||||
*/
|
||||
final class Network extends Api
|
||||
{
|
||||
/**
|
||||
* Get the network repository statuses
|
||||
*
|
||||
* @param string|null $target The target repositories.
|
||||
* @param int|null $status The repository status.
|
||||
* @param string $project The network project. (default: jcb)
|
||||
* @param string $system The network system. (default: community)
|
||||
*
|
||||
* @return object|null The set of status values
|
||||
* @since 5.0.4
|
||||
**/
|
||||
public function get(?string $target = null, ?int $status = null, string $project = 'jcb', string $system = 'community'): ?object
|
||||
{
|
||||
// Build the request path.
|
||||
$path = "/network/{$system}/{$project}";
|
||||
|
||||
if (!empty($target))
|
||||
{
|
||||
$path .= "/{$target}";
|
||||
}
|
||||
|
||||
if (!empty($status))
|
||||
{
|
||||
$path .= "/{$status}";
|
||||
}
|
||||
|
||||
// Send the get request.
|
||||
return $this->response->get(
|
||||
$this->http->get(
|
||||
$this->uri->get($path)
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1 @@
|
||||
<html><body bgcolor="#FFFFFF"></body></html>
|
@ -47,6 +47,14 @@ use VDM\Joomla\Utilities\ArrayHelper;
|
||||
*/
|
||||
class Data
|
||||
{
|
||||
/**
|
||||
* The cache
|
||||
*
|
||||
* @var array
|
||||
* @since 3.2.0
|
||||
*/
|
||||
protected array $data;
|
||||
|
||||
/**
|
||||
* The Config Class.
|
||||
*
|
||||
|
@ -12,7 +12,7 @@
|
||||
namespace VDM\Joomla\Componentbuilder\Compiler\Builder;
|
||||
|
||||
|
||||
use VDM\Joomla\Abstraction\Registry\Traits\ToString;
|
||||
use VDM\Joomla\Abstraction\Registry\Traits\PathToString;
|
||||
use VDM\Joomla\Interfaces\Registryinterface;
|
||||
use VDM\Joomla\Abstraction\Registry;
|
||||
|
||||
@ -25,10 +25,10 @@ use VDM\Joomla\Abstraction\Registry;
|
||||
final class CustomFieldLinks extends Registry implements Registryinterface
|
||||
{
|
||||
/**
|
||||
* To String Values
|
||||
* Path To String Values
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
use ToString;
|
||||
use PathToString;
|
||||
}
|
||||
|
||||
|
@ -12,7 +12,7 @@
|
||||
namespace VDM\Joomla\Componentbuilder\Compiler\Builder;
|
||||
|
||||
|
||||
use VDM\Joomla\Abstraction\Registry\Traits\ToString;
|
||||
use VDM\Joomla\Abstraction\Registry\Traits\PathToString;
|
||||
use VDM\Joomla\Interfaces\Registryinterface;
|
||||
use VDM\Joomla\Abstraction\Registry;
|
||||
|
||||
@ -25,10 +25,10 @@ use VDM\Joomla\Abstraction\Registry;
|
||||
final class DynamicFields extends Registry implements Registryinterface
|
||||
{
|
||||
/**
|
||||
* To String Values
|
||||
* Path To String Values
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
use ToString;
|
||||
use PathToString;
|
||||
}
|
||||
|
||||
|
@ -12,7 +12,7 @@
|
||||
namespace VDM\Joomla\Componentbuilder\Compiler\Builder;
|
||||
|
||||
|
||||
use VDM\Joomla\Abstraction\Registry\Traits\ToString;
|
||||
use VDM\Joomla\Abstraction\Registry\Traits\PathToString;
|
||||
use VDM\Joomla\Interfaces\Registryinterface;
|
||||
use VDM\Joomla\Abstraction\Registry;
|
||||
|
||||
@ -25,10 +25,10 @@ use VDM\Joomla\Abstraction\Registry;
|
||||
final class HiddenFields extends Registry implements Registryinterface
|
||||
{
|
||||
/**
|
||||
* To String Values
|
||||
* Path To String Values
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
use ToString;
|
||||
use PathToString;
|
||||
}
|
||||
|
||||
|
@ -12,7 +12,7 @@
|
||||
namespace VDM\Joomla\Componentbuilder\Compiler\Builder;
|
||||
|
||||
|
||||
use VDM\Joomla\Abstraction\Registry\Traits\ToString;
|
||||
use VDM\Joomla\Abstraction\Registry\Traits\PathToString;
|
||||
use VDM\Joomla\Interfaces\Registryinterface;
|
||||
use VDM\Joomla\Abstraction\Registry;
|
||||
|
||||
@ -25,10 +25,10 @@ use VDM\Joomla\Abstraction\Registry;
|
||||
final class IntegerFields extends Registry implements Registryinterface
|
||||
{
|
||||
/**
|
||||
* To String Values
|
||||
* Path To String Values
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
use ToString;
|
||||
use PathToString;
|
||||
}
|
||||
|
||||
|
@ -12,7 +12,7 @@
|
||||
namespace VDM\Joomla\Componentbuilder\Compiler\Builder;
|
||||
|
||||
|
||||
use VDM\Joomla\Abstraction\Registry\Traits\Count;
|
||||
use VDM\Joomla\Abstraction\Registry\Traits\PathCount;
|
||||
use VDM\Joomla\Interfaces\Registryinterface;
|
||||
use VDM\Joomla\Abstraction\Registry;
|
||||
|
||||
@ -25,10 +25,10 @@ use VDM\Joomla\Abstraction\Registry;
|
||||
final class Layout extends Registry implements Registryinterface
|
||||
{
|
||||
/**
|
||||
* Count Values
|
||||
* Path Count Values
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
use Count;
|
||||
use PathCount;
|
||||
}
|
||||
|
||||
|
@ -12,7 +12,7 @@
|
||||
namespace VDM\Joomla\Componentbuilder\Compiler\Builder;
|
||||
|
||||
|
||||
use VDM\Joomla\Abstraction\Registry\Traits\Count;
|
||||
use VDM\Joomla\Abstraction\Registry\Traits\PathCount;
|
||||
use VDM\Joomla\Interfaces\Registryinterface;
|
||||
use VDM\Joomla\Abstraction\Registry;
|
||||
|
||||
@ -25,10 +25,10 @@ use VDM\Joomla\Abstraction\Registry;
|
||||
final class NewPublishingFields extends Registry implements Registryinterface
|
||||
{
|
||||
/**
|
||||
* Count Values
|
||||
* Path Count Values
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
use Count;
|
||||
use PathCount;
|
||||
}
|
||||
|
||||
|
@ -18,7 +18,7 @@ use Joomla\Input\Input;
|
||||
use VDM\Joomla\Utilities\GetHelper;
|
||||
use VDM\Joomla\Utilities\StringHelper;
|
||||
use VDM\Joomla\Componentbuilder\Utilities\RepoHelper;
|
||||
use VDM\Joomla\Componentbuilder\Abstraction\BaseConfig;
|
||||
use VDM\Joomla\Componentbuilder\Abstraction\ComponentConfig;
|
||||
|
||||
|
||||
/**
|
||||
@ -32,7 +32,7 @@ use VDM\Joomla\Componentbuilder\Abstraction\BaseConfig;
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
class Config extends BaseConfig
|
||||
class Config extends ComponentConfig
|
||||
{
|
||||
/**
|
||||
* The Global Joomla Configuration
|
||||
|
@ -139,7 +139,7 @@ final class Layout
|
||||
if ($this->layout->exists($nameSingleCode . '.' . $tabName . '.'
|
||||
. $field['alignment'] . '.' . $field['order_edit']))
|
||||
{
|
||||
$size = $this->layout->count($nameSingleCode . '.' . $tabName . '.'
|
||||
$size = $this->layout->pathCount($nameSingleCode . '.' . $tabName . '.'
|
||||
. $field['alignment']) + 1;
|
||||
while ($this->layout->exists($nameSingleCode . '.' . $tabName . '.'
|
||||
. $field['alignment'] . '.' . $size))
|
||||
@ -168,7 +168,7 @@ final class Layout
|
||||
if ($this->newpublishingfields->exists($nameSingleCode . '.' .
|
||||
$field['alignment'] . '.' . $field['order_edit']))
|
||||
{
|
||||
$size = $this->newpublishingfields->count($nameSingleCode . '.' .
|
||||
$size = $this->newpublishingfields->pathCount($nameSingleCode . '.' .
|
||||
$field['alignment']) + 1;
|
||||
while ($this->newpublishingfields->exists($nameSingleCode . '.' .
|
||||
$field['alignment'] . '.' . $size))
|
||||
@ -191,7 +191,7 @@ final class Layout
|
||||
if ($this->layout->exists($nameSingleCode . '.Details.'
|
||||
. $field['alignment'] . '.' . $field['order_edit']))
|
||||
{
|
||||
$size = $this->layout->count($nameSingleCode . '.Details.'
|
||||
$size = $this->layout->pathCount($nameSingleCode . '.Details.'
|
||||
. $field['alignment']) + 1;
|
||||
while ($this->layout->exists($nameSingleCode . '.Details.'
|
||||
. $field['alignment'] . '.' . $size))
|
||||
|
@ -15,6 +15,8 @@ namespace VDM\Joomla\Componentbuilder\Compiler;
|
||||
use Joomla\DI\Container;
|
||||
use VDM\Joomla\Componentbuilder\Service\Crypt;
|
||||
use VDM\Joomla\Componentbuilder\Service\Server;
|
||||
use VDM\Joomla\Componentbuilder\Service\Api;
|
||||
use VDM\Joomla\Componentbuilder\Service\Network;
|
||||
use VDM\Joomla\Service\Database;
|
||||
use VDM\Joomla\Service\Model as BaseModel;
|
||||
use VDM\Joomla\Service\Data;
|
||||
@ -124,6 +126,8 @@ abstract class Factory extends ExtendingFactory implements FactoryInterface
|
||||
return (new Container())
|
||||
->registerServiceProvider(new Crypt())
|
||||
->registerServiceProvider(new Server())
|
||||
->registerServiceProvider(new Api())
|
||||
->registerServiceProvider(new Network())
|
||||
->registerServiceProvider(new Database())
|
||||
->registerServiceProvider(new BaseModel())
|
||||
->registerServiceProvider(new Data())
|
||||
|
@ -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__)
|
||||
|
@ -1510,7 +1510,7 @@ class Interpretation extends Fields
|
||||
. "protected static function loadArticleLink(\$id)";
|
||||
$help[] = Indent::_(1) . "{";
|
||||
$help[] = Indent::_(2)
|
||||
. "return Uri::root() . 'index.php?option=com_content&view=article&id='.\$id.'&tmpl=component&layout=modal';";
|
||||
. "return Joomla__"."_eecc143e_b5cf_4c33_ba4d_97da1df61422___Power::root() . 'index.php?option=com_content&view=article&id='.\$id.'&tmpl=component&layout=modal';";
|
||||
$help[] = Indent::_(1) . "}";
|
||||
$help[] = PHP_EOL . Indent::_(1) . "/**";
|
||||
$help[] = Indent::_(1) . " * Get the Help Text Link.";
|
||||
@ -1518,7 +1518,7 @@ class Interpretation extends Fields
|
||||
$help[] = Indent::_(1)
|
||||
. "protected static function loadHelpTextLink(\$id)";
|
||||
$help[] = Indent::_(1) . "{";
|
||||
$help[] = Indent::_(2) . "\$token = Session::getFormToken();";
|
||||
$help[] = Indent::_(2) . "\$token = Joomla__"."_5ba38513_5c4f_4b0d_935e_49e986a6bce8___Power::getFormToken();";
|
||||
$help[] = Indent::_(2) . "return 'index.php?option=com_"
|
||||
. CFactory::_('Config')->component_code_name
|
||||
. "&task=help.getText&id=' . (int) \$id . '&' . \$token . '=1';";
|
||||
@ -3216,7 +3216,7 @@ class Interpretation extends Fields
|
||||
$redirectMessage = Indent::_(3) . "//" . Line::_(
|
||||
__LINE__,__CLASS__
|
||||
) . " redirect away to the home page if no access allowed.";
|
||||
$redirectString = 'Uri::root()';
|
||||
$redirectString = 'Joomla__'.'_eecc143e_b5cf_4c33_ba4d_97da1df61422___Power::root()';
|
||||
}
|
||||
$accessCheck[] = PHP_EOL . Indent::_(2) . "//" . Line::_(
|
||||
__LINE__,__CLASS__
|
||||
@ -3398,7 +3398,7 @@ class Interpretation extends Fields
|
||||
}
|
||||
else
|
||||
{
|
||||
$redirectString = 'Uri::root()';
|
||||
$redirectString = 'Joomla__'.'_eecc143e_b5cf_4c33_ba4d_97da1df61422___Power::root()';
|
||||
}
|
||||
$getItem .= PHP_EOL . Indent::_(1) . $tab . Indent::_(2)
|
||||
. "\$app->redirect(" . $redirectString . ");";
|
||||
@ -8549,10 +8549,10 @@ class Interpretation extends Fields
|
||||
);
|
||||
$View = StringHelper::safe($view, 'F');
|
||||
$maintext = CFactory::_('Compiler.Builder.Main.Text.Field')->get($view, 'null');
|
||||
$hiddenFields = CFactory::_('Compiler.Builder.Hidden.Fields')->toString($view, '');
|
||||
$dynamicfields = CFactory::_('Compiler.Builder.Dynamic.Fields')->toString($view, ',');
|
||||
$intFields = CFactory::_('Compiler.Builder.Integer.Fields')->toString($view, '');
|
||||
$customfieldlinks = CFactory::_('Compiler.Builder.Custom.Field.Links')->toString($view, '');
|
||||
$hiddenFields = CFactory::_('Compiler.Builder.Hidden.Fields')->pathToString($view, '');
|
||||
$dynamicfields = CFactory::_('Compiler.Builder.Dynamic.Fields')->pathToString($view, ',');
|
||||
$intFields = CFactory::_('Compiler.Builder.Integer.Fields')->pathToString($view, '');
|
||||
$customfieldlinks = CFactory::_('Compiler.Builder.Custom.Field.Links')->pathToString($view, '');
|
||||
// build uninstall script for content types
|
||||
$this->uninstallScriptBuilder[$View] = 'com_' . $component . '.' . $view;
|
||||
$this->uninstallScriptContent[$view] = $view;
|
||||
@ -10037,14 +10037,30 @@ class Interpretation extends Fields
|
||||
// check if default field was overwritten
|
||||
if (!CFactory::_('Compiler.Builder.Field.Names')->isString($view . '.created_by'))
|
||||
{
|
||||
$db_ .= PHP_EOL . Indent::_(1)
|
||||
. "`created_by` INT(10) unsigned NULL DEFAULT 0,";
|
||||
if (CFactory::_('Config')->get('joomla_version', 3) == 3)
|
||||
{
|
||||
$db_ .= PHP_EOL . Indent::_(1)
|
||||
. "`created_by` INT(10) unsigned NULL DEFAULT 0,";
|
||||
}
|
||||
else
|
||||
{
|
||||
$db_ .= PHP_EOL . Indent::_(1)
|
||||
. "`created_by` INT unsigned NULL,";
|
||||
}
|
||||
}
|
||||
// check if default field was overwritten
|
||||
if (!CFactory::_('Compiler.Builder.Field.Names')->isString($view . '.modified_by'))
|
||||
{
|
||||
$db_ .= PHP_EOL . Indent::_(1)
|
||||
. "`modified_by` INT(10) unsigned NULL DEFAULT 0,";
|
||||
if (CFactory::_('Config')->get('joomla_version', 3) == 3)
|
||||
{
|
||||
$db_ .= PHP_EOL . Indent::_(1)
|
||||
. "`modified_by` INT(10) unsigned NULL DEFAULT 0,";
|
||||
}
|
||||
else
|
||||
{
|
||||
$db_ .= PHP_EOL . Indent::_(1)
|
||||
. "`modified_by` INT unsigned,";
|
||||
}
|
||||
}
|
||||
// check if default field was overwritten
|
||||
if (!CFactory::_('Compiler.Builder.Field.Names')->isString($view . '.created'))
|
||||
@ -10071,14 +10087,22 @@ class Interpretation extends Fields
|
||||
else
|
||||
{
|
||||
$db_ .= PHP_EOL . Indent::_(1)
|
||||
. "`modified` DATETIME DEFAULT NULL,";
|
||||
. "`modified` DATETIME,";
|
||||
}
|
||||
}
|
||||
// check if default field was overwritten
|
||||
if (!CFactory::_('Compiler.Builder.Field.Names')->isString($view . '.checked_out'))
|
||||
{
|
||||
$db_ .= PHP_EOL . Indent::_(1)
|
||||
. "`checked_out` int(11) unsigned NULL DEFAULT 0,";
|
||||
if (CFactory::_('Config')->get('joomla_version', 3) == 3)
|
||||
{
|
||||
$db_ .= PHP_EOL . Indent::_(1)
|
||||
. "`checked_out` int(11) unsigned NULL DEFAULT 0,";
|
||||
}
|
||||
else
|
||||
{
|
||||
$db_ .= PHP_EOL . Indent::_(1)
|
||||
. "`checked_out` int unsigned,";
|
||||
}
|
||||
}
|
||||
// check if default field was overwritten
|
||||
if (!CFactory::_('Compiler.Builder.Field.Names')->isString($view . '.checked_out_time'))
|
||||
@ -10091,7 +10115,7 @@ class Interpretation extends Fields
|
||||
else
|
||||
{
|
||||
$db_ .= PHP_EOL . Indent::_(1)
|
||||
. "`checked_out_time` DATETIME DEFAULT NULL,";
|
||||
. "`checked_out_time` DATETIME,";
|
||||
}
|
||||
}
|
||||
// check if default field was overwritten
|
||||
@ -11077,9 +11101,9 @@ class Interpretation extends Fields
|
||||
$body .= PHP_EOL . Indent::_(2)
|
||||
. "\$userChkOut = Factory::getContainer()->";
|
||||
$body .= PHP_EOL . Indent::_(3)
|
||||
. "get(\Joomla\CMS\User\UserFactoryInterface::class)->";
|
||||
. "get(Joomla__"."_c2980d12_c3ef_4e23_b4a2_e6af1f5900a9___Power::class)->";
|
||||
$body .= PHP_EOL . Indent::_(4)
|
||||
. "loadUserById(\$item->checked_out);";
|
||||
. "loadUserById(\$item->checked_out ?? 0);";
|
||||
}
|
||||
$body .= PHP_EOL . Indent::_(2) . "\$canDo = " . $Helper
|
||||
. "::getActions('" . $nameSingleCode . "',\$item,'"
|
||||
@ -11560,8 +11584,8 @@ class Interpretation extends Fields
|
||||
else
|
||||
{
|
||||
return 'Factory::getContainer()->'
|
||||
. 'get(\Joomla\CMS\User\UserFactoryInterface::class)->'
|
||||
. 'loadUserById((int) $item->' . $item['code'] . ')->name';
|
||||
. 'get(Joomla__'.'_c2980d12_c3ef_4e23_b4a2_e6af1f5900a9___Power::class)->'
|
||||
. 'loadUserById((int) $item->' . $item['code'] . ' ?? 0)->name';
|
||||
}
|
||||
}
|
||||
// check if custom user
|
||||
@ -11577,8 +11601,8 @@ class Interpretation extends Fields
|
||||
else
|
||||
{
|
||||
return 'Factory::getContainer()->'
|
||||
. 'get(\Joomla\CMS\User\UserFactoryInterface::class)->'
|
||||
. 'loadUserById((int) $item->' . $item['id_code'] . ')->name';
|
||||
. 'get(Joomla__'.'_c2980d12_c3ef_4e23_b4a2_e6af1f5900a9___Power::class)->'
|
||||
. 'loadUserById((int) $item->' . $item['id_code'] . ' ?? 0)->name';
|
||||
}
|
||||
}
|
||||
// check if translated value is used
|
||||
@ -11598,8 +11622,8 @@ class Interpretation extends Fields
|
||||
else
|
||||
{
|
||||
return 'Factory::getContainer()->'
|
||||
. 'get(\Joomla\CMS\User\UserFactoryInterface::class)->'
|
||||
. 'loadUserById((int) $item->' . $item['code'] . ')->name';
|
||||
. 'get(Joomla__'.'_c2980d12_c3ef_4e23_b4a2_e6af1f5900a9___Power::class)->'
|
||||
. 'loadUserById((int) $item->' . $item['code'] . ' ?? 0)->name';
|
||||
}
|
||||
}
|
||||
elseif ($doNotEscape)
|
||||
@ -13708,9 +13732,9 @@ class Interpretation extends Fields
|
||||
$body .= PHP_EOL . Indent::_(2)
|
||||
. "\$userChkOut = Factory::getContainer()->";
|
||||
$body .= PHP_EOL . Indent::_(3)
|
||||
. "get(\Joomla\CMS\User\UserFactoryInterface::class)->";
|
||||
. "get(Joomla__"."_c2980d12_c3ef_4e23_b4a2_e6af1f5900a9___Power::class)->";
|
||||
$body .= PHP_EOL . Indent::_(4)
|
||||
. "loadUserById(\$item->checked_out);";
|
||||
. "loadUserById(\$item->checked_out ?? 0);";
|
||||
}
|
||||
$body .= PHP_EOL . Indent::_(2) . "\$canDo = " . $Helper
|
||||
. "::getActions('" . $nameSingleCode . "',\$item,'"
|
||||
@ -14636,7 +14660,7 @@ class Interpretation extends Fields
|
||||
$method[] = Indent::_(2) . "//" . Line::_(__Line__, __Class__)
|
||||
. " Check for request forgeries";
|
||||
$method[] = Indent::_(2)
|
||||
. "Session::checkToken() or die(Text:"
|
||||
. "Joomla__"."_5ba38513_5c4f_4b0d_935e_49e986a6bce8___Power::checkToken() or die(Text:"
|
||||
. ":_('JINVALID_TOKEN'));";
|
||||
$method[] = Indent::_(2) . "//" . Line::_(__Line__, __Class__)
|
||||
. " check if export is allowed for this user.";
|
||||
@ -14990,7 +15014,7 @@ class Interpretation extends Fields
|
||||
$method[] = Indent::_(1) . "{";
|
||||
$method[] = Indent::_(2) . "//" . Line::_(__Line__, __Class__)
|
||||
. " Check for request forgeries";
|
||||
$method[] = Indent::_(2) . "Session::checkToken() or die(Text:"
|
||||
$method[] = Indent::_(2) . "Joomla__"."_5ba38513_5c4f_4b0d_935e_49e986a6bce8___Power::checkToken() or die(Text:"
|
||||
. ":_('JINVALID_TOKEN'));";
|
||||
$method[] = Indent::_(2) . "//" . Line::_(__Line__, __Class__)
|
||||
. " check if export is allowed for this user.";
|
||||
@ -15058,7 +15082,7 @@ class Interpretation extends Fields
|
||||
$method[] = Indent::_(1) . "{";
|
||||
$method[] = Indent::_(2) . "//" . Line::_(__Line__, __Class__)
|
||||
. " Check for request forgeries";
|
||||
$method[] = Indent::_(2) . "Session::checkToken() or die(Text:"
|
||||
$method[] = Indent::_(2) . "Joomla__"."_5ba38513_5c4f_4b0d_935e_49e986a6bce8___Power::checkToken() or die(Text:"
|
||||
. ":_('JINVALID_TOKEN'));";
|
||||
$method[] = Indent::_(2) . "//" . Line::_(__Line__, __Class__)
|
||||
. " check if import is allowed for this user.";
|
||||
@ -17321,7 +17345,7 @@ class Interpretation extends Fields
|
||||
$fix .= PHP_EOL . Indent::_(2) . "//" . Line::_(__Line__, __Class__)
|
||||
. " Add Ajax Token";
|
||||
$fix .= PHP_EOL . Indent::_(2)
|
||||
. "\$this->getDocument()->addScriptDeclaration(\"var token = '\" . Session::getFormToken() . \"';\");";
|
||||
. "\$this->getDocument()->addScriptDeclaration(\"var token = '\" . Joomla__"."_5ba38513_5c4f_4b0d_935e_49e986a6bce8___Power::getFormToken() . \"';\");";
|
||||
}
|
||||
|
||||
return $fix;
|
||||
@ -17880,12 +17904,10 @@ class Interpretation extends Fields
|
||||
$function[] = Indent::_(5)
|
||||
. "Factory::getContainer()->";
|
||||
$function[] = Indent::_(5)
|
||||
. "get(\Joomla\CMS\User\UserFactoryInterface::class)->";
|
||||
. "get(Joomla__"."_c2980d12_c3ef_4e23_b4a2_e6af1f5900a9___Power::class)->";
|
||||
$function[] = Indent::_(5)
|
||||
. "loadUserById(\$"
|
||||
. $filter['code'] . ")->name";
|
||||
$function[] = Indent::_(5)
|
||||
. ");";
|
||||
. "loadUserById(\$" . $filter['code'] . " ?? 0)->name";
|
||||
$function[] = Indent::_(5) . ");";
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -32,6 +32,11 @@ class Whmcs
|
||||
*/
|
||||
public function set(object &$item)
|
||||
{
|
||||
if (!isset($item->add_license))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (1 == $item->add_license
|
||||
&& (!isset($item->whmcs_buy_link)
|
||||
|| !StringHelper::check(
|
||||
|
@ -101,6 +101,7 @@ class JoomlaPower implements ServiceProviderInterface
|
||||
{
|
||||
return new Grep(
|
||||
$container->get('Gitea.Repository.Contents'),
|
||||
$container->get('Network.Resolve'),
|
||||
$container->get('Config')->approved_joomla_paths
|
||||
);
|
||||
}
|
||||
|
@ -129,6 +129,7 @@ class Power implements ServiceProviderInterface
|
||||
{
|
||||
return new Grep(
|
||||
$container->get('Gitea.Repository.Contents'),
|
||||
$container->get('Network.Resolve'),
|
||||
$container->get('Config')->approved_paths,
|
||||
$container->get('Config')->local_powers_repository_path
|
||||
);
|
||||
|
@ -21,11 +21,14 @@ use VDM\Joomla\Componentbuilder\Compiler\Utilities\FileInjector;
|
||||
use VDM\Joomla\Componentbuilder\Compiler\Utilities\Paths;
|
||||
use VDM\Joomla\Componentbuilder\Compiler\Utilities\Counter;
|
||||
use VDM\Joomla\Componentbuilder\Compiler\Utilities\Files;
|
||||
use VDM\Joomla\Componentbuilder\Utilities\Constantpaths;
|
||||
use VDM\Joomla\Componentbuilder\Compiler\Utilities\Dynamicpath;
|
||||
use VDM\Joomla\Componentbuilder\Compiler\Utilities\Pathfix;
|
||||
use VDM\Joomla\Componentbuilder\Compiler\Utilities\Structure;
|
||||
use VDM\Joomla\Componentbuilder\Compiler\Utilities\Xml;
|
||||
use VDM\Joomla\Componentbuilder\Utilities\Constantpaths;
|
||||
use VDM\Joomla\Componentbuilder\Utilities\Uri;
|
||||
use VDM\Joomla\Componentbuilder\Utilities\Http;
|
||||
use VDM\Joomla\Componentbuilder\Utilities\Response;
|
||||
|
||||
|
||||
/**
|
||||
@ -41,7 +44,7 @@ class Utilities implements ServiceProviderInterface
|
||||
* @param Container $container The DI container.
|
||||
*
|
||||
* @return void
|
||||
* @since 3.2.0
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function register(Container $container)
|
||||
{
|
||||
@ -63,9 +66,6 @@ class Utilities implements ServiceProviderInterface
|
||||
$container->alias(Files::class, 'Utilities.Files')
|
||||
->share('Utilities.Files', [$this, 'getFiles'], true);
|
||||
|
||||
$container->alias(Constantpaths::class, 'Utilities.Constantpaths')
|
||||
->share('Utilities.Constantpaths', [$this, 'getConstantpaths'], true);
|
||||
|
||||
$container->alias(Dynamicpath::class, 'Utilities.Dynamicpath')
|
||||
->share('Utilities.Dynamicpath', [$this, 'getDynamicpath'], true);
|
||||
|
||||
@ -77,6 +77,18 @@ class Utilities implements ServiceProviderInterface
|
||||
|
||||
$container->alias(Xml::class, 'Utilities.Xml')
|
||||
->share('Utilities.Xml', [$this, 'getXml'], true);
|
||||
|
||||
$container->alias(Constantpaths::class, 'Utilities.Constantpaths')
|
||||
->share('Utilities.Constantpaths', [$this, 'getConstantpaths'], true);
|
||||
|
||||
$container->alias(Uri::class, 'Utilities.Uri')
|
||||
->share('Utilities.Uri', [$this, 'getUri'], true);
|
||||
|
||||
$container->alias(Http::class, 'Utilities.Http')
|
||||
->share('Utilities.Http', [$this, 'getHttp'], true);
|
||||
|
||||
$container->alias(Response::class, 'Utilities.Response')
|
||||
->share('Utilities.Response', [$this, 'getResponse'], true);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -85,7 +97,7 @@ class Utilities implements ServiceProviderInterface
|
||||
* @param Container $container The DI container.
|
||||
*
|
||||
* @return Folder
|
||||
* @since 3.2.0
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function getFolder(Container $container): Folder
|
||||
{
|
||||
@ -101,7 +113,7 @@ class Utilities implements ServiceProviderInterface
|
||||
* @param Container $container The DI container.
|
||||
*
|
||||
* @return File
|
||||
* @since 3.2.0
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function getFile(Container $container): File
|
||||
{
|
||||
@ -116,7 +128,7 @@ class Utilities implements ServiceProviderInterface
|
||||
* @param Container $container The DI container.
|
||||
*
|
||||
* @return FileInjector
|
||||
* @since 3.2.0
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function getFileInjector(Container $container): FileInjector
|
||||
{
|
||||
@ -132,7 +144,7 @@ class Utilities implements ServiceProviderInterface
|
||||
* @param Container $container The DI container.
|
||||
*
|
||||
* @return Counter
|
||||
* @since 3.2.0
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function getCounter(Container $container): Counter
|
||||
{
|
||||
@ -147,7 +159,7 @@ class Utilities implements ServiceProviderInterface
|
||||
* @param Container $container The DI container.
|
||||
*
|
||||
* @return Paths
|
||||
* @since 3.2.0
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function getPaths(Container $container): Paths
|
||||
{
|
||||
@ -163,33 +175,20 @@ class Utilities implements ServiceProviderInterface
|
||||
* @param Container $container The DI container.
|
||||
*
|
||||
* @return Files
|
||||
* @since 3.2.0
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function getFiles(Container $container): Files
|
||||
{
|
||||
return new Files();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the Constant Paths
|
||||
*
|
||||
* @param Container $container The DI container.
|
||||
*
|
||||
* @return Constantpaths
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function getConstantpaths(Container $container): Constantpaths
|
||||
{
|
||||
return new Constantpaths();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the Compiler Dynamic Path
|
||||
*
|
||||
* @param Container $container The DI container.
|
||||
*
|
||||
* @return Dynamicpath
|
||||
* @since 3.2.0
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function getDynamicpath(Container $container): Dynamicpath
|
||||
{
|
||||
@ -205,7 +204,7 @@ class Utilities implements ServiceProviderInterface
|
||||
* @param Container $container The DI container.
|
||||
*
|
||||
* @return Pathfix
|
||||
* @since 3.2.0
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function getPathfix(Container $container): Pathfix
|
||||
{
|
||||
@ -218,7 +217,7 @@ class Utilities implements ServiceProviderInterface
|
||||
* @param Container $container The DI container.
|
||||
*
|
||||
* @return Structure
|
||||
* @since 3.2.0
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function getStructure(Container $container): Structure
|
||||
{
|
||||
@ -238,13 +237,65 @@ class Utilities implements ServiceProviderInterface
|
||||
* @param Container $container The DI container.
|
||||
*
|
||||
* @return Xml
|
||||
* @since 3.2.0
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function getXml(Container $container): Xml
|
||||
{
|
||||
return new Xml(
|
||||
$container->get('Config')
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the Constant Paths
|
||||
*
|
||||
* @param Container $container The DI container.
|
||||
*
|
||||
* @return Constantpaths
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function getConstantpaths(Container $container): Constantpaths
|
||||
{
|
||||
return new Constantpaths();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get The Uri Class.
|
||||
*
|
||||
* @param Container $container The DI container.
|
||||
*
|
||||
* @return Uri
|
||||
* @since 5.0.4
|
||||
*/
|
||||
public function getUri(Container $container): Uri
|
||||
{
|
||||
return new Uri();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get The Http Class.
|
||||
*
|
||||
* @param Container $container The DI container.
|
||||
*
|
||||
* @return Http
|
||||
* @since 5.0.4
|
||||
*/
|
||||
public function getHttp(Container $container): Http
|
||||
{
|
||||
return new Http();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get The Response Class.
|
||||
*
|
||||
* @param Container $container The DI container.
|
||||
*
|
||||
* @return Response
|
||||
* @since 5.0.4
|
||||
*/
|
||||
public function getResponse(Container $container): Response
|
||||
{
|
||||
return new Response();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -75,13 +75,13 @@ class Paths extends Registry
|
||||
/**
|
||||
* getting any valid paths
|
||||
*
|
||||
* @param string $key The value's key/path name
|
||||
* @param string $key The value's key/path name
|
||||
*
|
||||
* @return string The path found as a string
|
||||
* @since 3.2.0
|
||||
* @throws \InvalidArgumentException If $key is not a valid function name.
|
||||
*/
|
||||
public function __get(string $key): string
|
||||
public function __get($key)
|
||||
{
|
||||
// check if it has been set
|
||||
if ($this->exists($key))
|
||||
|
@ -17,7 +17,7 @@ use Joomla\CMS\Factory as JoomlaFactory;
|
||||
use VDM\Joomla\Utilities\GetHelper;
|
||||
use VDM\Joomla\Utilities\StringHelper;
|
||||
use VDM\Joomla\Componentbuilder\Utilities\RepoHelper;
|
||||
use VDM\Joomla\Componentbuilder\Abstraction\BaseConfig;
|
||||
use VDM\Joomla\Componentbuilder\Abstraction\ComponentConfig;
|
||||
|
||||
|
||||
/**
|
||||
@ -31,7 +31,7 @@ use VDM\Joomla\Componentbuilder\Abstraction\BaseConfig;
|
||||
*
|
||||
* @since 5.0.3
|
||||
*/
|
||||
class Config extends BaseConfig
|
||||
class Config extends ComponentConfig
|
||||
{
|
||||
/**
|
||||
* The Global Joomla Configuration
|
||||
|
@ -20,6 +20,9 @@ use VDM\Joomla\Service\Data;
|
||||
use VDM\Joomla\Componentbuilder\Service\Gitea;
|
||||
use VDM\Joomla\Componentbuilder\Power\Service\Gitea as GiteaPower;
|
||||
use VDM\Joomla\Gitea\Service\Utilities as GiteaUtilities;
|
||||
use VDM\Joomla\Componentbuilder\Service\Api;
|
||||
use VDM\Joomla\Componentbuilder\Service\Network;
|
||||
use VDM\Joomla\Componentbuilder\Service\Utilities;
|
||||
use VDM\Joomla\Interfaces\FactoryInterface;
|
||||
use VDM\Joomla\Abstraction\Factory as ExtendingFactory;
|
||||
|
||||
@ -54,7 +57,10 @@ abstract class Factory extends ExtendingFactory implements FactoryInterface
|
||||
->registerServiceProvider(new Data())
|
||||
->registerServiceProvider(new Gitea())
|
||||
->registerServiceProvider(new GiteaPower())
|
||||
->registerServiceProvider(new GiteaUtilities());
|
||||
->registerServiceProvider(new GiteaUtilities())
|
||||
->registerServiceProvider(new Api())
|
||||
->registerServiceProvider(new Network())
|
||||
->registerServiceProvider(new Utilities());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -29,6 +29,14 @@ use VDM\Joomla\Abstraction\Grep as ExtendingGrep;
|
||||
*/
|
||||
final class Grep extends ExtendingGrep implements GrepInterface
|
||||
{
|
||||
/**
|
||||
* The Grep target [network]
|
||||
*
|
||||
* @var string
|
||||
* @since 5.0.4
|
||||
**/
|
||||
protected ?string $target = 'joomla-fieldtypes';
|
||||
|
||||
/**
|
||||
* Order of global search
|
||||
*
|
||||
@ -77,7 +85,7 @@ final class Grep extends ExtendingGrep implements GrepInterface
|
||||
$branch = $this->getBranchName($path);
|
||||
|
||||
// load the base and token if set
|
||||
$this->contents->load_($path->base ?? null, $path->token ?? null);
|
||||
$this->loadApi($this->contents, $path->base ?? null, $path->token ?? null);
|
||||
|
||||
// get the settings
|
||||
if (($power = $this->loadRemoteFile($path->organisation, $path->repository, $path->index->{$guid}->path . '/item.json', $branch)) !== null &&
|
||||
|
@ -100,6 +100,7 @@ class Fieldtype implements ServiceProviderInterface
|
||||
{
|
||||
return new Grep(
|
||||
$container->get('Gitea.Repository.Contents'),
|
||||
$container->get('Network.Resolve'),
|
||||
$container->get('Config')->approved_joomla_paths
|
||||
);
|
||||
}
|
||||
|
@ -17,7 +17,7 @@ use Joomla\CMS\Factory as JoomlaFactory;
|
||||
use VDM\Joomla\Utilities\GetHelper;
|
||||
use VDM\Joomla\Utilities\StringHelper;
|
||||
use VDM\Joomla\Componentbuilder\Utilities\RepoHelper;
|
||||
use VDM\Joomla\Componentbuilder\Abstraction\BaseConfig;
|
||||
use VDM\Joomla\Componentbuilder\Abstraction\ComponentConfig;
|
||||
|
||||
|
||||
/**
|
||||
@ -31,7 +31,7 @@ use VDM\Joomla\Componentbuilder\Abstraction\BaseConfig;
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
class Config extends BaseConfig
|
||||
class Config extends ComponentConfig
|
||||
{
|
||||
/**
|
||||
* The Global Joomla Configuration
|
||||
|
@ -20,6 +20,9 @@ use VDM\Joomla\Service\Data;
|
||||
use VDM\Joomla\Componentbuilder\Service\Gitea;
|
||||
use VDM\Joomla\Componentbuilder\Power\Service\Gitea as GiteaPower;
|
||||
use VDM\Joomla\Gitea\Service\Utilities as GiteaUtilities;
|
||||
use VDM\Joomla\Componentbuilder\Service\Network;
|
||||
use VDM\Joomla\Componentbuilder\Service\Api;
|
||||
use VDM\Joomla\Componentbuilder\Service\Utilities;
|
||||
use VDM\Joomla\Interfaces\FactoryInterface;
|
||||
use VDM\Joomla\Abstraction\Factory as ExtendingFactory;
|
||||
|
||||
@ -54,7 +57,10 @@ abstract class Factory extends ExtendingFactory implements FactoryInterface
|
||||
->registerServiceProvider(new Data())
|
||||
->registerServiceProvider(new Gitea())
|
||||
->registerServiceProvider(new GiteaPower())
|
||||
->registerServiceProvider(new GiteaUtilities());
|
||||
->registerServiceProvider(new GiteaUtilities())
|
||||
->registerServiceProvider(new Network())
|
||||
->registerServiceProvider(new Api())
|
||||
->registerServiceProvider(new Utilities());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -29,6 +29,14 @@ use VDM\Joomla\Abstraction\Grep as ExtendingGrep;
|
||||
*/
|
||||
final class Grep extends ExtendingGrep implements GrepInterface
|
||||
{
|
||||
/**
|
||||
* The Grep target [network]
|
||||
*
|
||||
* @var string
|
||||
* @since 5.0.4
|
||||
**/
|
||||
protected ?string $target = 'joomla-powers';
|
||||
|
||||
/**
|
||||
* Order of global search
|
||||
*
|
||||
@ -77,7 +85,7 @@ final class Grep extends ExtendingGrep implements GrepInterface
|
||||
$branch = $this->getBranchName($path);
|
||||
|
||||
// load the base and token if set
|
||||
$this->contents->load_($path->base ?? null, $path->token ?? null);
|
||||
$this->loadApi($this->contents, $path->base ?? null, $path->token ?? null);
|
||||
|
||||
// get the settings
|
||||
if (($power = $this->loadRemoteFile($path->organisation, $path->repository, $path->index->{$guid}->path . '/item.json', $branch)) !== null &&
|
||||
|
@ -100,6 +100,7 @@ class JoomlaPower implements ServiceProviderInterface
|
||||
{
|
||||
return new Grep(
|
||||
$container->get('Gitea.Repository.Contents'),
|
||||
$container->get('Network.Resolve'),
|
||||
$container->get('Config')->approved_joomla_paths
|
||||
);
|
||||
}
|
||||
|
@ -0,0 +1,33 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Component.Builder
|
||||
*
|
||||
* @created 4th September, 2022
|
||||
* @author Llewellyn van der Merwe <https://dev.vdm.io>
|
||||
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
|
||||
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
namespace VDM\Joomla\Componentbuilder\Network;
|
||||
|
||||
|
||||
use VDM\Joomla\Abstraction\Registry;
|
||||
|
||||
|
||||
/**
|
||||
* The Network Core
|
||||
*
|
||||
* @since 5.0.4
|
||||
*/
|
||||
final class Core extends Registry
|
||||
{
|
||||
/**
|
||||
* Path separator
|
||||
*
|
||||
* @var string|null
|
||||
* @since 3.2.0
|
||||
*/
|
||||
protected ?string $separator = '|';
|
||||
}
|
||||
|
@ -0,0 +1,33 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Component.Builder
|
||||
*
|
||||
* @created 4th September, 2022
|
||||
* @author Llewellyn van der Merwe <https://dev.vdm.io>
|
||||
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
|
||||
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
namespace VDM\Joomla\Componentbuilder\Network;
|
||||
|
||||
|
||||
use VDM\Joomla\Abstraction\Registry;
|
||||
|
||||
|
||||
/**
|
||||
* The Network Parsed Urls
|
||||
*
|
||||
* @since 5.0.4
|
||||
*/
|
||||
final class ParsedUrls extends Registry
|
||||
{
|
||||
/**
|
||||
* Path separator
|
||||
*
|
||||
* @var string|null
|
||||
* @since 3.2.0
|
||||
*/
|
||||
protected ?string $separator = '|';
|
||||
}
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user