Release of v5.1.1-beta4
Fix the FieldXML interface mismatch. #1228. Adds Initialize, Reset, and Push functionality to the Repository entities.
This commit is contained in:
12
CHANGELOG.md
12
CHANGELOG.md
@ -1,8 +1,7 @@
|
|||||||
# v5.1.1-beta3
|
# v5.1.1-beta4
|
||||||
|
|
||||||
- Fixes issue with loading the Component Builder Wiki.
|
- Fix the FieldXML interface mismatch. #1228
|
||||||
- Adds advanced version update notice to the Component Builder Dashboard.
|
- Adds Initialize, Reset, and Push functionality to the Repository entities.
|
||||||
- Completely refactors the class that builds the Component Dashboard. #1134
|
|
||||||
|
|
||||||
# v5.1.1-beta
|
# v5.1.1-beta
|
||||||
|
|
||||||
@ -22,7 +21,10 @@
|
|||||||
- Refactor the Creator Builders class.
|
- Refactor the Creator Builders class.
|
||||||
- Refactor the FieldString and FieldXML classes.
|
- Refactor the FieldString and FieldXML classes.
|
||||||
- Add JCB new package engine.
|
- Add JCB new package engine.
|
||||||
- Enhance operator support in dynamic get system. Relates to issue #1226.
|
- Enhance operator support in dynamic get system. Relates to issue #1226.
|
||||||
|
- Fixes issue with loading the Component Builder Wiki.
|
||||||
|
- Adds advanced version update notice to the Component Builder Dashboard.
|
||||||
|
- Completely refactors the class that builds the Component Dashboard. #1134
|
||||||
|
|
||||||
# v5.1.0
|
# v5.1.0
|
||||||
|
|
||||||
|
@ -1516,7 +1516,7 @@ class Com_ComponentbuilderInstallerScript implements InstallerScriptInterface
|
|||||||
|
|
||||||
|
|
||||||
// Fix the assets table rules column size.
|
// Fix the assets table rules column size.
|
||||||
$this->setDatabaseAssetsRulesFix(100960, "MEDIUMTEXT");
|
$this->setDatabaseAssetsRulesFix(101440, "MEDIUMTEXT");
|
||||||
// Install the global extension params.
|
// Install the global extension params.
|
||||||
$this->setExtensionsParams(
|
$this->setExtensionsParams(
|
||||||
'{"autorName":"Llewellyn van der Merwe","autorEmail":"joomla@vdm.io","subform_layouts":{"subform_layouts0":{"view_field":"default","layout":"repeatablejcbjfive"}},"editor":"none","manage_jcb_package_directories":"2","set_browser_storage":"1","storage_time_to_live":"global","super_powers_documentation":"0","powers_repository":"0","super_powers_repositories":"0","builder_gif_size":"480-272","compiler_plugin":["componentbuilderactionlogcompiler","componentbuilderfieldorderingcompiler","componentbuilderheaderscompiler","componentbuilderpowersautoloadercompiler","componentbuilderprivacycompiler"],"add_menu_prefix":"1","menu_prefix":"»","namespace_prefix":"JCB","minify":"0","language":"en-GB","percentagelanguageadd":"30","assets_table_fix":"2","compiler_field_builder_type":"2","field_name_builder":"2","type_name_builder":"2","import_guid_only":"1","export_language_strings":"1","cronjob_backup_type":"1","cronjob_backup_server":"0","backup_package_name":"JCB_Backup_[YEAR]_[MONTH]_[DAY]","export_company":"Vast Development Method","export_owner":"Llewellyn van der Merwe","export_email":"joomla@vdm.io","export_website":"https://dev.vdm.io/","export_license":"GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html","export_copyright":"Copyright (C) 2015. All Rights Reserved","check_in":"-1 day","save_history":"1","history_limit":"10","add_jquery_framework":"1","uikit_load":"1","uikit_min":"","uikit_style":""}'
|
'{"autorName":"Llewellyn van der Merwe","autorEmail":"joomla@vdm.io","subform_layouts":{"subform_layouts0":{"view_field":"default","layout":"repeatablejcbjfive"}},"editor":"none","manage_jcb_package_directories":"2","set_browser_storage":"1","storage_time_to_live":"global","super_powers_documentation":"0","powers_repository":"0","super_powers_repositories":"0","builder_gif_size":"480-272","compiler_plugin":["componentbuilderactionlogcompiler","componentbuilderfieldorderingcompiler","componentbuilderheaderscompiler","componentbuilderpowersautoloadercompiler","componentbuilderprivacycompiler"],"add_menu_prefix":"1","menu_prefix":"»","namespace_prefix":"JCB","minify":"0","language":"en-GB","percentagelanguageadd":"30","assets_table_fix":"2","compiler_field_builder_type":"2","field_name_builder":"2","type_name_builder":"2","import_guid_only":"1","export_language_strings":"1","cronjob_backup_type":"1","cronjob_backup_server":"0","backup_package_name":"JCB_Backup_[YEAR]_[MONTH]_[DAY]","export_company":"Vast Development Method","export_owner":"Llewellyn van der Merwe","export_email":"joomla@vdm.io","export_website":"https://dev.vdm.io/","export_license":"GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html","export_copyright":"Copyright (C) 2015. All Rights Reserved","check_in":"-1 day","save_history":"1","history_limit":"10","add_jquery_framework":"1","uikit_load":"1","uikit_min":"","uikit_style":""}'
|
||||||
@ -3292,7 +3292,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">
|
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"/>
|
<img src="components/com_componentbuilder/assets/images/vdm-component.jpg"/>
|
||||||
</a>
|
</a>
|
||||||
<h3>Upgrade to Version 5.1.1-beta3 Was Successful! Let us know if anything is not working as expected.</h3></div>';
|
<h3>Upgrade to Version 5.1.1-beta4 Was Successful! Let us know if anything is not working as expected.</h3></div>';
|
||||||
|
|
||||||
// Add/Update component in the action logs extensions table.
|
// Add/Update component in the action logs extensions table.
|
||||||
$this->setActionLogsExtensions();
|
$this->setActionLogsExtensions();
|
||||||
|
@ -9,7 +9,7 @@ This is a professional-grade [Joomla 5.x](https://extensions.joomla.org/extensio
|
|||||||
|
|
||||||
JCB generates native Joomla components, plugins, and modules for Joomla 3.x, 4.x, and 5.x — and is already prepared for Joomla 6. Every compiled project is tailored for the specific version without needing backward compatibility plugins. With integrated version-aware compiling, smart boilerplating, and Git-powered project syncing, JCB is much more than a code generator—it's a **full-stack development pipeline for Joomla extensions**.
|
JCB generates native Joomla components, plugins, and modules for Joomla 3.x, 4.x, and 5.x — and is already prepared for Joomla 6. Every compiled project is tailored for the specific version without needing backward compatibility plugins. With integrated version-aware compiling, smart boilerplating, and Git-powered project syncing, JCB is much more than a code generator—it's a **full-stack development pipeline for Joomla extensions**.
|
||||||
|
|
||||||
You can install this component easily. The latest release (**5.1.1-beta3**) is available on [Releases](https://git.vdm.dev/joomla/pkg-component-builder/releases) and updated frequently with full source access.
|
You can install this component easily. The latest release (**5.1.1-beta4**) is available on [Releases](https://git.vdm.dev/joomla/pkg-component-builder/releases) and updated frequently with full source access.
|
||||||
|
|
||||||
Upgrades are seamless through Joomla’s built-in extension update mechanism.
|
Upgrades are seamless through Joomla’s built-in extension update mechanism.
|
||||||
|
|
||||||
@ -229,9 +229,9 @@ JCB is developed by developers for developers. Its purpose is to democratize hig
|
|||||||
* **Company:** [Vast Development Method](https://dev.vdm.io)
|
* **Company:** [Vast Development Method](https://dev.vdm.io)
|
||||||
* **Author:** [Llewellyn van der Merwe](mailto:joomla@vdm.io)
|
* **Author:** [Llewellyn van der Merwe](mailto:joomla@vdm.io)
|
||||||
* **Component:** [Component Builder](https://git.vdm.dev/joomla/Component-Builder)
|
* **Component:** [Component Builder](https://git.vdm.dev/joomla/Component-Builder)
|
||||||
* **Created:** 30th April, 2015 · **Last Build:** 23rd June, 2025 · **Version:** 5.1.1-beta3
|
* **Created:** 30th April, 2015 · **Last Build:** 25th June, 2025 · **Version:** 5.1.1-beta4
|
||||||
* **License:** GNU General Public License version 2 or later; see LICENSE.txt · **Copyright:** Copyright (C) 2015 Vast Development Method. All rights reserved.
|
* **License:** GNU General Public License version 2 or later; see LICENSE.txt · **Copyright:** Copyright (C) 2015 Vast Development Method. All rights reserved.
|
||||||
* **Lines:** 1090382 · **Fields:** 2096 · **Files:** 7450 · **Folders:** 725
|
* **Lines:** 1093361 · **Fields:** 2096 · **Files:** 7498 · **Folders:** 728
|
||||||
|
|
||||||
> Generated with [JCB](https://www.joomlacomponentbuilder.com) — The Smartest Way to Build Joomla Extensions.
|
> Generated with [JCB](https://www.joomlacomponentbuilder.com) — The Smartest Way to Build Joomla Extensions.
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@ This is a professional-grade [Joomla 5.x](https://extensions.joomla.org/extensio
|
|||||||
|
|
||||||
JCB generates native Joomla components, plugins, and modules for Joomla 3.x, 4.x, and 5.x — and is already prepared for Joomla 6. Every compiled project is tailored for the specific version without needing backward compatibility plugins. With integrated version-aware compiling, smart boilerplating, and Git-powered project syncing, JCB is much more than a code generator—it's a **full-stack development pipeline for Joomla extensions**.
|
JCB generates native Joomla components, plugins, and modules for Joomla 3.x, 4.x, and 5.x — and is already prepared for Joomla 6. Every compiled project is tailored for the specific version without needing backward compatibility plugins. With integrated version-aware compiling, smart boilerplating, and Git-powered project syncing, JCB is much more than a code generator—it's a **full-stack development pipeline for Joomla extensions**.
|
||||||
|
|
||||||
You can install this component easily. The latest release (**5.1.1-beta3**) is available on [Releases](https://git.vdm.dev/joomla/pkg-component-builder/releases) and updated frequently with full source access.
|
You can install this component easily. The latest release (**5.1.1-beta4**) is available on [Releases](https://git.vdm.dev/joomla/pkg-component-builder/releases) and updated frequently with full source access.
|
||||||
|
|
||||||
Upgrades are seamless through Joomla’s built-in extension update mechanism.
|
Upgrades are seamless through Joomla’s built-in extension update mechanism.
|
||||||
|
|
||||||
@ -229,9 +229,9 @@ JCB is developed by developers for developers. Its purpose is to democratize hig
|
|||||||
* **Company:** [Vast Development Method](https://dev.vdm.io)
|
* **Company:** [Vast Development Method](https://dev.vdm.io)
|
||||||
* **Author:** [Llewellyn van der Merwe](mailto:joomla@vdm.io)
|
* **Author:** [Llewellyn van der Merwe](mailto:joomla@vdm.io)
|
||||||
* **Component:** [Component Builder](https://git.vdm.dev/joomla/Component-Builder)
|
* **Component:** [Component Builder](https://git.vdm.dev/joomla/Component-Builder)
|
||||||
* **Created:** 30th April, 2015 · **Last Build:** 23rd June, 2025 · **Version:** 5.1.1-beta3
|
* **Created:** 30th April, 2015 · **Last Build:** 25th June, 2025 · **Version:** 5.1.1-beta4
|
||||||
* **License:** GNU General Public License version 2 or later; see LICENSE.txt · **Copyright:** Copyright (C) 2015 Vast Development Method. All rights reserved.
|
* **License:** GNU General Public License version 2 or later; see LICENSE.txt · **Copyright:** Copyright (C) 2015 Vast Development Method. All rights reserved.
|
||||||
* **Lines:** 1090382 · **Fields:** 2096 · **Files:** 7450 · **Folders:** 725
|
* **Lines:** 1093361 · **Fields:** 2096 · **Files:** 7498 · **Folders:** 728
|
||||||
|
|
||||||
> Generated with [JCB](https://www.joomlacomponentbuilder.com) — The Smartest Way to Build Joomla Extensions.
|
> Generated with [JCB](https://www.joomlacomponentbuilder.com) — The Smartest Way to Build Joomla Extensions.
|
||||||
|
|
||||||
|
@ -521,6 +521,9 @@
|
|||||||
<action name="repository.edit.state" title="COM_COMPONENTBUILDER_REPOSITORIES_EDIT_STATE" description="COM_COMPONENTBUILDER_REPOSITORIES_EDIT_STATE_DESC" />
|
<action name="repository.edit.state" title="COM_COMPONENTBUILDER_REPOSITORIES_EDIT_STATE" description="COM_COMPONENTBUILDER_REPOSITORIES_EDIT_STATE_DESC" />
|
||||||
<action name="repository.version" title="COM_COMPONENTBUILDER_REPOSITORIES_EDIT_VERSION" description="COM_COMPONENTBUILDER_REPOSITORIES_EDIT_VERSION_DESC" />
|
<action name="repository.version" title="COM_COMPONENTBUILDER_REPOSITORIES_EDIT_VERSION" description="COM_COMPONENTBUILDER_REPOSITORIES_EDIT_VERSION_DESC" />
|
||||||
<action name="repository.submenu" title="COM_COMPONENTBUILDER_REPOSITORIES_SUBMENU" description="COM_COMPONENTBUILDER_REPOSITORIES_SUBMENU_DESC" />
|
<action name="repository.submenu" title="COM_COMPONENTBUILDER_REPOSITORIES_SUBMENU" description="COM_COMPONENTBUILDER_REPOSITORIES_SUBMENU_DESC" />
|
||||||
|
<action name="repository.init" title="COM_COMPONENTBUILDER_REPOSITORY_INIT_BUTTON_ACCESS" description="COM_COMPONENTBUILDER_REPOSITORY_INIT_BUTTON_ACCESS_DESC" />
|
||||||
|
<action name="repository.push" title="COM_COMPONENTBUILDER_REPOSITORY_PUSH_BUTTON_ACCESS" description="COM_COMPONENTBUILDER_REPOSITORY_PUSH_BUTTON_ACCESS_DESC" />
|
||||||
|
<action name="repository.reset" title="COM_COMPONENTBUILDER_REPOSITORY_RESET_BUTTON_ACCESS" description="COM_COMPONENTBUILDER_REPOSITORY_RESET_BUTTON_ACCESS_DESC" />
|
||||||
<action name="search.access" title="COM_COMPONENTBUILDER_SEARCH_ACCESS" description="COM_COMPONENTBUILDER_SEARCH_ACCESS_DESC" />
|
<action name="search.access" title="COM_COMPONENTBUILDER_SEARCH_ACCESS" description="COM_COMPONENTBUILDER_SEARCH_ACCESS_DESC" />
|
||||||
<action name="search.compiler" title="COM_COMPONENTBUILDER_SEARCH_COMPILER_BUTTON_ACCESS" description="COM_COMPONENTBUILDER_SEARCH_COMPILER_BUTTON_ACCESS_DESC" />
|
<action name="search.compiler" title="COM_COMPONENTBUILDER_SEARCH_COMPILER_BUTTON_ACCESS" description="COM_COMPONENTBUILDER_SEARCH_COMPILER_BUTTON_ACCESS_DESC" />
|
||||||
<action name="search.dashboard_list" title="COM_COMPONENTBUILDER_SEARCH_DASHBOARD_LIST" description="COM_COMPONENTBUILDER_SEARCH_DASHBOARD_LIST_DESC" />
|
<action name="search.dashboard_list" title="COM_COMPONENTBUILDER_SEARCH_DASHBOARD_LIST" description="COM_COMPONENTBUILDER_SEARCH_DASHBOARD_LIST_DESC" />
|
||||||
|
@ -166,6 +166,7 @@ class InitializationManager {
|
|||||||
const powers = [
|
const powers = [
|
||||||
'Joomla.Fieldtype',
|
'Joomla.Fieldtype',
|
||||||
'Joomla.Power',
|
'Joomla.Power',
|
||||||
|
'Repository',
|
||||||
'Power'
|
'Power'
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -155,15 +155,17 @@
|
|||||||
<option value="">
|
<option value="">
|
||||||
COM_COMPONENTBUILDER_REPOSITORY_SELECT_AN_OPTION</option>
|
COM_COMPONENTBUILDER_REPOSITORY_SELECT_AN_OPTION</option>
|
||||||
<option value="4">
|
<option value="4">
|
||||||
COM_COMPONENTBUILDER_REPOSITORY_JCB_PACKAGES</option>
|
COM_COMPONENTBUILDER_REPOSITORY_PACKAGES</option>
|
||||||
<option value="3">
|
<option value="3">
|
||||||
COM_COMPONENTBUILDER_REPOSITORY_JOOMLA_FIELD_TYPES</option>
|
COM_COMPONENTBUILDER_REPOSITORY_FIELD_TYPES</option>
|
||||||
<option value="2">
|
<option value="2">
|
||||||
COM_COMPONENTBUILDER_REPOSITORY_JOOMLA_POWER</option>
|
COM_COMPONENTBUILDER_REPOSITORY_JOOMLA_POWER</option>
|
||||||
<option value="5">
|
<option value="5">
|
||||||
COM_COMPONENTBUILDER_REPOSITORY_SNIPPETS</option>
|
COM_COMPONENTBUILDER_REPOSITORY_SNIPPETS</option>
|
||||||
<option value="1">
|
<option value="1">
|
||||||
COM_COMPONENTBUILDER_REPOSITORY_SUPER_POWER</option>
|
COM_COMPONENTBUILDER_REPOSITORY_SUPER_POWER</option>
|
||||||
|
<option value="6">
|
||||||
|
COM_COMPONENTBUILDER_REPOSITORY_REPOSITORIES</option>
|
||||||
</field>
|
</field>
|
||||||
<!-- Type Field. Type: List. (joomla) -->
|
<!-- Type Field. Type: List. (joomla) -->
|
||||||
<field
|
<field
|
||||||
|
@ -5467,6 +5467,7 @@ COM_COMPONENTBUILDER_INITIALIZE_MODULES="Initialize Modules"
|
|||||||
COM_COMPONENTBUILDER_INITIALIZE_PLACEHOLDERS="Initialize Placeholders"
|
COM_COMPONENTBUILDER_INITIALIZE_PLACEHOLDERS="Initialize Placeholders"
|
||||||
COM_COMPONENTBUILDER_INITIALIZE_PLUGINS="Initialize Plugins"
|
COM_COMPONENTBUILDER_INITIALIZE_PLUGINS="Initialize Plugins"
|
||||||
COM_COMPONENTBUILDER_INITIALIZE_POWERS="Initialize Powers"
|
COM_COMPONENTBUILDER_INITIALIZE_POWERS="Initialize Powers"
|
||||||
|
COM_COMPONENTBUILDER_INITIALIZE_REPOSITORIES="Initialize Repositories"
|
||||||
COM_COMPONENTBUILDER_INITIALIZE_SELECTED_S_ITEMS="Initialize selected [%s] items"
|
COM_COMPONENTBUILDER_INITIALIZE_SELECTED_S_ITEMS="Initialize selected [%s] items"
|
||||||
COM_COMPONENTBUILDER_INITIALIZE_SITE_VIEWS="Initialize Site Views"
|
COM_COMPONENTBUILDER_INITIALIZE_SITE_VIEWS="Initialize Site Views"
|
||||||
COM_COMPONENTBUILDER_INITIALIZE_SNIPPETS="Initialize Snippets"
|
COM_COMPONENTBUILDER_INITIALIZE_SNIPPETS="Initialize Snippets"
|
||||||
@ -7959,6 +7960,7 @@ COM_COMPONENTBUILDER_POWER_YES="Yes"
|
|||||||
COM_COMPONENTBUILDER_PPACKAGEB_REPOSITORY_AT_BSSB_GAVE_THE_FOLLOWING_ERRORBR_SP="<p>Package</b> repository at <b>%s/%s</b> gave the following error!<br />%s</p>"
|
COM_COMPONENTBUILDER_PPACKAGEB_REPOSITORY_AT_BSSB_GAVE_THE_FOLLOWING_ERRORBR_SP="<p>Package</b> repository at <b>%s/%s</b> gave the following error!<br />%s</p>"
|
||||||
COM_COMPONENTBUILDER_PPACKAGECONTENTB_REPOSITORY_AT_BSSB_GAVE_THE_FOLLOWING_ERRORBR_SP="<p>Package:content</b> repository at <b>%s/%s</b> gave the following error!<br />%s</p>"
|
COM_COMPONENTBUILDER_PPACKAGECONTENTB_REPOSITORY_AT_BSSB_GAVE_THE_FOLLOWING_ERRORBR_SP="<p>Package:content</b> repository at <b>%s/%s</b> gave the following error!<br />%s</p>"
|
||||||
COM_COMPONENTBUILDER_PPOWER_BGUIDSB_NOT_FOUNDP="<p>Power <b>guid:%s</b> not found!</p>"
|
COM_COMPONENTBUILDER_PPOWER_BGUIDSB_NOT_FOUNDP="<p>Power <b>guid:%s</b> not found!</p>"
|
||||||
|
COM_COMPONENTBUILDER_PREPOSITORYB_ENTITY_AT_BSSB_GAVE_THE_FOLLOWING_ERRORBR_SP="<p>Repository</b> entity at <b>%s/%s</b> gave the following error!<br />%s</p>"
|
||||||
COM_COMPONENTBUILDER_PRE_RELEASE="Pre Release"
|
COM_COMPONENTBUILDER_PRE_RELEASE="Pre Release"
|
||||||
COM_COMPONENTBUILDER_PROPERTIESBR_SMALLHERE_YOU_CAN_SET_THE_PROPERTIES_FOR_THIS_FIELDSMALL="Properties<br /><small>Here you can set the properties for this field.</small>"
|
COM_COMPONENTBUILDER_PROPERTIESBR_SMALLHERE_YOU_CAN_SET_THE_PROPERTIES_FOR_THIS_FIELDSMALL="Properties<br /><small>Here you can set the properties for this field.</small>"
|
||||||
COM_COMPONENTBUILDER_PROPERTY="Property"
|
COM_COMPONENTBUILDER_PROPERTY="Property"
|
||||||
@ -8058,6 +8060,7 @@ COM_COMPONENTBUILDER_REPOSITORY_DETAILS="Details"
|
|||||||
COM_COMPONENTBUILDER_REPOSITORY_EDIT="Editing the Repository"
|
COM_COMPONENTBUILDER_REPOSITORY_EDIT="Editing the Repository"
|
||||||
COM_COMPONENTBUILDER_REPOSITORY_ERROR_UNIQUE_ALIAS="Another Repository has the same alias."
|
COM_COMPONENTBUILDER_REPOSITORY_ERROR_UNIQUE_ALIAS="Another Repository has the same alias."
|
||||||
COM_COMPONENTBUILDER_REPOSITORY_ERROR_UNIQUE_ALIAS_TRASHED="A trashed Repository has the same alias ."
|
COM_COMPONENTBUILDER_REPOSITORY_ERROR_UNIQUE_ALIAS_TRASHED="A trashed Repository has the same alias ."
|
||||||
|
COM_COMPONENTBUILDER_REPOSITORY_FIELD_TYPES="Field Types"
|
||||||
COM_COMPONENTBUILDER_REPOSITORY_GITEA="Gitea"
|
COM_COMPONENTBUILDER_REPOSITORY_GITEA="Gitea"
|
||||||
COM_COMPONENTBUILDER_REPOSITORY_GITHUB="Github"
|
COM_COMPONENTBUILDER_REPOSITORY_GITHUB="Github"
|
||||||
COM_COMPONENTBUILDER_REPOSITORY_GLOBAL="Global"
|
COM_COMPONENTBUILDER_REPOSITORY_GLOBAL="Global"
|
||||||
@ -8065,8 +8068,8 @@ COM_COMPONENTBUILDER_REPOSITORY_GUID_DESCRIPTION="Globally Unique Identifier"
|
|||||||
COM_COMPONENTBUILDER_REPOSITORY_GUID_HINT="Auto Generated"
|
COM_COMPONENTBUILDER_REPOSITORY_GUID_HINT="Auto Generated"
|
||||||
COM_COMPONENTBUILDER_REPOSITORY_GUID_LABEL="GUID"
|
COM_COMPONENTBUILDER_REPOSITORY_GUID_LABEL="GUID"
|
||||||
COM_COMPONENTBUILDER_REPOSITORY_ID="Id"
|
COM_COMPONENTBUILDER_REPOSITORY_ID="Id"
|
||||||
COM_COMPONENTBUILDER_REPOSITORY_JCB_PACKAGES="JCB Packages"
|
COM_COMPONENTBUILDER_REPOSITORY_INIT_BUTTON_ACCESS="Repository Init Button Access"
|
||||||
COM_COMPONENTBUILDER_REPOSITORY_JOOMLA_FIELD_TYPES="Joomla Field Types"
|
COM_COMPONENTBUILDER_REPOSITORY_INIT_BUTTON_ACCESS_DESC="Allows the users in this group to access the init button."
|
||||||
COM_COMPONENTBUILDER_REPOSITORY_JOOMLA_POWER="Joomla Power"
|
COM_COMPONENTBUILDER_REPOSITORY_JOOMLA_POWER="Joomla Power"
|
||||||
COM_COMPONENTBUILDER_REPOSITORY_MODIFIED_BY_DESC="The last user that modified this Repository."
|
COM_COMPONENTBUILDER_REPOSITORY_MODIFIED_BY_DESC="The last user that modified this Repository."
|
||||||
COM_COMPONENTBUILDER_REPOSITORY_MODIFIED_BY_LABEL="Modified By"
|
COM_COMPONENTBUILDER_REPOSITORY_MODIFIED_BY_LABEL="Modified By"
|
||||||
@ -8079,17 +8082,23 @@ COM_COMPONENTBUILDER_REPOSITORY_ORGANISATION_HINT="[org]"
|
|||||||
COM_COMPONENTBUILDER_REPOSITORY_ORGANISATION_LABEL="Organisation"
|
COM_COMPONENTBUILDER_REPOSITORY_ORGANISATION_LABEL="Organisation"
|
||||||
COM_COMPONENTBUILDER_REPOSITORY_ORGANISATION_MESSAGE="Error! Please add organisation here."
|
COM_COMPONENTBUILDER_REPOSITORY_ORGANISATION_MESSAGE="Error! Please add organisation here."
|
||||||
COM_COMPONENTBUILDER_REPOSITORY_OVERRIDE="Override"
|
COM_COMPONENTBUILDER_REPOSITORY_OVERRIDE="Override"
|
||||||
|
COM_COMPONENTBUILDER_REPOSITORY_PACKAGES="Packages"
|
||||||
COM_COMPONENTBUILDER_REPOSITORY_PERMISSION="Permissions"
|
COM_COMPONENTBUILDER_REPOSITORY_PERMISSION="Permissions"
|
||||||
COM_COMPONENTBUILDER_REPOSITORY_PLACEHOLDERS="Placeholders"
|
COM_COMPONENTBUILDER_REPOSITORY_PLACEHOLDERS="Placeholders"
|
||||||
COM_COMPONENTBUILDER_REPOSITORY_PLACEHOLDER_NOTE_DESCRIPTION="<p>When powers are connected to components, we utilize global placeholders. These placeholders are linked to the specific component, allowing for dynamic updates to any placeholders found within the powers. However, when we directly <b>push</b> powers from the powers area to this repository, we require <b>placeholders</b> that are specific to this repository.</p><p>You can add these repository-specific placeholders here. Please note that these placeholders are only utilized during direct pushes from the powers area and are not considered during the compilation of any component. Although you can use the same placeholders to ensure consistent outcomes, they technically have no direct relationship with the components.</p>"
|
COM_COMPONENTBUILDER_REPOSITORY_PLACEHOLDER_NOTE_DESCRIPTION="<p>When powers are connected to components, we utilize global placeholders. These placeholders are linked to the specific component, allowing for dynamic updates to any placeholders found within the powers. However, when we directly <b>push</b> powers from the powers area to this repository, we require <b>placeholders</b> that are specific to this repository.</p><p>You can add these repository-specific placeholders here. Please note that these placeholders are only utilized during direct pushes from the powers area and are not considered during the compilation of any component. Although you can use the same placeholders to ensure consistent outcomes, they technically have no direct relationship with the components.</p>"
|
||||||
COM_COMPONENTBUILDER_REPOSITORY_PLACEHOLDER_NOTE_LABEL="The Repository Placeholders"
|
COM_COMPONENTBUILDER_REPOSITORY_PLACEHOLDER_NOTE_LABEL="The Repository Placeholders"
|
||||||
COM_COMPONENTBUILDER_REPOSITORY_PUBLISHING="Publishing"
|
COM_COMPONENTBUILDER_REPOSITORY_PUBLISHING="Publishing"
|
||||||
|
COM_COMPONENTBUILDER_REPOSITORY_PUSH_BUTTON_ACCESS="Repository Push Button Access"
|
||||||
|
COM_COMPONENTBUILDER_REPOSITORY_PUSH_BUTTON_ACCESS_DESC="Allows the users in this group to access the push button."
|
||||||
COM_COMPONENTBUILDER_REPOSITORY_READ_BRANCH_DESCRIPTION="The read branch to use in the API calls."
|
COM_COMPONENTBUILDER_REPOSITORY_READ_BRANCH_DESCRIPTION="The read branch to use in the API calls."
|
||||||
COM_COMPONENTBUILDER_REPOSITORY_READ_BRANCH_HINT="[master]"
|
COM_COMPONENTBUILDER_REPOSITORY_READ_BRANCH_HINT="[master]"
|
||||||
COM_COMPONENTBUILDER_REPOSITORY_READ_BRANCH_LABEL="Read Branch"
|
COM_COMPONENTBUILDER_REPOSITORY_READ_BRANCH_LABEL="Read Branch"
|
||||||
COM_COMPONENTBUILDER_REPOSITORY_READ_BRANCH_MESSAGE="Error! Please add read branch here."
|
COM_COMPONENTBUILDER_REPOSITORY_READ_BRANCH_MESSAGE="Error! Please add read branch here."
|
||||||
|
COM_COMPONENTBUILDER_REPOSITORY_REPOSITORIES="Repositories"
|
||||||
COM_COMPONENTBUILDER_REPOSITORY_REPOSITORY_HINT="[repo]"
|
COM_COMPONENTBUILDER_REPOSITORY_REPOSITORY_HINT="[repo]"
|
||||||
COM_COMPONENTBUILDER_REPOSITORY_REPOSITORY_LABEL="Repository"
|
COM_COMPONENTBUILDER_REPOSITORY_REPOSITORY_LABEL="Repository"
|
||||||
|
COM_COMPONENTBUILDER_REPOSITORY_RESET_BUTTON_ACCESS="Repository Reset Button Access"
|
||||||
|
COM_COMPONENTBUILDER_REPOSITORY_RESET_BUTTON_ACCESS_DESC="Allows the users in this group to access the reset button."
|
||||||
COM_COMPONENTBUILDER_REPOSITORY_SAVE_WARNING="Alias already existed so a number was added at the end. You can re-edit the Repository to customise the alias."
|
COM_COMPONENTBUILDER_REPOSITORY_SAVE_WARNING="Alias already existed so a number was added at the end. You can re-edit the Repository to customise the alias."
|
||||||
COM_COMPONENTBUILDER_REPOSITORY_SELECT_AN_OPTION="Select an option"
|
COM_COMPONENTBUILDER_REPOSITORY_SELECT_AN_OPTION="Select an option"
|
||||||
COM_COMPONENTBUILDER_REPOSITORY_SNIPPETS="Snippets"
|
COM_COMPONENTBUILDER_REPOSITORY_SNIPPETS="Snippets"
|
||||||
@ -9190,6 +9199,8 @@ COM_COMPONENTBUILDER_THESE_PLACEHOLDERS_HAVE_SUCCESSFULLY_BEEN_PUSHED="These Pla
|
|||||||
COM_COMPONENTBUILDER_THESE_PLACEHOLDERS_HAVE_SUCCESSFULLY_BEEN_RESET="These Placeholders have successfully been reset."
|
COM_COMPONENTBUILDER_THESE_PLACEHOLDERS_HAVE_SUCCESSFULLY_BEEN_RESET="These Placeholders have successfully been reset."
|
||||||
COM_COMPONENTBUILDER_THESE_POWERS_HAVE_SUCCESSFULLY_BEEN_PUSHED="These Powers have successfully been pushed."
|
COM_COMPONENTBUILDER_THESE_POWERS_HAVE_SUCCESSFULLY_BEEN_PUSHED="These Powers have successfully been pushed."
|
||||||
COM_COMPONENTBUILDER_THESE_POWERS_HAVE_SUCCESSFULLY_BEEN_RESET="These Powers have successfully been reset."
|
COM_COMPONENTBUILDER_THESE_POWERS_HAVE_SUCCESSFULLY_BEEN_RESET="These Powers have successfully been reset."
|
||||||
|
COM_COMPONENTBUILDER_THESE_REPOSITORIES_HAVE_SUCCESSFULLY_BEEN_PUSHED="These Repositories have successfully been pushed."
|
||||||
|
COM_COMPONENTBUILDER_THESE_REPOSITORIES_HAVE_SUCCESSFULLY_BEEN_RESET="These Repositories have successfully been reset."
|
||||||
COM_COMPONENTBUILDER_THESE_SITE_VIEWS_HAVE_SUCCESSFULLY_BEEN_PUSHED="These Site Views have successfully been pushed."
|
COM_COMPONENTBUILDER_THESE_SITE_VIEWS_HAVE_SUCCESSFULLY_BEEN_PUSHED="These Site Views have successfully been pushed."
|
||||||
COM_COMPONENTBUILDER_THESE_SITE_VIEWS_HAVE_SUCCESSFULLY_BEEN_RESET="These Site Views have successfully been reset."
|
COM_COMPONENTBUILDER_THESE_SITE_VIEWS_HAVE_SUCCESSFULLY_BEEN_RESET="These Site Views have successfully been reset."
|
||||||
COM_COMPONENTBUILDER_THESE_SNIPPETS_HAVE_SUCCESSFULLY_BEEN_PUSHED="These Snippets have successfully been pushed."
|
COM_COMPONENTBUILDER_THESE_SNIPPETS_HAVE_SUCCESSFULLY_BEEN_PUSHED="These Snippets have successfully been pushed."
|
||||||
@ -9291,6 +9302,7 @@ COM_COMPONENTBUILDER_THE_PRIVATE_KEY_FILE_COULD_NOT_BE_LOADEDFOUND_FOR_BSB_SERVE
|
|||||||
COM_COMPONENTBUILDER_THE_PUSH_OF_THESE_JOOMLA_FIELD_TYPES_COULD_NOT_BE_COMPLETED="The push of these Joomla Field Types could not be completed."
|
COM_COMPONENTBUILDER_THE_PUSH_OF_THESE_JOOMLA_FIELD_TYPES_COULD_NOT_BE_COMPLETED="The push of these Joomla Field Types could not be completed."
|
||||||
COM_COMPONENTBUILDER_THE_PUSH_OF_THESE_JOOMLA_POWERS_COULD_NOT_BE_COMPLETED="The push of these Joomla Powers could not be completed."
|
COM_COMPONENTBUILDER_THE_PUSH_OF_THESE_JOOMLA_POWERS_COULD_NOT_BE_COMPLETED="The push of these Joomla Powers could not be completed."
|
||||||
COM_COMPONENTBUILDER_THE_PUSH_OF_THESE_POWERS_COULD_NOT_BE_COMPLETED="The push of these Powers could not be completed."
|
COM_COMPONENTBUILDER_THE_PUSH_OF_THESE_POWERS_COULD_NOT_BE_COMPLETED="The push of these Powers could not be completed."
|
||||||
|
COM_COMPONENTBUILDER_THE_PUSH_OF_THESE_REPOSITORIES_COULD_NOT_BE_COMPLETED="The push of these Repositories could not be completed."
|
||||||
COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_ADMIN_VIEWS_HAS_FAILED="The push of this Admin Views has failed."
|
COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_ADMIN_VIEWS_HAS_FAILED="The push of this Admin Views has failed."
|
||||||
COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_ADMIN_VIEWS_HAS_NOT_BEEN_SUCCESSFUL="The push of this Admin Views has not been successful."
|
COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_ADMIN_VIEWS_HAS_NOT_BEEN_SUCCESSFUL="The push of this Admin Views has not been successful."
|
||||||
COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_ADMIN_VIEW_HAS_FAILED="The push of this Admin View has failed."
|
COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_ADMIN_VIEW_HAS_FAILED="The push of this Admin View has failed."
|
||||||
@ -9356,6 +9368,9 @@ COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_PLACEHOLDER_HAS_NOT_BEEN_SUCCESSFUL="The p
|
|||||||
COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_POWERS_HAS_FAILED="The push of this Powers has failed."
|
COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_POWERS_HAS_FAILED="The push of this Powers has failed."
|
||||||
COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_POWER_COULD_NOT_BE_COMPLETED="The push of this power could not be completed."
|
COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_POWER_COULD_NOT_BE_COMPLETED="The push of this power could not be completed."
|
||||||
COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_POWER_HAS_FAILED="The push of this power has failed."
|
COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_POWER_HAS_FAILED="The push of this power has failed."
|
||||||
|
COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_REPOSITORIES_HAS_FAILED="The push of this Repositories has failed."
|
||||||
|
COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_REPOSITORY_COULD_NOT_BE_COMPLETED="The push of this Repository could not be completed."
|
||||||
|
COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_REPOSITORY_HAS_FAILED="The push of this Repository has failed."
|
||||||
COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_SITE_VIEWS_HAS_FAILED="The push of this Site Views has failed."
|
COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_SITE_VIEWS_HAS_FAILED="The push of this Site Views has failed."
|
||||||
COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_SITE_VIEWS_HAS_NOT_BEEN_SUCCESSFUL="The push of this Site Views has not been successful."
|
COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_SITE_VIEWS_HAS_NOT_BEEN_SUCCESSFUL="The push of this Site Views has not been successful."
|
||||||
COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_SITE_VIEW_HAS_FAILED="The push of this Site View has failed."
|
COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_SITE_VIEW_HAS_FAILED="The push of this Site View has failed."
|
||||||
@ -9370,6 +9385,8 @@ COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_TEMPLATE_HAS_FAILED="The push of this Temp
|
|||||||
COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_TEMPLATE_HAS_NOT_BEEN_SUCCESSFUL="The push of this Template has not been successful."
|
COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_TEMPLATE_HAS_NOT_BEEN_SUCCESSFUL="The push of this Template has not been successful."
|
||||||
COM_COMPONENTBUILDER_THE_README_IS_LOADING="The readme is loading"
|
COM_COMPONENTBUILDER_THE_README_IS_LOADING="The readme is loading"
|
||||||
COM_COMPONENTBUILDER_THE_REPLACE_PROCESS_HAD_AN_ERROR_WITH_TABLE="The replace process had an error with table"
|
COM_COMPONENTBUILDER_THE_REPLACE_PROCESS_HAD_AN_ERROR_WITH_TABLE="The replace process had an error with table"
|
||||||
|
COM_COMPONENTBUILDER_THE_REPOSITORY_HAS_SUCCESSFULLY_BEEN_PUSHED="The Repository has successfully been pushed."
|
||||||
|
COM_COMPONENTBUILDER_THE_REPOSITORY_HAS_SUCCESSFULLY_BEEN_RESET="The Repository has successfully been reset."
|
||||||
COM_COMPONENTBUILDER_THE_REPO_INDEX_FAILED_TO_LOAD_PLEASE_TRY_AGAIN="The repo index failed to load, please try again."
|
COM_COMPONENTBUILDER_THE_REPO_INDEX_FAILED_TO_LOAD_PLEASE_TRY_AGAIN="The repo index failed to load, please try again."
|
||||||
COM_COMPONENTBUILDER_THE_RESET_OF_THESE_ADMIN_VIEWS_HAS_FAILED="The reset of these Admin Views has failed."
|
COM_COMPONENTBUILDER_THE_RESET_OF_THESE_ADMIN_VIEWS_HAS_FAILED="The reset of these Admin Views has failed."
|
||||||
COM_COMPONENTBUILDER_THE_RESET_OF_THESE_CLASS_EXTENDINGS_HAS_FAILED="The reset of these Class Extendings has failed."
|
COM_COMPONENTBUILDER_THE_RESET_OF_THESE_CLASS_EXTENDINGS_HAS_FAILED="The reset of these Class Extendings has failed."
|
||||||
@ -9388,6 +9405,7 @@ COM_COMPONENTBUILDER_THE_RESET_OF_THESE_LAYOUTS_HAS_FAILED="The reset of these L
|
|||||||
COM_COMPONENTBUILDER_THE_RESET_OF_THESE_LIBRARIES_HAS_FAILED="The reset of these Libraries has failed."
|
COM_COMPONENTBUILDER_THE_RESET_OF_THESE_LIBRARIES_HAS_FAILED="The reset of these Libraries has failed."
|
||||||
COM_COMPONENTBUILDER_THE_RESET_OF_THESE_PLACEHOLDERS_HAS_FAILED="The reset of these Placeholders has failed."
|
COM_COMPONENTBUILDER_THE_RESET_OF_THESE_PLACEHOLDERS_HAS_FAILED="The reset of these Placeholders has failed."
|
||||||
COM_COMPONENTBUILDER_THE_RESET_OF_THESE_POWERS_HAS_FAILED="The reset of these Powers has failed."
|
COM_COMPONENTBUILDER_THE_RESET_OF_THESE_POWERS_HAS_FAILED="The reset of these Powers has failed."
|
||||||
|
COM_COMPONENTBUILDER_THE_RESET_OF_THESE_REPOSITORIES_HAS_FAILED="The reset of these Repositories has failed."
|
||||||
COM_COMPONENTBUILDER_THE_RESET_OF_THESE_SITE_VIEWS_HAS_FAILED="The reset of these Site Views has failed."
|
COM_COMPONENTBUILDER_THE_RESET_OF_THESE_SITE_VIEWS_HAS_FAILED="The reset of these Site Views has failed."
|
||||||
COM_COMPONENTBUILDER_THE_RESET_OF_THESE_SNIPPETS_HAS_FAILED="The reset of these Snippets has failed."
|
COM_COMPONENTBUILDER_THE_RESET_OF_THESE_SNIPPETS_HAS_FAILED="The reset of these Snippets has failed."
|
||||||
COM_COMPONENTBUILDER_THE_RESET_OF_THESE_TEMPLATES_HAS_FAILED="The reset of these Templates has failed."
|
COM_COMPONENTBUILDER_THE_RESET_OF_THESE_TEMPLATES_HAS_FAILED="The reset of these Templates has failed."
|
||||||
@ -9436,6 +9454,7 @@ COM_COMPONENTBUILDER_THE_RESET_OF_THIS_PLACEHOLDERS_HAS_NOT_BEEN_SUCCESSFUL="The
|
|||||||
COM_COMPONENTBUILDER_THE_RESET_OF_THIS_PLACEHOLDER_HAS_FAILED="The reset of this Placeholder has failed."
|
COM_COMPONENTBUILDER_THE_RESET_OF_THIS_PLACEHOLDER_HAS_FAILED="The reset of this Placeholder has failed."
|
||||||
COM_COMPONENTBUILDER_THE_RESET_OF_THIS_PLACEHOLDER_HAS_NOT_BEEN_SUCCESSFUL="The Reset of this Placeholder has not been successful."
|
COM_COMPONENTBUILDER_THE_RESET_OF_THIS_PLACEHOLDER_HAS_NOT_BEEN_SUCCESSFUL="The Reset of this Placeholder has not been successful."
|
||||||
COM_COMPONENTBUILDER_THE_RESET_OF_THIS_POWER_HAS_FAILED="The reset of this power has failed."
|
COM_COMPONENTBUILDER_THE_RESET_OF_THIS_POWER_HAS_FAILED="The reset of this power has failed."
|
||||||
|
COM_COMPONENTBUILDER_THE_RESET_OF_THIS_REPOSITORY_HAS_FAILED="The reset of this Repository has failed."
|
||||||
COM_COMPONENTBUILDER_THE_RESET_OF_THIS_SITE_VIEWS_HAS_NOT_BEEN_SUCCESSFUL="The reset of this Site Views has not been successful."
|
COM_COMPONENTBUILDER_THE_RESET_OF_THIS_SITE_VIEWS_HAS_NOT_BEEN_SUCCESSFUL="The reset of this Site Views has not been successful."
|
||||||
COM_COMPONENTBUILDER_THE_RESET_OF_THIS_SITE_VIEW_HAS_FAILED="The reset of this Site View has failed."
|
COM_COMPONENTBUILDER_THE_RESET_OF_THIS_SITE_VIEW_HAS_FAILED="The reset of this Site View has failed."
|
||||||
COM_COMPONENTBUILDER_THE_RESET_OF_THIS_SITE_VIEW_HAS_NOT_BEEN_SUCCESSFUL="The Reset of this Site View has not been successful."
|
COM_COMPONENTBUILDER_THE_RESET_OF_THIS_SITE_VIEW_HAS_NOT_BEEN_SUCCESSFUL="The Reset of this Site View has not been successful."
|
||||||
@ -9693,6 +9712,7 @@ COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_INITIALIZE_LAYOUTS="You do no
|
|||||||
COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_INITIALIZE_LIBRARIES="You do not have permission to initialize Libraries"
|
COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_INITIALIZE_LIBRARIES="You do not have permission to initialize Libraries"
|
||||||
COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_INITIALIZE_PLACEHOLDERS="You do not have permission to initialize Placeholders"
|
COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_INITIALIZE_PLACEHOLDERS="You do not have permission to initialize Placeholders"
|
||||||
COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_INITIALIZE_POWERS="You do not have permission to initialize Powers"
|
COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_INITIALIZE_POWERS="You do not have permission to initialize Powers"
|
||||||
|
COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_INITIALIZE_REPOSITORIES="You do not have permission to initialize Repositories"
|
||||||
COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_INITIALIZE_SITE_VIEWS="You do not have permission to initialize Site Views"
|
COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_INITIALIZE_SITE_VIEWS="You do not have permission to initialize Site Views"
|
||||||
COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_INITIALIZE_SNIPPETS="You do not have permission to initialize Snippets"
|
COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_INITIALIZE_SNIPPETS="You do not have permission to initialize Snippets"
|
||||||
COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_INITIALIZE_TEMPLATES="You do not have permission to initialize Templates"
|
COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_INITIALIZE_TEMPLATES="You do not have permission to initialize Templates"
|
||||||
@ -9717,6 +9737,7 @@ COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_PUSH_THIS_LAYOUT="You do not
|
|||||||
COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_PUSH_THIS_LIBRARY="You do not have permission to push this Library"
|
COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_PUSH_THIS_LIBRARY="You do not have permission to push this Library"
|
||||||
COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_PUSH_THIS_PLACEHOLDER="You do not have permission to push this Placeholder"
|
COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_PUSH_THIS_PLACEHOLDER="You do not have permission to push this Placeholder"
|
||||||
COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_PUSH_THIS_POWER="You do not have permission to push this power"
|
COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_PUSH_THIS_POWER="You do not have permission to push this power"
|
||||||
|
COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_PUSH_THIS_REPOSITORY="You do not have permission to push this Repository"
|
||||||
COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_PUSH_THIS_SITE_VIEW="You do not have permission to push this Site View"
|
COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_PUSH_THIS_SITE_VIEW="You do not have permission to push this Site View"
|
||||||
COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_PUSH_THIS_SNIPPET="You do not have permission to push this Snippet"
|
COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_PUSH_THIS_SNIPPET="You do not have permission to push this Snippet"
|
||||||
COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_PUSH_THIS_TEMPLATE="You do not have permission to push this Template"
|
COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_PUSH_THIS_TEMPLATE="You do not have permission to push this Template"
|
||||||
@ -9737,6 +9758,7 @@ COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_RESET_THIS_LAYOUT="You do not
|
|||||||
COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_RESET_THIS_LIBRARY="You do not have permission to reset this Library"
|
COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_RESET_THIS_LIBRARY="You do not have permission to reset this Library"
|
||||||
COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_RESET_THIS_PLACEHOLDER="You do not have permission to reset this Placeholder"
|
COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_RESET_THIS_PLACEHOLDER="You do not have permission to reset this Placeholder"
|
||||||
COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_RESET_THIS_POWER="You do not have permission to reset this power"
|
COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_RESET_THIS_POWER="You do not have permission to reset this power"
|
||||||
|
COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_RESET_THIS_REPOSITORY="You do not have permission to reset this Repository"
|
||||||
COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_RESET_THIS_SITE_VIEW="You do not have permission to reset this Site View"
|
COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_RESET_THIS_SITE_VIEW="You do not have permission to reset this Site View"
|
||||||
COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_RESET_THIS_SNIPPET="You do not have permission to reset this Snippet"
|
COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_RESET_THIS_SNIPPET="You do not have permission to reset this Snippet"
|
||||||
COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_RESET_THIS_TEMPLATE="You do not have permission to reset this Template"
|
COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_RESET_THIS_TEMPLATE="You do not have permission to reset this Template"
|
||||||
@ -9764,6 +9786,7 @@ COM_COMPONENTBUILDER_YOU_MUST_FIRST_SAVE_THE_LAYOUT_BEFORE_YOU_CAN_USE_THIS_FEAT
|
|||||||
COM_COMPONENTBUILDER_YOU_MUST_FIRST_SAVE_THE_LIBRARY_BEFORE_YOU_CAN_USE_THIS_FEATURE="You must first save the Library, before you can use this feature."
|
COM_COMPONENTBUILDER_YOU_MUST_FIRST_SAVE_THE_LIBRARY_BEFORE_YOU_CAN_USE_THIS_FEATURE="You must first save the Library, before you can use this feature."
|
||||||
COM_COMPONENTBUILDER_YOU_MUST_FIRST_SAVE_THE_PLACEHOLDER_BEFORE_YOU_CAN_USE_THIS_FEATURE="You must first save the Placeholder, before you can use this feature."
|
COM_COMPONENTBUILDER_YOU_MUST_FIRST_SAVE_THE_PLACEHOLDER_BEFORE_YOU_CAN_USE_THIS_FEATURE="You must first save the Placeholder, before you can use this feature."
|
||||||
COM_COMPONENTBUILDER_YOU_MUST_FIRST_SAVE_THE_POWER_BEFORE_YOU_CAN_USE_THIS_FEATURE="You must first save the power, before you can use this feature."
|
COM_COMPONENTBUILDER_YOU_MUST_FIRST_SAVE_THE_POWER_BEFORE_YOU_CAN_USE_THIS_FEATURE="You must first save the power, before you can use this feature."
|
||||||
|
COM_COMPONENTBUILDER_YOU_MUST_FIRST_SAVE_THE_REPOSITORY_BEFORE_YOU_CAN_USE_THIS_FEATURE="You must first save the Repository, before you can use this feature."
|
||||||
COM_COMPONENTBUILDER_YOU_MUST_FIRST_SAVE_THE_SITE_VIEW_BEFORE_YOU_CAN_USE_THIS_FEATURE="You must first save the Site View, before you can use this feature."
|
COM_COMPONENTBUILDER_YOU_MUST_FIRST_SAVE_THE_SITE_VIEW_BEFORE_YOU_CAN_USE_THIS_FEATURE="You must first save the Site View, before you can use this feature."
|
||||||
COM_COMPONENTBUILDER_YOU_MUST_FIRST_SAVE_THE_SNIPPET_BEFORE_YOU_CAN_USE_THIS_FEATURE="You must first save the Snippet, before you can use this feature."
|
COM_COMPONENTBUILDER_YOU_MUST_FIRST_SAVE_THE_SNIPPET_BEFORE_YOU_CAN_USE_THIS_FEATURE="You must first save the Snippet, before you can use this feature."
|
||||||
COM_COMPONENTBUILDER_YOU_MUST_FIRST_SAVE_THE_TEMPLATE_BEFORE_YOU_CAN_USE_THIS_FEATURE="You must first save the Template, before you can use this feature."
|
COM_COMPONENTBUILDER_YOU_MUST_FIRST_SAVE_THE_TEMPLATE_BEFORE_YOU_CAN_USE_THIS_FEATURE="You must first save the Template, before you can use this feature."
|
||||||
|
@ -1072,6 +1072,12 @@ COM_COMPONENTBUILDER_REPOSITORIES_EDIT_VERSION="Repositories Edit Version"
|
|||||||
COM_COMPONENTBUILDER_REPOSITORIES_EDIT_VERSION_DESC="Allows the users in this group to edit versions of version repositories"
|
COM_COMPONENTBUILDER_REPOSITORIES_EDIT_VERSION_DESC="Allows the users in this group to edit versions of version repositories"
|
||||||
COM_COMPONENTBUILDER_REPOSITORIES_SUBMENU="Repositories Submenu"
|
COM_COMPONENTBUILDER_REPOSITORIES_SUBMENU="Repositories Submenu"
|
||||||
COM_COMPONENTBUILDER_REPOSITORIES_SUBMENU_DESC="Allows the users in this group to submenu of repository"
|
COM_COMPONENTBUILDER_REPOSITORIES_SUBMENU_DESC="Allows the users in this group to submenu of repository"
|
||||||
|
COM_COMPONENTBUILDER_REPOSITORY_INIT_BUTTON_ACCESS="Repository Init Button Access"
|
||||||
|
COM_COMPONENTBUILDER_REPOSITORY_INIT_BUTTON_ACCESS_DESC="Allows the users in this group to access the init button."
|
||||||
|
COM_COMPONENTBUILDER_REPOSITORY_PUSH_BUTTON_ACCESS="Repository Push Button Access"
|
||||||
|
COM_COMPONENTBUILDER_REPOSITORY_PUSH_BUTTON_ACCESS_DESC="Allows the users in this group to access the push button."
|
||||||
|
COM_COMPONENTBUILDER_REPOSITORY_RESET_BUTTON_ACCESS="Repository Reset Button Access"
|
||||||
|
COM_COMPONENTBUILDER_REPOSITORY_RESET_BUTTON_ACCESS_DESC="Allows the users in this group to access the reset button."
|
||||||
COM_COMPONENTBUILDER_SEARCH_ACCESS="Search Access"
|
COM_COMPONENTBUILDER_SEARCH_ACCESS="Search Access"
|
||||||
COM_COMPONENTBUILDER_SEARCH_ACCESS_DESC="Allows the users in this group to access search."
|
COM_COMPONENTBUILDER_SEARCH_ACCESS_DESC="Allows the users in this group to access search."
|
||||||
COM_COMPONENTBUILDER_SEARCH_COMPILER_BUTTON_ACCESS="Search Compiler Button Access"
|
COM_COMPONENTBUILDER_SEARCH_COMPILER_BUTTON_ACCESS="Search Compiler Button Access"
|
||||||
|
@ -22,9 +22,16 @@ defined('JPATH_BASE') or die;
|
|||||||
|
|
||||||
$base = $displayData['repo']->base ?? null;
|
$base = $displayData['repo']->base ?? null;
|
||||||
$path = $displayData['repo']->path ?? null;
|
$path = $displayData['repo']->path ?? null;
|
||||||
|
$type = $displayData['repo']->type ?? 0;
|
||||||
$url = "#";
|
$url = "#";
|
||||||
if (!empty($base) && !empty($path))
|
if (!empty($base) && !empty($path))
|
||||||
{
|
{
|
||||||
|
// if the type is GitHub = 2
|
||||||
|
if ($type == 2)
|
||||||
|
{
|
||||||
|
$base = 'https://github.com';
|
||||||
|
}
|
||||||
|
|
||||||
$url = "{$base}/{$path}";
|
$url = "{$base}/{$path}";
|
||||||
}
|
}
|
||||||
$name = $displayData['name'] ?? 'error';
|
$name = $displayData['name'] ?? 'error';
|
||||||
|
@ -2824,7 +2824,7 @@ INSERT INTO `#__componentbuilder_field` (`id`, `add_css_view`, `add_css_views`,
|
|||||||
(3413, '', '', '', '', '', '', '', '', '', '', 'TEXT', '', '', '', 'Allowed Media Formats', 'NULL', '', 'dd2e1f4b-f5db-45e8-85fa-efd27bae7b6a', '\"<field\\n\\ttype=\\\"allowedmediaformats\\\"\\n\\tname=\\\"media_formats\\\"\\n\\tlabel=\\\"Allowed Media Formats\\\"\\n\\tclass=\\\"list_class\\\"\\n\\tlayout=\\\"joomla.form.field.list-fancy-select\\\"\\n\\tmultiple=\\\"true\\\"\\n\\tshowon=\\\"type:3\\\"\\n\\textends=\\\"list\\\"\\n\\ttype_php_1=\\\"__.o0=base64=Oo.__W0NVU1RPTUNPREU9Z2V0RmlsZUV4dGVuc2lvbnNPcHRpb25zK21lZGlhXQ==\\\"\\n\\/>\"', 1, '2020-09-08 00:08:13', '2024-09-15 22:56:57', 10, '', 1072, 'fd936809-37c1-4016-a4ee-a4d016343725', '', '', '', '', ''),
|
(3413, '', '', '', '', '', '', '', '', '', '', 'TEXT', '', '', '', 'Allowed Media Formats', 'NULL', '', 'dd2e1f4b-f5db-45e8-85fa-efd27bae7b6a', '\"<field\\n\\ttype=\\\"allowedmediaformats\\\"\\n\\tname=\\\"media_formats\\\"\\n\\tlabel=\\\"Allowed Media Formats\\\"\\n\\tclass=\\\"list_class\\\"\\n\\tlayout=\\\"joomla.form.field.list-fancy-select\\\"\\n\\tmultiple=\\\"true\\\"\\n\\tshowon=\\\"type:3\\\"\\n\\textends=\\\"list\\\"\\n\\ttype_php_1=\\\"__.o0=base64=Oo.__W0NVU1RPTUNPREU9Z2V0RmlsZUV4dGVuc2lvbnNPcHRpb25zK21lZGlhXQ==\\\"\\n\\/>\"', 1, '2020-09-08 00:08:13', '2024-09-15 22:56:57', 10, '', 1072, 'fd936809-37c1-4016-a4ee-a4d016343725', '', '', '', '', ''),
|
||||||
(3414, '', '', '', '', '', '', '', '', '', '', 'TEXT', '', '', '', 'Allowed File Formats', 'NULL', '', 'dd2e1f4b-f5db-45e8-85fa-efd27bae7b6a', '\"<field\\n\\ttype=\\\"allowedfileformats\\\"\\n\\tname=\\\"file_formats\\\"\\n\\tlabel=\\\"Allowed File Formats\\\"\\n\\tclass=\\\"list_class\\\"\\n\\tlayout=\\\"joomla.form.field.list-fancy-select\\\"\\n\\tmultiple=\\\"true\\\"\\n\\tshowon=\\\"type:4\\\"\\n\\textends=\\\"list\\\"\\n\\ttype_php_1=\\\"__.o0=base64=Oo.__W0NVU1RPTUNPREU9Z2V0RmlsZUV4dGVuc2lvbnNPcHRpb25zK2ZpbGVd\\\"\\n\\/>\"', 1, '2020-09-08 00:09:04', '2024-09-15 22:55:34', 8, '', 1072, 'ca8f38cb-f930-4976-a76b-c1d6cd18652d', '', '', '', '', ''),
|
(3414, '', '', '', '', '', '', '', '', '', '', 'TEXT', '', '', '', 'Allowed File Formats', 'NULL', '', 'dd2e1f4b-f5db-45e8-85fa-efd27bae7b6a', '\"<field\\n\\ttype=\\\"allowedfileformats\\\"\\n\\tname=\\\"file_formats\\\"\\n\\tlabel=\\\"Allowed File Formats\\\"\\n\\tclass=\\\"list_class\\\"\\n\\tlayout=\\\"joomla.form.field.list-fancy-select\\\"\\n\\tmultiple=\\\"true\\\"\\n\\tshowon=\\\"type:4\\\"\\n\\textends=\\\"list\\\"\\n\\ttype_php_1=\\\"__.o0=base64=Oo.__W0NVU1RPTUNPREU9Z2V0RmlsZUV4dGVuc2lvbnNPcHRpb25zK2ZpbGVd\\\"\\n\\/>\"', 1, '2020-09-08 00:09:04', '2024-09-15 22:55:34', 8, '', 1072, 'ca8f38cb-f930-4976-a76b-c1d6cd18652d', '', '', '', '', ''),
|
||||||
(3415, '', '', '', '', '', '', '', '', '', '', 'TEXT', '', '', '', 'More Details', 'NULL', 6, '7139f2c8-a70a-46a6-bbe3-4eefe54ca515', '\"<field\\n\\ttype=\\\"subform\\\"\\n\\tname=\\\"details\\\"\\n\\tlabel=\\\"More Details\\\"\\n\\tlayout=\\\"joomla.form.field.subform.repeatable-table\\\"\\n\\tmultiple=\\\"true\\\"\\n\\tbuttons=\\\"add,remove,move\\\"\\n\\tfields=\\\"fb3115a1-e579-401a-9b53-9469cd4739e4,976f7e2d-68e3-497e-b4d1-6326d5b95078,f40974bd-a946-4bc4-9be1-fedec2d09c24,c8cc2a22-f2e4-4dcc-9088-ed1d78416228,6c3a6983-d1bf-4e5e-9e99-deea00b0cefd,8a64b899-6cb9-4ba3-bed1-559675f8d20b\\\"\\n\\tdescription=\\\"Add some more details here.\\\"\\n\\ticon=\\\"list\\\"\\n\\tmax=\\\"10\\\"\\n\\tmin=\\\"0\\\"\\n\\tfilter=\\\"STRING\\\"\\n\\/>\"', 1, '2020-09-08 00:26:48', '2024-09-19 22:00:03', 11, '', 1073, 'd763ecd7-8d72-418e-8010-706c0785baab', 'W1tbZmllbGRdXV0gPSBTdXBlcl9fXzlkNzZiOGRjXzM4ODNfNDc1NV9iMTFjXzEzMWQxOWNhOGE1M19fX1Bvd2VyOjpfKCdEYXRhLlN1YmZvcm0nKS0+dGFibGUoJ2RldGFpbCcpLT5nZXQoJGl0ZW0tPmd1aWQgPz8gJycgLCdlbnRpdHknLCAnbW9yZScsIFsnZ3VpZCcsJ2VtYWlsJywnbW9iaWxlX3Bob25lJywnZGF0ZW9mYmlydGgnLCd3ZWJzaXRlJywnZW50aXR5X3R5cGUnXSk7', 'U3VwZXJfX185ZDc2YjhkY18zODgzXzQ3NTVfYjExY18xMzFkMTljYThhNTNfX19Qb3dlcjo6XygnRGF0YS5TdWJmb3JtJyktPnRhYmxlKCdkZXRhaWwnKS0+c2V0KFtbW2ZpZWxkXV1dID8/IFtdLCAnZ3VpZCcsICdlbnRpdHknLCAkZGF0YVsnZ3VpZCddID8/ICcnKTs=', '', '', ''),
|
(3415, '', '', '', '', '', '', '', '', '', '', 'TEXT', '', '', '', 'More Details', 'NULL', 6, '7139f2c8-a70a-46a6-bbe3-4eefe54ca515', '\"<field\\n\\ttype=\\\"subform\\\"\\n\\tname=\\\"details\\\"\\n\\tlabel=\\\"More Details\\\"\\n\\tlayout=\\\"joomla.form.field.subform.repeatable-table\\\"\\n\\tmultiple=\\\"true\\\"\\n\\tbuttons=\\\"add,remove,move\\\"\\n\\tfields=\\\"fb3115a1-e579-401a-9b53-9469cd4739e4,976f7e2d-68e3-497e-b4d1-6326d5b95078,f40974bd-a946-4bc4-9be1-fedec2d09c24,c8cc2a22-f2e4-4dcc-9088-ed1d78416228,6c3a6983-d1bf-4e5e-9e99-deea00b0cefd,8a64b899-6cb9-4ba3-bed1-559675f8d20b\\\"\\n\\tdescription=\\\"Add some more details here.\\\"\\n\\ticon=\\\"list\\\"\\n\\tmax=\\\"10\\\"\\n\\tmin=\\\"0\\\"\\n\\tfilter=\\\"STRING\\\"\\n\\/>\"', 1, '2020-09-08 00:26:48', '2024-09-19 22:00:03', 11, '', 1073, 'd763ecd7-8d72-418e-8010-706c0785baab', 'W1tbZmllbGRdXV0gPSBTdXBlcl9fXzlkNzZiOGRjXzM4ODNfNDc1NV9iMTFjXzEzMWQxOWNhOGE1M19fX1Bvd2VyOjpfKCdEYXRhLlN1YmZvcm0nKS0+dGFibGUoJ2RldGFpbCcpLT5nZXQoJGl0ZW0tPmd1aWQgPz8gJycgLCdlbnRpdHknLCAnbW9yZScsIFsnZ3VpZCcsJ2VtYWlsJywnbW9iaWxlX3Bob25lJywnZGF0ZW9mYmlydGgnLCd3ZWJzaXRlJywnZW50aXR5X3R5cGUnXSk7', 'U3VwZXJfX185ZDc2YjhkY18zODgzXzQ3NTVfYjExY18xMzFkMTljYThhNTNfX19Qb3dlcjo6XygnRGF0YS5TdWJmb3JtJyktPnRhYmxlKCdkZXRhaWwnKS0+c2V0KFtbW2ZpZWxkXV1dID8/IFtdLCAnZ3VpZCcsICdlbnRpdHknLCAkZGF0YVsnZ3VpZCddID8/ICcnKTs=', '', '', ''),
|
||||||
(3416, '', '', '', '', '', '', '', '', '', '', 'TEXT', '', '', '', 'Look Groups', 'NULL', '', 'e2f31181-fbb3-4c3a-859d-72b6b0cff308', '\"<field\\n\\ttype=\\\"usergrouplist\\\"\\n\\tname=\\\"look_groups\\\"\\n\\tlabel=\\\"Look Groups\\\"\\n\\tdescription=\\\"Select a look\\\"\\n\\trequired=\\\"true\\\"\\n\\tchecksuperusergroup=\\\"1\\\"\\n\\tmultiple=\\\"true\\\"\\n\\/>\"', 1, '2020-09-08 02:37:42', '2024-09-07 02:40:32', 3, '', 1074, '104f8410-a07e-4cf8-aad5-2b4db7c6864c', '', '', '', '', ''),
|
(3416, '', '', '', '', '', '', '', '', '', '', 'TEXT', '', '', '', 'Look Groups', 'NULL', '', 'e2f31181-fbb3-4c3a-859d-72b6b0cff308', '\"<field\\n\\ttype=\\\"usergrouplist\\\"\\n\\tname=\\\"look_groups\\\"\\n\\tlabel=\\\"Look Groups\\\"\\n\\tdescription=\\\"Select a user group\\\"\\n\\tlayout=\\\"joomla.form.field.list-fancy-select\\\"\\n\\trequired=\\\"true\\\"\\n\\tchecksuperusergroup=\\\"1\\\"\\n\\tmultiple=\\\"true\\\"\\n\\/>\"', 1, '2020-09-08 02:37:42', '2025-06-24 08:42:29', 4, '', 1074, '104f8410-a07e-4cf8-aad5-2b4db7c6864c', '', '', '', '', ''),
|
||||||
(3417, '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'Note VDM File Uploader', 'NOT NULL', '', 'f9ecacd0-8481-4157-8c71-d7aaefc2b7c3', '\"<field\\n\\ttype=\\\"note\\\"\\n\\tname=\\\"note_file_vdm_uploader\\\"\\n\\tdescription=\\\"<div id=\'file_vdm_uploader\' class=\'vdm-uikit-uploader uk-placeholder uk-text-center\'\\r\\n data-type-id=\'jform_file_type\'\\r\\n data-progressbar-id=\'file_vdm_progressbar\'\\r\\n data-display-id=\'file_vdm_display\'\\r\\n data-success-id=\'file_vdm_success\'\\r\\n data-error-id=\'file_vdm_error\'\\r\\n data-allowed-format-id=\'file_vdm_allowed_format\'\\r\\n data-file-type-id=\'file_vdm_file_type\'\\r\\n>\\r\\n <span uk-icon=\'icon: cloud-upload\'><\\/span>\\r\\n <span class=\'uk-text-middle\'>Attach <span id=\'file_vdm_file_type\'>file<\\/span> by dropping them here or<\\/span>\\r\\n <div uk-form-custom>\\r\\n <input type=\'file\' multiple>\\r\\n <span class=\'uk-link\'>selecting one<\\/span> <span id=\'file_vdm_allowed_format\'><\\/span>\\r\\n <\\/div>\\r\\n<\\/div>\\r\\n\\r\\n<progress id=\'file_vdm_progressbar\' class=\'uk-progress\' value=\'0\' max=\'100\' hidden><\\/progress>\\\"\\n\\tshowon=\\\"file_type!:\\\"\\n\\/>\"', 1, '2020-09-07 22:41:51', '2024-09-17 22:49:08', 9, '', 1075, '47a3db14-de87-4cc2-8724-17f437a77d93', '', '', '', '', ''),
|
(3417, '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'Note VDM File Uploader', 'NOT NULL', '', 'f9ecacd0-8481-4157-8c71-d7aaefc2b7c3', '\"<field\\n\\ttype=\\\"note\\\"\\n\\tname=\\\"note_file_vdm_uploader\\\"\\n\\tdescription=\\\"<div id=\'file_vdm_uploader\' class=\'vdm-uikit-uploader uk-placeholder uk-text-center\'\\r\\n data-type-id=\'jform_file_type\'\\r\\n data-progressbar-id=\'file_vdm_progressbar\'\\r\\n data-display-id=\'file_vdm_display\'\\r\\n data-success-id=\'file_vdm_success\'\\r\\n data-error-id=\'file_vdm_error\'\\r\\n data-allowed-format-id=\'file_vdm_allowed_format\'\\r\\n data-file-type-id=\'file_vdm_file_type\'\\r\\n>\\r\\n <span uk-icon=\'icon: cloud-upload\'><\\/span>\\r\\n <span class=\'uk-text-middle\'>Attach <span id=\'file_vdm_file_type\'>file<\\/span> by dropping them here or<\\/span>\\r\\n <div uk-form-custom>\\r\\n <input type=\'file\' multiple>\\r\\n <span class=\'uk-link\'>selecting one<\\/span> <span id=\'file_vdm_allowed_format\'><\\/span>\\r\\n <\\/div>\\r\\n<\\/div>\\r\\n\\r\\n<progress id=\'file_vdm_progressbar\' class=\'uk-progress\' value=\'0\' max=\'100\' hidden><\\/progress>\\\"\\n\\tshowon=\\\"file_type!:\\\"\\n\\/>\"', 1, '2020-09-07 22:41:51', '2024-09-17 22:49:08', 9, '', 1075, '47a3db14-de87-4cc2-8724-17f437a77d93', '', '', '', '', ''),
|
||||||
(3418, '', '', '', '', '', '', '', '', 1, '', 'TINYINT', 2, '', '', 'Crop Image', 'NULL', '', 'b868ed59-4208-4206-8504-95a35a74a11c', '\"<field\\n\\ttype=\\\"radio\\\"\\n\\tname=\\\"crop\\\"\\n\\tlabel=\\\"Crop Image\\\"\\n\\tdescription=\\\"Set if images that are added should be cropped\\\"\\n\\tclass=\\\"btn-group btn-group-yesno\\\"\\n\\toption=\\\"1|Yes,0|No\\\"\\n\\tdefault=\\\"0\\\"\\n\\tshowon=\\\"type:1\\\"\\n\\/>\"', 1, '2020-09-07 23:53:41', '2024-09-16 23:47:41', 6, '', 1076, 'a778cf30-3fa9-4099-8a3a-0479f734069f', '', '', '', '', ''),
|
(3418, '', '', '', '', '', '', '', '', 1, '', 'TINYINT', 2, '', '', 'Crop Image', 'NULL', '', 'b868ed59-4208-4206-8504-95a35a74a11c', '\"<field\\n\\ttype=\\\"radio\\\"\\n\\tname=\\\"crop\\\"\\n\\tlabel=\\\"Crop Image\\\"\\n\\tdescription=\\\"Set if images that are added should be cropped\\\"\\n\\tclass=\\\"btn-group btn-group-yesno\\\"\\n\\toption=\\\"1|Yes,0|No\\\"\\n\\tdefault=\\\"0\\\"\\n\\tshowon=\\\"type:1\\\"\\n\\/>\"', 1, '2020-09-07 23:53:41', '2024-09-16 23:47:41', 6, '', 1076, 'a778cf30-3fa9-4099-8a3a-0479f734069f', '', '', '', '', ''),
|
||||||
(3419, '', '', '', '', '', '', '', '', '', '', 'TEXT', '', '', '', 'Crop Details', 'NULL', '', '7139f2c8-a70a-46a6-bbe3-4eefe54ca515', '\"<field\\n\\ttype=\\\"subform\\\"\\n\\tname=\\\"crop\\\"\\n\\tlabel=\\\"Crop Details\\\"\\n\\tlayout=\\\"joomla.form.field.subform.repeatable-table\\\"\\n\\tmultiple=\\\"true\\\"\\n\\tbuttons=\\\"add,remove\\\"\\n\\tfields=\\\"5d3d34dd-4876-4c6a-86ab-b4e162f22c08,ab0d3b92-bd90-4957-ab71-cbc7a5fabeb3,1616608c-5307-4496-89e2-36a326a84716\\\"\\n\\tdescription=\\\"Set the crop details for the image here\\\"\\n\\ticon=\\\"list\\\"\\n\\tmax=\\\"10\\\"\\n\\tmin=\\\"0\\\"\\n\\tfilter=\\\"STRING\\\"\\n\\tshowon=\\\"type:1\\\"\\n\\/>\"', 1, '2020-09-07 23:57:52', '2024-09-16 23:49:27', 12, '', 1077, '6f327030-dcdf-4d80-b3d9-293d4bbe39f7', '', '', '', '', ''),
|
(3419, '', '', '', '', '', '', '', '', '', '', 'TEXT', '', '', '', 'Crop Details', 'NULL', '', '7139f2c8-a70a-46a6-bbe3-4eefe54ca515', '\"<field\\n\\ttype=\\\"subform\\\"\\n\\tname=\\\"crop\\\"\\n\\tlabel=\\\"Crop Details\\\"\\n\\tlayout=\\\"joomla.form.field.subform.repeatable-table\\\"\\n\\tmultiple=\\\"true\\\"\\n\\tbuttons=\\\"add,remove\\\"\\n\\tfields=\\\"5d3d34dd-4876-4c6a-86ab-b4e162f22c08,ab0d3b92-bd90-4957-ab71-cbc7a5fabeb3,1616608c-5307-4496-89e2-36a326a84716\\\"\\n\\tdescription=\\\"Set the crop details for the image here\\\"\\n\\ticon=\\\"list\\\"\\n\\tmax=\\\"10\\\"\\n\\tmin=\\\"0\\\"\\n\\tfilter=\\\"STRING\\\"\\n\\tshowon=\\\"type:1\\\"\\n\\/>\"', 1, '2020-09-07 23:57:52', '2024-09-16 23:49:27', 12, '', 1077, '6f327030-dcdf-4d80-b3d9-293d4bbe39f7', '', '', '', '', ''),
|
||||||
@ -3022,8 +3022,12 @@ INSERT INTO `#__componentbuilder_repository` (`id`, `system_name`, `organisation
|
|||||||
(17, 'Openai (codeberg - mirror)', 'joomla', 'openai', 1, 1, 'https://codeberg.org', 'c625381a-7795-4b9f-8b4e-997c9291e3fc', 'master', 1, 17, 1, '2025-06-17 21:47:49', '2024-06-10 11:03:19', '', '{}'),
|
(17, 'Openai (codeberg - mirror)', 'joomla', 'openai', 1, 1, 'https://codeberg.org', 'c625381a-7795-4b9f-8b4e-997c9291e3fc', 'master', 1, 17, 1, '2025-06-17 21:47:49', '2024-06-10 11:03:19', '', '{}'),
|
||||||
(18, 'Joomla Powers (codeberg - mirror)', 'joomla', 'joomla-powers', 2, 1, 'https://codeberg.org', '8ac595d4-0b1d-4877-ba3e-2b815c1c7e3c', 'master', 1, 18, 1, '2025-06-17 21:47:22', '2024-07-08 14:07:31', '', '{}'),
|
(18, 'Joomla Powers (codeberg - mirror)', 'joomla', 'joomla-powers', 2, 1, 'https://codeberg.org', '8ac595d4-0b1d-4877-ba3e-2b815c1c7e3c', 'master', 1, 18, 1, '2025-06-17 21:47:22', '2024-07-08 14:07:31', '', '{}'),
|
||||||
(19, 'Joomla Field Types (codeberg - mirror)', 'joomla', 'joomla-fieldtypes', 3, 1, 'https://codeberg.org', 'bf4a1d77-e3a4-4aa8-a07f-2b01872bf7e9', 'master', 1, 19, 1, '2025-06-17 21:48:25', '2024-08-23 16:21:35', '', '{}'),
|
(19, 'Joomla Field Types (codeberg - mirror)', 'joomla', 'joomla-fieldtypes', 3, 1, 'https://codeberg.org', 'bf4a1d77-e3a4-4aa8-a07f-2b01872bf7e9', 'master', 1, 19, 1, '2025-06-17 21:48:25', '2024-08-23 16:21:35', '', '{}'),
|
||||||
(20, 'Official Packages (github - mirror)', 'joomengine', 'packages', 4, 2, 'https://api.github.com', '562624ab-48bf-4979-9a14-6b10cf3635de', 'master', 1, 20, 1, '2025-06-23 16:46:09', '2025-05-31 08:47:01', '', '{}'),
|
(20, 'Packages (github - mirror)', 'joomengine', 'packages', 4, 2, 'https://api.github.com', '562624ab-48bf-4979-9a14-6b10cf3635de', 'master', 1, 20, 1, '2025-06-24 19:43:43', '2025-05-31 08:47:01', '', '{}'),
|
||||||
(21, 'Official Packages (github - mirror)', 'joomengine', 'snippets', 5, 2, 'https://api.github.com', '70e85588-bc28-4459-9b29-858f68faae8f', 'master', 1, 21, 1, '2025-06-23 16:46:13', '2025-06-18 10:35:14', '', '{}');
|
(21, 'Snippets (github - mirror)', 'joomengine', 'snippets', 5, 2, 'https://api.github.com', '70e85588-bc28-4459-9b29-858f68faae8f', 'master', 1, 21, 1, '2025-06-24 15:11:19', '2025-06-18 10:35:14', '', '{}'),
|
||||||
|
(22, 'Repositories (github - mirror)', 'joomengine', 'repoindex', 6, 2, 'https://api.github.com', '8f156882-f299-4be2-ad13-fdb2c40bb207', 'master', 1, 22, 1, '2025-06-25 09:26:32', '2025-06-18 18:43:05', '', '{}'),
|
||||||
|
(23, 'Packages (codeberg - mirror)', 'joomla', 'packages', 4, 1, 'https://codeberg.org', '11298fc6-11a4-4075-bdcb-622ef4f3054d', 'master', 1, 21, 1, '2025-06-24 19:09:18', '2025-06-18 18:43:47', '', '{}'),
|
||||||
|
(24, 'Snippets (codeberg - mirror)', 'joomla', 'snippets', 5, 1, 'https://codeberg.org', '70a9b44b-0802-4b94-9132-e5f360d0215e', 'master', 1, 22, 1, '2025-06-24 19:09:14', '2025-06-24 15:10:05', '', '{}'),
|
||||||
|
(25, 'Repositories (codeberg - mirror)', 'joomla', 'repoindex', 6, 1, 'https://codeberg.org', 'a8701724-b77c-4e5a-9efc-61701341e8e5', 'master', 1, 21, 1, '2025-06-24 19:09:09', '2025-06-24 15:10:09', '', '{}');
|
||||||
|
|
||||||
--
|
--
|
||||||
-- Dumping data for table `#__componentbuilder_help_document`
|
-- Dumping data for table `#__componentbuilder_help_document`
|
||||||
|
@ -17,6 +17,7 @@ use Joomla\Utilities\ArrayHelper;
|
|||||||
use Joomla\CMS\Router\Route;
|
use Joomla\CMS\Router\Route;
|
||||||
use Joomla\CMS\Session\Session;
|
use Joomla\CMS\Session\Session;
|
||||||
use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper;
|
use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper;
|
||||||
|
use VDM\Joomla\Componentbuilder\Repository\Factory as RepositoryFactory;
|
||||||
|
|
||||||
// No direct access to this file
|
// No direct access to this file
|
||||||
\defined('_JEXEC') or die;
|
\defined('_JEXEC') or die;
|
||||||
@ -51,4 +52,246 @@ class RepositoriesController extends AdminController
|
|||||||
{
|
{
|
||||||
return parent::getModel($name, $prefix, $config);
|
return parent::getModel($name, $prefix, $config);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Redirect the request to the Initialization selection page.
|
||||||
|
*
|
||||||
|
* @return bool True on successful initialization, false on failure.
|
||||||
|
* @since 5.1.1
|
||||||
|
*/
|
||||||
|
public function initPowers()
|
||||||
|
{
|
||||||
|
// Check for request forgeries
|
||||||
|
Session::checkToken() or die(Text::_('JINVALID_TOKEN'));
|
||||||
|
|
||||||
|
// check if user has the right
|
||||||
|
$user = $this->app->getIdentity();
|
||||||
|
|
||||||
|
// set default error message
|
||||||
|
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PERMISSION_DENIED') . '</h1>';
|
||||||
|
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_INITIALIZE_REPOSITORIES') . '</p>';
|
||||||
|
$status = 'error';
|
||||||
|
$success = false;
|
||||||
|
|
||||||
|
if($user->authorise('repository.init', 'com_componentbuilder'))
|
||||||
|
{
|
||||||
|
// set success message
|
||||||
|
$message = null;
|
||||||
|
|
||||||
|
$status = null;
|
||||||
|
$success = true;
|
||||||
|
|
||||||
|
// set redirect
|
||||||
|
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=initialization_selection&power=Repository&target=Repositories', false);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// set redirect
|
||||||
|
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=repositories', false);
|
||||||
|
}
|
||||||
|
$this->setRedirect($redirect_url, $message, $status);
|
||||||
|
|
||||||
|
return $success;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Resets the selected Repositories.
|
||||||
|
*
|
||||||
|
* This function performs several checks and operations:
|
||||||
|
* 1. It verifies the authenticity of the request to prevent request forgery.
|
||||||
|
* 2. It retrieves the IDs of the selected powers from the user input.
|
||||||
|
* 3. It sanitizes the input by converting the IDs to integers.
|
||||||
|
* 4. It checks whether any powers have been selected.
|
||||||
|
* 5. It checks whether the current user has the necessary permissions to reset the selected Repositories.
|
||||||
|
* 6. If the user is authorized and powers are selected, it attempts to reset the selected Repositories.
|
||||||
|
* 7. Depending on the result of the reset operation, it sets the appropriate success or error message.
|
||||||
|
* 8. It redirects the user to a specified URL with the result message and status.
|
||||||
|
*
|
||||||
|
* @return bool True on successful reset, false on failure.
|
||||||
|
* @since 5.1.1
|
||||||
|
*/
|
||||||
|
public function resetPowers()
|
||||||
|
{
|
||||||
|
// Check for request forgeries
|
||||||
|
Session::checkToken() or die(Text::_('JINVALID_TOKEN'));
|
||||||
|
|
||||||
|
// get IDS of the selected powers
|
||||||
|
$pks = $this->input->post->get('cid', [], 'array');
|
||||||
|
|
||||||
|
// Sanitize the input
|
||||||
|
ArrayHelper::toInteger($pks);
|
||||||
|
|
||||||
|
// check if there is any selections
|
||||||
|
if ($pks === [])
|
||||||
|
{
|
||||||
|
// set error message
|
||||||
|
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_NO_SELECTION_DETECTED') . '</h1>';
|
||||||
|
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_PLEASE_FIRST_MAKE_A_SELECTION_FROM_THE_LIST') . '</p>';
|
||||||
|
// set redirect
|
||||||
|
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=repositories', false);
|
||||||
|
$this->setRedirect($redirect_url, $message, 'error');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
$status = 'error';
|
||||||
|
$success = false;
|
||||||
|
|
||||||
|
// check if user has the right
|
||||||
|
$user = $this->app->getIdentity();
|
||||||
|
if($user->authorise('repository.reset', 'com_componentbuilder'))
|
||||||
|
{
|
||||||
|
// get the guid field of this entity
|
||||||
|
$key_field = RepositoryFactory::_('Repository.Remote.Get')->getGuidField();
|
||||||
|
$guids = RepositoryFactory::_('Load')->values([$key_field], ['repository'], ['id' => ['value' => $pks, 'operator' => 'IN']]);
|
||||||
|
|
||||||
|
try {
|
||||||
|
if (RepositoryFactory::_('Repository.Remote.Get')->reset($guids))
|
||||||
|
{
|
||||||
|
// set success message
|
||||||
|
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_SUCCESS') . '</h1>';
|
||||||
|
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THESE_REPOSITORIES_HAVE_SUCCESSFULLY_BEEN_RESET') . '</p>';
|
||||||
|
$status = 'success';
|
||||||
|
$success = true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_RESET_FAILED') . '</h1>';
|
||||||
|
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_RESET_OF_THESE_REPOSITORIES_HAS_FAILED') . '</p>';
|
||||||
|
}
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_RESET_FAILED') . '</h1>';
|
||||||
|
$message .= '<p>' . \htmlspecialchars($e->getMessage()) . '</p>';
|
||||||
|
}
|
||||||
|
|
||||||
|
// set redirect
|
||||||
|
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=repositories', false);
|
||||||
|
$this->setRedirect($redirect_url, $message, $status);
|
||||||
|
|
||||||
|
return $success;
|
||||||
|
}
|
||||||
|
|
||||||
|
// set redirect
|
||||||
|
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=repositories', false);
|
||||||
|
$this->setRedirect($redirect_url);
|
||||||
|
return $success;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Pushes the selected Repositories.
|
||||||
|
*
|
||||||
|
* This function performs several checks and operations:
|
||||||
|
* 1. It verifies the authenticity of the request to prevent request forgery.
|
||||||
|
* 2. It retrieves the IDs of the selected powers from the user input.
|
||||||
|
* 3. It sanitizes the input by converting the IDs to integers.
|
||||||
|
* 4. It checks whether any powers have been selected.
|
||||||
|
* 5. It checks whether the current user has the necessary permissions to push the selected Repositories.
|
||||||
|
* 6. If the user is authorized and powers are selected, it attempts to push the selected Repositories.
|
||||||
|
* 7. Depending on the result of the push operation, it sets the appropriate success or error message.
|
||||||
|
* 8. It redirects the user to a specified URL with the result message and status.
|
||||||
|
*
|
||||||
|
* @return bool True on successful push, false on failure.
|
||||||
|
* @since 5.1.1
|
||||||
|
*/
|
||||||
|
public function pushPowers()
|
||||||
|
{
|
||||||
|
// Check for request forgeries
|
||||||
|
Session::checkToken() or die(Text::_('JINVALID_TOKEN'));
|
||||||
|
|
||||||
|
// get IDS of the selected powers
|
||||||
|
$pks = $this->input->post->get('cid', [], 'array');
|
||||||
|
|
||||||
|
// Sanitize the input
|
||||||
|
ArrayHelper::toInteger($pks);
|
||||||
|
|
||||||
|
// check if there is any selections
|
||||||
|
if ($pks === [])
|
||||||
|
{
|
||||||
|
// set error message
|
||||||
|
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_NO_SELECTION_DETECTED') . '</h1>';
|
||||||
|
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_PLEASE_FIRST_MAKE_A_SELECTION_FROM_THE_LIST') . '</p>';
|
||||||
|
// set redirect
|
||||||
|
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=repositories', false);
|
||||||
|
$this->setRedirect($redirect_url, $message, 'error');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
$status = 'error';
|
||||||
|
$success = false;
|
||||||
|
$message_bus = ['warning', 'error'];
|
||||||
|
|
||||||
|
// check if user has the right
|
||||||
|
$user = $this->app->getIdentity();
|
||||||
|
if($user->authorise('repository.push', 'com_componentbuilder'))
|
||||||
|
{
|
||||||
|
// get the guid field of this entity
|
||||||
|
$key_field = RepositoryFactory::_('Repository.Remote.Set')->getGuidField();
|
||||||
|
$guids = RepositoryFactory::_('Load')->values([$key_field], ['repository'], ['id' => ['value' => $pks, 'operator' => 'IN']]);
|
||||||
|
|
||||||
|
try {
|
||||||
|
if (RepositoryFactory::_('Repository.Remote.Set')->items($guids))
|
||||||
|
{
|
||||||
|
// set success message
|
||||||
|
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_SUCCESS') . '</h1>';
|
||||||
|
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THESE_REPOSITORIES_HAVE_SUCCESSFULLY_BEEN_PUSHED') . '</p>';
|
||||||
|
$status = 'success';
|
||||||
|
$success = true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// Load any messages from the message bus
|
||||||
|
$message_bucket = [];
|
||||||
|
|
||||||
|
foreach ($message_bus as $message_key)
|
||||||
|
{
|
||||||
|
if (($messages = RepositoryFactory::_('Power.Message')->get($message_key, null)) !== null)
|
||||||
|
{
|
||||||
|
$message_bucket[$message_key] = $messages;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Initialize base values
|
||||||
|
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PUSH_FAILED') . '</h1>';
|
||||||
|
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_REPOSITORIES_HAS_FAILED') . '</p>';
|
||||||
|
$status = 'error';
|
||||||
|
|
||||||
|
// Handle both error and warning
|
||||||
|
if (isset($message_bucket['error'], $message_bucket['warning']))
|
||||||
|
{
|
||||||
|
$message .= '<p>' . implode('<br>', $message_bucket['error']) . '</p>';
|
||||||
|
|
||||||
|
foreach ($message_bucket['warning'] as $warning)
|
||||||
|
{
|
||||||
|
$this->app->enqueueMessage($warning, 'warning');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
elseif (isset($message_bucket['error']))
|
||||||
|
{
|
||||||
|
$message .= '<p>' . implode('<br>', $message_bucket['error']) . '</p>';
|
||||||
|
}
|
||||||
|
elseif (isset($message_bucket['warning']))
|
||||||
|
{
|
||||||
|
$status = 'warning';
|
||||||
|
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PUSH_WAS_UNSUCCESSFUL') . '</h1>';
|
||||||
|
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_PUSH_OF_THESE_REPOSITORIES_COULD_NOT_BE_COMPLETED') . '</p>';
|
||||||
|
$message .= '<p>' . implode('<br>', $message_bucket['warning']) . '</p>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PUSH_FAILED') . '</h1>';
|
||||||
|
$message .= '<p>' . \htmlspecialchars($e->getMessage()) . '</p>';
|
||||||
|
}
|
||||||
|
|
||||||
|
// set redirect
|
||||||
|
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=repositories', false);
|
||||||
|
$this->setRedirect($redirect_url, $message, $status);
|
||||||
|
|
||||||
|
return $success;
|
||||||
|
}
|
||||||
|
|
||||||
|
// set redirect
|
||||||
|
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=repositories', false);
|
||||||
|
$this->setRedirect($redirect_url);
|
||||||
|
return $success;
|
||||||
|
}
|
||||||
}
|
}
|
@ -24,6 +24,7 @@ use Joomla\CMS\Router\Route;
|
|||||||
use Joomla\CMS\Session\Session;
|
use Joomla\CMS\Session\Session;
|
||||||
use Joomla\CMS\Uri\Uri;
|
use Joomla\CMS\Uri\Uri;
|
||||||
use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper;
|
use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper;
|
||||||
|
use VDM\Joomla\Componentbuilder\Repository\Factory as RepositoryFactory;
|
||||||
|
|
||||||
// No direct access to this file
|
// No direct access to this file
|
||||||
\defined('_JEXEC') or die;
|
\defined('_JEXEC') or die;
|
||||||
@ -78,6 +79,202 @@ class RepositoryController extends FormController
|
|||||||
*/
|
*/
|
||||||
protected int $refid;
|
protected int $refid;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Resets the specified Repository.
|
||||||
|
*
|
||||||
|
* This function performs several checks and operations:
|
||||||
|
* 1. It verifies the authenticity of the request to prevent request forgery.
|
||||||
|
* 2. It retrieves the item data posted by the user.
|
||||||
|
* 3. It checks whether the current user has the necessary permissions to reset the Repository.
|
||||||
|
* 4. It validates the presence of the necessary item identifiers (ID and GUID).
|
||||||
|
* 5. If the user is authorized and the identifiers are valid, it attempts to reset the specified Repository.
|
||||||
|
* 6. Depending on the result of the reset operation, it sets the appropriate success or error message.
|
||||||
|
* 7. It redirects the user to a specified URL with the result message and status.
|
||||||
|
*
|
||||||
|
* @return bool True on successful reset, false on failure.
|
||||||
|
* @since 5.1.1
|
||||||
|
*/
|
||||||
|
public function resetPowers()
|
||||||
|
{
|
||||||
|
// Check for request forgeries
|
||||||
|
Session::checkToken() or die(Text::_('JINVALID_TOKEN'));
|
||||||
|
|
||||||
|
// get Item posted
|
||||||
|
$item = $this->input->post->get('jform', array(), 'array');
|
||||||
|
|
||||||
|
// check if user has the right
|
||||||
|
$user = $this->app->getIdentity();
|
||||||
|
|
||||||
|
// set default error message
|
||||||
|
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PERMISSION_DENIED') . '</h1>';
|
||||||
|
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_RESET_THIS_REPOSITORY') . '</p>';
|
||||||
|
$status = 'error';
|
||||||
|
$success = false;
|
||||||
|
|
||||||
|
// get the guid field of this entity
|
||||||
|
$key_field = RepositoryFactory::_('Repository.Remote.Get')->getGuidField();
|
||||||
|
|
||||||
|
// load the ID
|
||||||
|
$id = $item['id'] ?? null;
|
||||||
|
$guid = $item[$key_field] ?? null;
|
||||||
|
|
||||||
|
// check if there is any selections
|
||||||
|
if ($id === null || $guid === null)
|
||||||
|
{
|
||||||
|
// set error message
|
||||||
|
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_NOT_SAVED') . '</h1>';
|
||||||
|
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_YOU_MUST_FIRST_SAVE_THE_REPOSITORY_BEFORE_YOU_CAN_USE_THIS_FEATURE') . '</p>';
|
||||||
|
}
|
||||||
|
elseif($user->authorise('repository.reset', 'com_componentbuilder'))
|
||||||
|
{
|
||||||
|
try {
|
||||||
|
if (RepositoryFactory::_('Repository.Remote.Get')->reset([$guid]))
|
||||||
|
{
|
||||||
|
// set success message
|
||||||
|
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_SUCCESS') . '</h1>';
|
||||||
|
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_REPOSITORY_HAS_SUCCESSFULLY_BEEN_RESET') . '</p>';
|
||||||
|
$status = 'success';
|
||||||
|
$success = true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_RESET_FAILED') . '</h1>';
|
||||||
|
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_RESET_OF_THIS_REPOSITORY_HAS_FAILED') . '</p>';
|
||||||
|
}
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_RESET_FAILED') . '</h1>';
|
||||||
|
$message .= '<p>' . \htmlspecialchars($e->getMessage()) . '</p>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// set redirect
|
||||||
|
$redirect_url = Route::_(
|
||||||
|
'index.php?option=com_componentbuilder&view=repository'
|
||||||
|
. $this->getRedirectToItemAppend($id), false
|
||||||
|
);
|
||||||
|
|
||||||
|
$this->setRedirect($redirect_url, $message, $status);
|
||||||
|
|
||||||
|
return $success;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Pushes the specified Repository.
|
||||||
|
*
|
||||||
|
* This function performs several checks and operations:
|
||||||
|
* 1. It verifies the authenticity of the request to prevent request forgery.
|
||||||
|
* 2. It retrieves the item data posted by the user.
|
||||||
|
* 3. It checks whether the current user has the necessary permissions to push the Repository.
|
||||||
|
* 4. It validates the presence of the necessary item identifiers (ID and GUID).
|
||||||
|
* 5. If the user is authorized and the identifiers are valid, it attempts to push the specified Repository.
|
||||||
|
* 6. Depending on the result of the push operation, it sets the appropriate success or error message.
|
||||||
|
* 7. It redirects the user to a specified URL with the result message and status.
|
||||||
|
*
|
||||||
|
* @return bool True on successful push, false on failure.
|
||||||
|
* @since 5.1.1
|
||||||
|
*/
|
||||||
|
public function pushPowers()
|
||||||
|
{
|
||||||
|
// Check for request forgeries
|
||||||
|
Session::checkToken() or die(Text::_('JINVALID_TOKEN'));
|
||||||
|
|
||||||
|
// get Item posted
|
||||||
|
$item = $this->input->post->get('jform', array(), 'array');
|
||||||
|
|
||||||
|
// check if user has the right
|
||||||
|
$user = $this->app->getIdentity();
|
||||||
|
|
||||||
|
// set default error message
|
||||||
|
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PERMISSION_DENIED') . '</h1>';
|
||||||
|
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_PUSH_THIS_REPOSITORY') . '</p>';
|
||||||
|
$status = 'error';
|
||||||
|
$success = false;
|
||||||
|
|
||||||
|
// get the guid field of this entity
|
||||||
|
$key_field = RepositoryFactory::_('Repository.Remote.Set')->getGuidField();
|
||||||
|
|
||||||
|
// load the ID
|
||||||
|
$id = $item['id'] ?? null;
|
||||||
|
$guid = $item[$key_field] ?? null;
|
||||||
|
|
||||||
|
$message_bus = ['warning', 'error'];
|
||||||
|
|
||||||
|
// check if there is any selections
|
||||||
|
if ($id === null || $guid === null)
|
||||||
|
{
|
||||||
|
// set error message
|
||||||
|
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_NOT_SAVED') . '</h1>';
|
||||||
|
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_YOU_MUST_FIRST_SAVE_THE_REPOSITORY_BEFORE_YOU_CAN_USE_THIS_FEATURE') . '</p>';
|
||||||
|
}
|
||||||
|
elseif($user->authorise('repository.push', 'com_componentbuilder'))
|
||||||
|
{
|
||||||
|
try {
|
||||||
|
if (RepositoryFactory::_('Repository.Remote.Set')->items([$guid]))
|
||||||
|
{
|
||||||
|
// set success message
|
||||||
|
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_SUCCESS') . '</h1>';
|
||||||
|
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_REPOSITORY_HAS_SUCCESSFULLY_BEEN_PUSHED') . '</p>';
|
||||||
|
$status = 'success';
|
||||||
|
$success = true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// Load any messages from the message bus
|
||||||
|
$message_bucket = [];
|
||||||
|
|
||||||
|
foreach ($message_bus as $message_key)
|
||||||
|
{
|
||||||
|
if (($messages = RepositoryFactory::_('Power.Message')->get($message_key, null)) !== null)
|
||||||
|
{
|
||||||
|
$message_bucket[$message_key] = $messages;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Initialize base values
|
||||||
|
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PUSH_FAILED') . '</h1>';
|
||||||
|
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_REPOSITORY_HAS_FAILED') . '</p>';
|
||||||
|
$status = 'error';
|
||||||
|
|
||||||
|
// Handle both error and warning
|
||||||
|
if (isset($message_bucket['error'], $message_bucket['warning']))
|
||||||
|
{
|
||||||
|
$message .= '<p>' . implode('<br>', $message_bucket['error']) . '</p>';
|
||||||
|
|
||||||
|
foreach ($message_bucket['warning'] as $warning)
|
||||||
|
{
|
||||||
|
$this->app->enqueueMessage($warning, 'warning');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
elseif (isset($message_bucket['error']))
|
||||||
|
{
|
||||||
|
$message .= '<p>' . implode('<br>', $message_bucket['error']) . '</p>';
|
||||||
|
}
|
||||||
|
elseif (isset($message_bucket['warning']))
|
||||||
|
{
|
||||||
|
$status = 'warning';
|
||||||
|
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PUSH_WAS_UNSUCCESSFUL') . '</h1>';
|
||||||
|
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_REPOSITORY_COULD_NOT_BE_COMPLETED') . '</p>';
|
||||||
|
$message .= '<p>' . implode('<br>', $message_bucket['warning']) . '</p>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PUSH_FAILED') . '</h1>';
|
||||||
|
$message .= '<p>' . \htmlspecialchars($e->getMessage()) . '</p>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// set redirect
|
||||||
|
$redirect_url = Route::_(
|
||||||
|
'index.php?option=com_componentbuilder&view=repository'
|
||||||
|
. $this->getRedirectToItemAppend($id), false
|
||||||
|
);
|
||||||
|
|
||||||
|
$this->setRedirect($redirect_url, $message, $status);
|
||||||
|
|
||||||
|
return $success;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Method override to check if you can add a new record.
|
* Method override to check if you can add a new record.
|
||||||
*
|
*
|
||||||
|
@ -47,6 +47,7 @@ use VDM\Joomla\Componentbuilder\Fieldtype\Factory as FieldtypeFactory;
|
|||||||
use VDM\Joomla\Componentbuilder\JoomlaPower\Factory as JoomlaPowerFactory;
|
use VDM\Joomla\Componentbuilder\JoomlaPower\Factory as JoomlaPowerFactory;
|
||||||
use VDM\Joomla\Componentbuilder\Power\Factory as PowerFactory;
|
use VDM\Joomla\Componentbuilder\Power\Factory as PowerFactory;
|
||||||
use VDM\Joomla\Componentbuilder\Snippet\Factory as SnippetFactory;
|
use VDM\Joomla\Componentbuilder\Snippet\Factory as SnippetFactory;
|
||||||
|
use VDM\Joomla\Componentbuilder\Repository\Factory as RepositoryFactory;
|
||||||
use Joomla\CMS\Form\FormHelper as FormFormHelper;
|
use Joomla\CMS\Form\FormHelper as FormFormHelper;
|
||||||
|
|
||||||
// No direct access to this file
|
// No direct access to this file
|
||||||
@ -5341,7 +5342,8 @@ class AjaxModel extends ListModel
|
|||||||
'ClassExtends' => 'PackageFactory',
|
'ClassExtends' => 'PackageFactory',
|
||||||
'ClassProperty' => 'PackageFactory',
|
'ClassProperty' => 'PackageFactory',
|
||||||
'ClassMethod' => 'PackageFactory',
|
'ClassMethod' => 'PackageFactory',
|
||||||
'Placeholder' => 'PackageFactory'
|
'Placeholder' => 'PackageFactory',
|
||||||
|
'Repository' => 'RepositoryFactory'
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -5361,6 +5363,7 @@ class AjaxModel extends ListModel
|
|||||||
'FieldtypeFactory' => FieldtypeFactory::_($getClass),
|
'FieldtypeFactory' => FieldtypeFactory::_($getClass),
|
||||||
'SnippetFactory' => SnippetFactory::_($getClass),
|
'SnippetFactory' => SnippetFactory::_($getClass),
|
||||||
'PackageFactory' => PackageFactory::_($getClass),
|
'PackageFactory' => PackageFactory::_($getClass),
|
||||||
|
'RepositoryFactory' => RepositoryFactory::_($getClass),
|
||||||
default => null,
|
default => null,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -30,6 +30,7 @@ use VDM\Joomla\Componentbuilder\Fieldtype\Factory as FieldtypeFactory;
|
|||||||
use VDM\Joomla\Componentbuilder\JoomlaPower\Factory as JoomlaPowerFactory;
|
use VDM\Joomla\Componentbuilder\JoomlaPower\Factory as JoomlaPowerFactory;
|
||||||
use VDM\Joomla\Componentbuilder\Power\Factory as PowerFactory;
|
use VDM\Joomla\Componentbuilder\Power\Factory as PowerFactory;
|
||||||
use VDM\Joomla\Componentbuilder\Snippet\Factory as SnippetFactory;
|
use VDM\Joomla\Componentbuilder\Snippet\Factory as SnippetFactory;
|
||||||
|
use VDM\Joomla\Componentbuilder\Repository\Factory as RepositoryFactory;
|
||||||
|
|
||||||
// No direct access to this file
|
// No direct access to this file
|
||||||
\defined('_JEXEC') or die;
|
\defined('_JEXEC') or die;
|
||||||
@ -389,7 +390,8 @@ class Initialization_selectionModel extends ItemModel
|
|||||||
'ClassExtends' => 'PackageFactory',
|
'ClassExtends' => 'PackageFactory',
|
||||||
'ClassProperty' => 'PackageFactory',
|
'ClassProperty' => 'PackageFactory',
|
||||||
'ClassMethod' => 'PackageFactory',
|
'ClassMethod' => 'PackageFactory',
|
||||||
'Placeholder' => 'PackageFactory'
|
'Placeholder' => 'PackageFactory',
|
||||||
|
'Repository' => 'RepositoryFactory'
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -409,6 +411,7 @@ class Initialization_selectionModel extends ItemModel
|
|||||||
'FieldtypeFactory' => FieldtypeFactory::_($getClass),
|
'FieldtypeFactory' => FieldtypeFactory::_($getClass),
|
||||||
'SnippetFactory' => SnippetFactory::_($getClass),
|
'SnippetFactory' => SnippetFactory::_($getClass),
|
||||||
'PackageFactory' => PackageFactory::_($getClass),
|
'PackageFactory' => PackageFactory::_($getClass),
|
||||||
|
'RepositoryFactory' => RepositoryFactory::_($getClass),
|
||||||
default => null,
|
default => null,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -248,11 +248,12 @@ class RepositoriesModel extends ListModel
|
|||||||
{
|
{
|
||||||
$targetArray = array(
|
$targetArray = array(
|
||||||
0 => 'COM_COMPONENTBUILDER_REPOSITORY_SELECT_AN_OPTION',
|
0 => 'COM_COMPONENTBUILDER_REPOSITORY_SELECT_AN_OPTION',
|
||||||
4 => 'COM_COMPONENTBUILDER_REPOSITORY_JCB_PACKAGES',
|
4 => 'COM_COMPONENTBUILDER_REPOSITORY_PACKAGES',
|
||||||
3 => 'COM_COMPONENTBUILDER_REPOSITORY_JOOMLA_FIELD_TYPES',
|
3 => 'COM_COMPONENTBUILDER_REPOSITORY_FIELD_TYPES',
|
||||||
2 => 'COM_COMPONENTBUILDER_REPOSITORY_JOOMLA_POWER',
|
2 => 'COM_COMPONENTBUILDER_REPOSITORY_JOOMLA_POWER',
|
||||||
5 => 'COM_COMPONENTBUILDER_REPOSITORY_SNIPPETS',
|
5 => 'COM_COMPONENTBUILDER_REPOSITORY_SNIPPETS',
|
||||||
1 => 'COM_COMPONENTBUILDER_REPOSITORY_SUPER_POWER'
|
1 => 'COM_COMPONENTBUILDER_REPOSITORY_SUPER_POWER',
|
||||||
|
6 => 'COM_COMPONENTBUILDER_REPOSITORY_REPOSITORIES'
|
||||||
);
|
);
|
||||||
// Now check if value is found in this array
|
// Now check if value is found in this array
|
||||||
if (isset($targetArray[$value]) && StringHelper::check($targetArray[$value]))
|
if (isset($targetArray[$value]) && StringHelper::check($targetArray[$value]))
|
||||||
|
@ -218,6 +218,21 @@ class HtmlView extends BaseHtmlView
|
|||||||
ToolbarHelper::trash('repositories.trash');
|
ToolbarHelper::trash('repositories.trash');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if ($this->user->authorise('repository.init', 'com_componentbuilder'))
|
||||||
|
{
|
||||||
|
// add Init button.
|
||||||
|
ToolbarHelper::custom('repositories.initPowers', 'health custom-button-initpowers', '', 'COM_COMPONENTBUILDER_INIT', false);
|
||||||
|
}
|
||||||
|
if ($this->user->authorise('repository.reset', 'com_componentbuilder'))
|
||||||
|
{
|
||||||
|
// add Reset button.
|
||||||
|
ToolbarHelper::custom('repositories.resetPowers', 'joomla custom-button-resetpowers', '', 'COM_COMPONENTBUILDER_RESET', false);
|
||||||
|
}
|
||||||
|
if ($this->user->authorise('repository.push', 'com_componentbuilder'))
|
||||||
|
{
|
||||||
|
// add Push button.
|
||||||
|
ToolbarHelper::custom('repositories.pushPowers', 'share custom-button-pushpowers', '', 'COM_COMPONENTBUILDER_PUSH', false);
|
||||||
|
}
|
||||||
|
|
||||||
// set help url for this view if found
|
// set help url for this view if found
|
||||||
$this->help_url = ComponentbuilderHelper::getHelpUrl('repositories');
|
$this->help_url = ComponentbuilderHelper::getHelpUrl('repositories');
|
||||||
|
@ -281,6 +281,16 @@ class HtmlView extends BaseHtmlView
|
|||||||
{
|
{
|
||||||
ToolbarHelper::custom('repository.save2copy', 'save-copy.png', 'save-copy_f2.png', 'JTOOLBAR_SAVE_AS_COPY', false);
|
ToolbarHelper::custom('repository.save2copy', 'save-copy.png', 'save-copy_f2.png', 'JTOOLBAR_SAVE_AS_COPY', false);
|
||||||
}
|
}
|
||||||
|
if ($this->canDo->get('repository.reset'))
|
||||||
|
{
|
||||||
|
// add Reset button.
|
||||||
|
ToolbarHelper::custom('repository.resetPowers', 'joomla custom-button-resetpowers', '', 'COM_COMPONENTBUILDER_RESET', false);
|
||||||
|
}
|
||||||
|
if ($this->canDo->get('repository.push'))
|
||||||
|
{
|
||||||
|
// add Push button.
|
||||||
|
ToolbarHelper::custom('repository.pushPowers', 'share custom-button-pushpowers', '', 'COM_COMPONENTBUILDER_PUSH', false);
|
||||||
|
}
|
||||||
ToolbarHelper::cancel('repository.cancel', 'JTOOLBAR_CLOSE');
|
ToolbarHelper::cancel('repository.cancel', 'JTOOLBAR_CLOSE');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -354,6 +364,16 @@ class HtmlView extends BaseHtmlView
|
|||||||
ToolbarHelper::apply('repository.apply', 'JTOOLBAR_APPLY');
|
ToolbarHelper::apply('repository.apply', 'JTOOLBAR_APPLY');
|
||||||
ToolbarHelper::save('repository.save', 'JTOOLBAR_SAVE');
|
ToolbarHelper::save('repository.save', 'JTOOLBAR_SAVE');
|
||||||
}
|
}
|
||||||
|
if ($this->canDo->get('repository.reset'))
|
||||||
|
{
|
||||||
|
// add Reset button.
|
||||||
|
ToolbarHelper::custom('repository.resetPowers', 'joomla custom-button-resetpowers', '', 'COM_COMPONENTBUILDER_RESET', false);
|
||||||
|
}
|
||||||
|
if ($this->canDo->get('repository.push'))
|
||||||
|
{
|
||||||
|
// add Push button.
|
||||||
|
ToolbarHelper::custom('repository.pushPowers', 'share custom-button-pushpowers', '', 'COM_COMPONENTBUILDER_PUSH', false);
|
||||||
|
}
|
||||||
ToolbarHelper::cancel('repository.cancel', 'JTOOLBAR_CLOSE');
|
ToolbarHelper::cancel('repository.cancel', 'JTOOLBAR_CLOSE');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -36,7 +36,8 @@ $headers = [
|
|||||||
'ClassExtends' => 'COM_COMPONENTBUILDER_INITIALIZE_CLASS_EXTENDS',
|
'ClassExtends' => 'COM_COMPONENTBUILDER_INITIALIZE_CLASS_EXTENDS',
|
||||||
'ClassProperty' => 'COM_COMPONENTBUILDER_INITIALIZE_CLASS_PROPERTIES',
|
'ClassProperty' => 'COM_COMPONENTBUILDER_INITIALIZE_CLASS_PROPERTIES',
|
||||||
'ClassMethod' => 'COM_COMPONENTBUILDER_INITIALIZE_CLASS_METHODS',
|
'ClassMethod' => 'COM_COMPONENTBUILDER_INITIALIZE_CLASS_METHODS',
|
||||||
'Placeholder' => 'COM_COMPONENTBUILDER_INITIALIZE_PLACEHOLDERS'
|
'Placeholder' => 'COM_COMPONENTBUILDER_INITIALIZE_PLACEHOLDERS',
|
||||||
|
'Repository' => 'COM_COMPONENTBUILDER_INITIALIZE_REPOSITORIES'
|
||||||
];
|
];
|
||||||
|
|
||||||
// Fetch and translate header if area is defined and mapped
|
// Fetch and translate header if area is defined and mapped
|
||||||
|
@ -1,15 +1,15 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<extension type="component" version="5.0" method="upgrade">
|
<extension type="component" version="5.0" method="upgrade">
|
||||||
<name>COM_COMPONENTBUILDER</name>
|
<name>COM_COMPONENTBUILDER</name>
|
||||||
<creationDate>23rd June, 2025</creationDate>
|
<creationDate>25th June, 2025</creationDate>
|
||||||
<author>Llewellyn van der Merwe</author>
|
<author>Llewellyn van der Merwe</author>
|
||||||
<authorEmail>joomla@vdm.io</authorEmail>
|
<authorEmail>joomla@vdm.io</authorEmail>
|
||||||
<authorUrl>https://dev.vdm.io</authorUrl>
|
<authorUrl>https://dev.vdm.io</authorUrl>
|
||||||
<copyright>Copyright (C) 2015 Vast Development Method. All rights reserved.</copyright>
|
<copyright>Copyright (C) 2015 Vast Development Method. All rights reserved.</copyright>
|
||||||
<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
|
<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
|
||||||
<version>5.1.1-beta3</version>
|
<version>5.1.1-beta4</version>
|
||||||
<description>< is highly advanced tool that is truly able to build extremely complex components in a fraction of the time.
|
<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.
|
||||||
|
|
||||||
|
@ -134,7 +134,7 @@
|
|||||||
<version>5.1.1-beta</version>
|
<version>5.1.1-beta</version>
|
||||||
<infourl title="Component Builder!">https://dev.vdm.io</infourl>
|
<infourl title="Component Builder!">https://dev.vdm.io</infourl>
|
||||||
<downloads>
|
<downloads>
|
||||||
<downloadurl type="full" format="zip">https://github.com/vdm-io/pkg-component-builder/archive/refs/tags/v5.1.1-beta3.zip</downloadurl>
|
<downloadurl type="full" format="zip">https://github.com/vdm-io/pkg-component-builder/archive/refs/tags/v5.1.1-beta4.zip</downloadurl>
|
||||||
</downloads>
|
</downloads>
|
||||||
<tags>
|
<tags>
|
||||||
<tag>beta</tag>
|
<tag>beta</tag>
|
||||||
@ -149,10 +149,10 @@
|
|||||||
<element>pkg_component_builder</element>
|
<element>pkg_component_builder</element>
|
||||||
<type>package</type>
|
<type>package</type>
|
||||||
<client>site</client>
|
<client>site</client>
|
||||||
<version>5.1.1-beta3</version>
|
<version>5.1.1-beta4</version>
|
||||||
<infourl title="Component Builder!">https://dev.vdm.io</infourl>
|
<infourl title="Component Builder!">https://dev.vdm.io</infourl>
|
||||||
<downloads>
|
<downloads>
|
||||||
<downloadurl type="full" format="zip">https://github.com/vdm-io/pkg-component-builder/archive/refs/tags/v5.1.1-beta3.zip</downloadurl>
|
<downloadurl type="full" format="zip">https://github.com/vdm-io/pkg-component-builder/archive/refs/tags/v5.1.1-beta4.zip</downloadurl>
|
||||||
</downloads>
|
</downloads>
|
||||||
<tags>
|
<tags>
|
||||||
<tag>beta</tag>
|
<tag>beta</tag>
|
||||||
|
@ -423,10 +423,14 @@ abstract class Grep implements GrepInterface
|
|||||||
*/
|
*/
|
||||||
public function loadApi(Api $api, ?string $base, ?string $token): void
|
public function loadApi(Api $api, ?string $base, ?string $token): void
|
||||||
{
|
{
|
||||||
// Determine the token to use based on the base URL
|
// If we have global tokens for a base system we must not reset on an empty token
|
||||||
if ($base && strpos($base. '/', $this->api_base) !== false)
|
if ($base && (
|
||||||
|
strpos($base. '/', $this->api_base) !== false ||
|
||||||
|
strpos($base, 'api.github.com') !== false
|
||||||
|
))
|
||||||
{
|
{
|
||||||
// If base contains $this->api_base = https://git.vdm.dev/, use the token as is
|
// If base contains $this->api_base = https://git.vdm.dev/, use the token as is
|
||||||
|
// If base contains api.github.com, use the token as is
|
||||||
$tokenToUse = $token;
|
$tokenToUse = $token;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -861,7 +865,7 @@ abstract class Grep implements GrepInterface
|
|||||||
// load the base and token if set
|
// load the base and token if set
|
||||||
$this->loadApi(
|
$this->loadApi(
|
||||||
$this->contents,
|
$this->contents,
|
||||||
$target === 'gitea' ? ($path->base ?? null) : null,
|
$path->base ?? null,
|
||||||
$path->token ?? null
|
$path->token ?? null
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -321,7 +321,7 @@ abstract class Set extends Base implements SetInterface
|
|||||||
// load the base and token if set
|
// load the base and token if set
|
||||||
$this->grep->loadApi(
|
$this->grep->loadApi(
|
||||||
$this->git,
|
$this->git,
|
||||||
$target === 'gitea' ? ($repo->base ?? null) : null,
|
$repo->base ?? null,
|
||||||
$repo->token ?? null
|
$repo->token ?? null
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -544,7 +544,7 @@ abstract class Set extends Base implements SetInterface
|
|||||||
// load the base and token if set
|
// load the base and token if set
|
||||||
$this->grep->loadApi(
|
$this->grep->loadApi(
|
||||||
$this->git,
|
$this->git,
|
||||||
$target_system === 'gitea' ? ($repo->base ?? null) : null,
|
$repo->base ?? null,
|
||||||
$repo->token ?? null
|
$repo->token ?? null
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -187,10 +187,10 @@ final class FieldXML implements Fieldtypeinterface
|
|||||||
* @param string $taber The tabs to add in layout
|
* @param string $taber The tabs to add in layout
|
||||||
*
|
*
|
||||||
* @return \stdClass The field in xml object
|
* @return \stdClass The field in xml object
|
||||||
* @since 3.2.0
|
* @since 3.2.0
|
||||||
*/
|
*/
|
||||||
public function get(string $setType, array &$fieldAttributes, string &$name,
|
public function get(string $setType, array &$fieldAttributes, string $name,
|
||||||
string &$typeName, string &$langView, string &$nameSingleCode, string &$nameListCode,
|
string $typeName, string $langView, string $nameSingleCode, string $nameListCode,
|
||||||
array $placeholders, ?array &$optionArray, ?array $custom = null, string $taber = ''): \stdClass
|
array $placeholders, ?array &$optionArray, ?array $custom = null, string $taber = ''): \stdClass
|
||||||
{
|
{
|
||||||
$this->counter->field++;
|
$this->counter->field++;
|
||||||
|
@ -36,7 +36,7 @@ interface Fieldtypeinterface
|
|||||||
* @param string $taber The tabs to add in layout
|
* @param string $taber The tabs to add in layout
|
||||||
*
|
*
|
||||||
* @return mixed The field (two return types based of field_builder_type selected Object->xml or String)
|
* @return mixed The field (two return types based of field_builder_type selected Object->xml or String)
|
||||||
* @since 3.2.0
|
* @since 3.2.0
|
||||||
*/
|
*/
|
||||||
public function get(string $setType, array &$fieldAttributes, string $name,
|
public function get(string $setType, array &$fieldAttributes, string $name,
|
||||||
string $typeName, string $langView, string $nameSingleCode, string $nameListCode,
|
string $typeName, string $langView, string $nameSingleCode, string $nameListCode,
|
||||||
|
@ -25,7 +25,7 @@ use VDM\Joomla\Componentbuilder\Compiler\Config;
|
|||||||
use VDM\Joomla\Componentbuilder\Compiler\Placeholder;
|
use VDM\Joomla\Componentbuilder\Compiler\Placeholder;
|
||||||
use VDM\Joomla\Componentbuilder\Compiler\Customcode;
|
use VDM\Joomla\Componentbuilder\Compiler\Customcode;
|
||||||
use VDM\Joomla\Componentbuilder\Compiler\Customcode\Gui;
|
use VDM\Joomla\Componentbuilder\Compiler\Customcode\Gui;
|
||||||
use VDM\Joomla\Componentbuilder\Power\Remote\Get as Superpower;
|
use VDM\Joomla\Componentbuilder\Remote\Get as Superpower;
|
||||||
use VDM\Joomla\Componentbuilder\Compiler\Interfaces\PowerInterface;
|
use VDM\Joomla\Componentbuilder\Compiler\Interfaces\PowerInterface;
|
||||||
|
|
||||||
|
|
||||||
|
@ -17,7 +17,7 @@ use Joomla\DI\ServiceProviderInterface;
|
|||||||
use VDM\Joomla\Componentbuilder\Compiler\JoomlaPower as Powers;
|
use VDM\Joomla\Componentbuilder\Compiler\JoomlaPower as Powers;
|
||||||
use VDM\Joomla\Componentbuilder\JoomlaPower\Grep;
|
use VDM\Joomla\Componentbuilder\JoomlaPower\Grep;
|
||||||
use VDM\Joomla\Componentbuilder\JoomlaPower\Remote\Config;
|
use VDM\Joomla\Componentbuilder\JoomlaPower\Remote\Config;
|
||||||
use VDM\Joomla\Componentbuilder\Power\Remote\Get;
|
use VDM\Joomla\Componentbuilder\Remote\Get;
|
||||||
use VDM\Joomla\Componentbuilder\Compiler\JoomlaPower\Extractor;
|
use VDM\Joomla\Componentbuilder\Compiler\JoomlaPower\Extractor;
|
||||||
use VDM\Joomla\Componentbuilder\Compiler\JoomlaPower\Injector;
|
use VDM\Joomla\Componentbuilder\Compiler\JoomlaPower\Injector;
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@ use VDM\Joomla\Componentbuilder\Power\Table;
|
|||||||
use VDM\Joomla\Componentbuilder\Package\Dependency\Tracker;
|
use VDM\Joomla\Componentbuilder\Package\Dependency\Tracker;
|
||||||
use VDM\Joomla\Componentbuilder\Package\MessageBus;
|
use VDM\Joomla\Componentbuilder\Package\MessageBus;
|
||||||
use VDM\Joomla\Componentbuilder\Power\Remote\Config;
|
use VDM\Joomla\Componentbuilder\Power\Remote\Config;
|
||||||
use VDM\Joomla\Componentbuilder\Power\Remote\Get;
|
use VDM\Joomla\Componentbuilder\Remote\Get;
|
||||||
use VDM\Joomla\Componentbuilder\Power\Grep;
|
use VDM\Joomla\Componentbuilder\Power\Grep;
|
||||||
use VDM\Joomla\Componentbuilder\Compiler\Power\Autoloader;
|
use VDM\Joomla\Componentbuilder\Compiler\Power\Autoloader;
|
||||||
use VDM\Joomla\Componentbuilder\Compiler\Power\Infusion;
|
use VDM\Joomla\Componentbuilder\Compiler\Power\Infusion;
|
||||||
|
@ -14,7 +14,7 @@ namespace VDM\Joomla\Componentbuilder\Fieldtype;
|
|||||||
|
|
||||||
use Joomla\CMS\Language\Text;
|
use Joomla\CMS\Language\Text;
|
||||||
use VDM\Joomla\Interfaces\GrepInterface;
|
use VDM\Joomla\Interfaces\GrepInterface;
|
||||||
use VDM\Joomla\Abstraction\Grep as ExtendingGrep;
|
use VDM\Joomla\Componentbuilder\Remote\Grep as ExtendingGrep;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -37,99 +37,6 @@ final class Grep extends ExtendingGrep implements GrepInterface
|
|||||||
**/
|
**/
|
||||||
protected ?string $target = 'joomla-fieldtypes';
|
protected ?string $target = 'joomla-fieldtypes';
|
||||||
|
|
||||||
/**
|
|
||||||
* Order of global search
|
|
||||||
*
|
|
||||||
* @var array
|
|
||||||
* @since 5.0.3
|
|
||||||
**/
|
|
||||||
protected array $order = ['remote'];
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Search for a remote item
|
|
||||||
*
|
|
||||||
* @param string $guid The global unique id of the item
|
|
||||||
*
|
|
||||||
* @return object|null
|
|
||||||
* @since 5.0.3
|
|
||||||
*/
|
|
||||||
protected function searchRemote(string $guid): ?object
|
|
||||||
{
|
|
||||||
// check if it exists remotely
|
|
||||||
if (($path = $this->existsRemotely($guid)) !== null)
|
|
||||||
{
|
|
||||||
return $this->getRemote($path, $guid);
|
|
||||||
}
|
|
||||||
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Get a remote field type object from a repository.
|
|
||||||
*
|
|
||||||
* @param object $path The repository path details
|
|
||||||
* @param string $guid The global unique ID of the power
|
|
||||||
*
|
|
||||||
* @return object|null
|
|
||||||
* @since 5.1.1
|
|
||||||
*/
|
|
||||||
protected function getRemote(object $path, string $guid): ?object
|
|
||||||
{
|
|
||||||
$relative_path = $path->index[$this->entity]->{$guid}->path ?? null;
|
|
||||||
if (empty($relative_path))
|
|
||||||
{
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
$branch = $this->getBranchName($path);
|
|
||||||
$guid_field = $this->getGuidField();
|
|
||||||
$settings_name = $this->getSettingsName();
|
|
||||||
$readme_enabled = $this->hasItemReadme();
|
|
||||||
|
|
||||||
// set the target system
|
|
||||||
$target = $path->target ?? 'gitea';
|
|
||||||
$this->contents->setTarget($target);
|
|
||||||
|
|
||||||
// load the base and token if set
|
|
||||||
$this->loadApi(
|
|
||||||
$this->contents,
|
|
||||||
$target === 'gitea' ? ($path->base ?? null) : null,
|
|
||||||
$path->token ?? null
|
|
||||||
);
|
|
||||||
|
|
||||||
$power = $this->loadRemoteFile(
|
|
||||||
$path->organisation,
|
|
||||||
$path->repository,
|
|
||||||
"{$relative_path}/{$settings_name}",
|
|
||||||
$branch
|
|
||||||
);
|
|
||||||
|
|
||||||
if ($power === null || !isset($power->{$guid_field}))
|
|
||||||
{
|
|
||||||
$this->contents->reset_();
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
$path_guid = $path->guid ?? null;
|
|
||||||
|
|
||||||
$branch_field = $this->getBranchField();
|
|
||||||
|
|
||||||
if ($branch_field === 'write_branch' && $path_guid !== null)
|
|
||||||
{
|
|
||||||
$this->setRepoItemSha($power, $path, "{$relative_path}/{$settings_name}", $branch, "{$path_guid}-settings");
|
|
||||||
|
|
||||||
if ($readme_enabled)
|
|
||||||
{
|
|
||||||
$readme_name = $this->getItemReadmeName();
|
|
||||||
$this->setRepoItemSha($power, $path, "{$relative_path}/{$readme_name}", $branch, "{$path_guid}-readme");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$this->contents->reset_();
|
|
||||||
|
|
||||||
return $power;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set repository messages and errors based on given conditions.
|
* Set repository messages and errors based on given conditions.
|
||||||
*
|
*
|
||||||
|
@ -17,7 +17,7 @@ use Joomla\DI\ServiceProviderInterface;
|
|||||||
use VDM\Joomla\Componentbuilder\Fieldtype\Config;
|
use VDM\Joomla\Componentbuilder\Fieldtype\Config;
|
||||||
use VDM\Joomla\Componentbuilder\Fieldtype\Grep;
|
use VDM\Joomla\Componentbuilder\Fieldtype\Grep;
|
||||||
use VDM\Joomla\Componentbuilder\Fieldtype\Remote\Config as RemoteConfig;
|
use VDM\Joomla\Componentbuilder\Fieldtype\Remote\Config as RemoteConfig;
|
||||||
use VDM\Joomla\Componentbuilder\Power\Remote\Get;
|
use VDM\Joomla\Componentbuilder\Remote\Get;
|
||||||
use VDM\Joomla\Componentbuilder\Fieldtype\Remote\Set;
|
use VDM\Joomla\Componentbuilder\Fieldtype\Remote\Set;
|
||||||
use VDM\Joomla\Componentbuilder\Fieldtype\Readme\Item as ItemReadme;
|
use VDM\Joomla\Componentbuilder\Fieldtype\Readme\Item as ItemReadme;
|
||||||
use VDM\Joomla\Componentbuilder\Fieldtype\Readme\Main as MainReadme;
|
use VDM\Joomla\Componentbuilder\Fieldtype\Readme\Main as MainReadme;
|
||||||
|
@ -14,7 +14,7 @@ namespace VDM\Joomla\Componentbuilder\JoomlaPower;
|
|||||||
|
|
||||||
use Joomla\CMS\Language\Text;
|
use Joomla\CMS\Language\Text;
|
||||||
use VDM\Joomla\Interfaces\GrepInterface;
|
use VDM\Joomla\Interfaces\GrepInterface;
|
||||||
use VDM\Joomla\Abstraction\Grep as ExtendingGrep;
|
use VDM\Joomla\Componentbuilder\Remote\Grep as ExtendingGrep;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -37,99 +37,6 @@ final class Grep extends ExtendingGrep implements GrepInterface
|
|||||||
**/
|
**/
|
||||||
protected ?string $target = 'joomla-powers';
|
protected ?string $target = 'joomla-powers';
|
||||||
|
|
||||||
/**
|
|
||||||
* Order of global search
|
|
||||||
*
|
|
||||||
* @var array
|
|
||||||
* @since 3.2.1
|
|
||||||
**/
|
|
||||||
protected array $order = ['remote'];
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Search for a remote item
|
|
||||||
*
|
|
||||||
* @param string $guid The global unique id of the item
|
|
||||||
*
|
|
||||||
* @return object|null
|
|
||||||
* @since 3.2.0
|
|
||||||
*/
|
|
||||||
protected function searchRemote(string $guid): ?object
|
|
||||||
{
|
|
||||||
// check if it exists remotely
|
|
||||||
if (($path = $this->existsRemotely($guid)) !== null)
|
|
||||||
{
|
|
||||||
return $this->getRemote($path, $guid);
|
|
||||||
}
|
|
||||||
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Get a remote joomla power object from a repository.
|
|
||||||
*
|
|
||||||
* @param object $path The repository path details
|
|
||||||
* @param string $guid The global unique ID of the power
|
|
||||||
*
|
|
||||||
* @return object|null
|
|
||||||
* @since 5.1.1
|
|
||||||
*/
|
|
||||||
protected function getRemote(object $path, string $guid): ?object
|
|
||||||
{
|
|
||||||
$relative_path = $path->index[$this->entity]->{$guid}->path ?? null;
|
|
||||||
if (empty($relative_path))
|
|
||||||
{
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
$branch = $this->getBranchName($path);
|
|
||||||
$guid_field = $this->getGuidField();
|
|
||||||
$settings_name = $this->getSettingsName();
|
|
||||||
$readme_enabled = $this->hasItemReadme();
|
|
||||||
|
|
||||||
// set the target system
|
|
||||||
$target = $path->target ?? 'gitea';
|
|
||||||
$this->contents->setTarget($target);
|
|
||||||
|
|
||||||
// load the base and token if set
|
|
||||||
$this->loadApi(
|
|
||||||
$this->contents,
|
|
||||||
$target === 'gitea' ? ($path->base ?? null) : null,
|
|
||||||
$path->token ?? null
|
|
||||||
);
|
|
||||||
|
|
||||||
$power = $this->loadRemoteFile(
|
|
||||||
$path->organisation,
|
|
||||||
$path->repository,
|
|
||||||
"{$relative_path}/{$settings_name}",
|
|
||||||
$branch
|
|
||||||
);
|
|
||||||
|
|
||||||
if ($power === null || !isset($power->{$guid_field}))
|
|
||||||
{
|
|
||||||
$this->contents->reset_();
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
$path_guid = $path->guid ?? null;
|
|
||||||
|
|
||||||
$branch_field = $this->getBranchField();
|
|
||||||
|
|
||||||
if ($branch_field === 'write_branch' && $path_guid !== null)
|
|
||||||
{
|
|
||||||
$this->setRepoItemSha($power, $path, "{$relative_path}/{$settings_name}", $branch, "{$path_guid}-settings");
|
|
||||||
|
|
||||||
if ($readme_enabled)
|
|
||||||
{
|
|
||||||
$readme_name = $this->getItemReadmeName();
|
|
||||||
$this->setRepoItemSha($power, $path, "{$relative_path}/{$readme_name}", $branch, "{$path_guid}-readme");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$this->contents->reset_();
|
|
||||||
|
|
||||||
return $power;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set repository messages and errors based on given conditions.
|
* Set repository messages and errors based on given conditions.
|
||||||
*
|
*
|
||||||
|
@ -17,7 +17,7 @@ use Joomla\DI\ServiceProviderInterface;
|
|||||||
use VDM\Joomla\Componentbuilder\JoomlaPower\Config;
|
use VDM\Joomla\Componentbuilder\JoomlaPower\Config;
|
||||||
use VDM\Joomla\Componentbuilder\JoomlaPower\Grep;
|
use VDM\Joomla\Componentbuilder\JoomlaPower\Grep;
|
||||||
use VDM\Joomla\Componentbuilder\JoomlaPower\Remote\Config as RemoteConfig;
|
use VDM\Joomla\Componentbuilder\JoomlaPower\Remote\Config as RemoteConfig;
|
||||||
use VDM\Joomla\Componentbuilder\Power\Remote\Get;
|
use VDM\Joomla\Componentbuilder\Remote\Get;
|
||||||
use VDM\Joomla\Componentbuilder\JoomlaPower\Remote\Set;
|
use VDM\Joomla\Componentbuilder\JoomlaPower\Remote\Set;
|
||||||
use VDM\Joomla\Componentbuilder\JoomlaPower\Readme\Item as ItemReadme;
|
use VDM\Joomla\Componentbuilder\JoomlaPower\Readme\Item as ItemReadme;
|
||||||
use VDM\Joomla\Componentbuilder\JoomlaPower\Readme\Main as MainReadme;
|
use VDM\Joomla\Componentbuilder\JoomlaPower\Readme\Main as MainReadme;
|
||||||
|
@ -13,8 +13,9 @@ namespace VDM\Joomla\Componentbuilder\Package;
|
|||||||
|
|
||||||
|
|
||||||
use Joomla\CMS\Language\Text;
|
use Joomla\CMS\Language\Text;
|
||||||
|
use VDM\Joomla\Componentbuilder\Remote\SetDependenciesTrait;
|
||||||
use VDM\Joomla\Interfaces\GrepInterface;
|
use VDM\Joomla\Interfaces\GrepInterface;
|
||||||
use VDM\Joomla\Abstraction\Grep as ExtendingGrep;
|
use VDM\Joomla\Componentbuilder\Remote\Grep as ExtendingGrep;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -29,6 +30,13 @@ use VDM\Joomla\Abstraction\Grep as ExtendingGrep;
|
|||||||
*/
|
*/
|
||||||
final class Grep extends ExtendingGrep implements GrepInterface
|
final class Grep extends ExtendingGrep implements GrepInterface
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* The Set Dependencies Method
|
||||||
|
*
|
||||||
|
* @since 5.1.1
|
||||||
|
**/
|
||||||
|
use SetDependenciesTrait;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The Grep target [network]
|
* The Grep target [network]
|
||||||
*
|
*
|
||||||
@ -37,149 +45,6 @@ final class Grep extends ExtendingGrep implements GrepInterface
|
|||||||
**/
|
**/
|
||||||
protected ?string $target = 'package';
|
protected ?string $target = 'package';
|
||||||
|
|
||||||
/**
|
|
||||||
* Order of global search
|
|
||||||
*
|
|
||||||
* @var array
|
|
||||||
* @since 5.1.1
|
|
||||||
**/
|
|
||||||
protected array $order = ['remote'];
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Search for a remote item
|
|
||||||
*
|
|
||||||
* @param string $guid The global unique id of the item
|
|
||||||
*
|
|
||||||
* @return object|null
|
|
||||||
* @since 5.1.1
|
|
||||||
*/
|
|
||||||
protected function searchRemote(string $guid): ?object
|
|
||||||
{
|
|
||||||
// check if it exists remotely
|
|
||||||
if (($path = $this->existsRemotely($guid)) !== null)
|
|
||||||
{
|
|
||||||
return $this->getRemote($path, $guid);
|
|
||||||
}
|
|
||||||
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Get a remote package (item) object from a repository.
|
|
||||||
*
|
|
||||||
* @param object $path The repository path details
|
|
||||||
* @param string $guid The global unique ID of the power
|
|
||||||
*
|
|
||||||
* @return object|null
|
|
||||||
* @since 5.1.1
|
|
||||||
*/
|
|
||||||
protected function getRemote(object $path, string $guid): ?object
|
|
||||||
{
|
|
||||||
$relative_path = $path->index[$this->entity]->{$guid}->path ?? null;
|
|
||||||
if (empty($relative_path))
|
|
||||||
{
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
$branch = $this->getBranchName($path);
|
|
||||||
$guid_field = $this->getGuidField();
|
|
||||||
$settings_name = $this->getSettingsName();
|
|
||||||
$readme_enabled = $this->hasItemReadme();
|
|
||||||
|
|
||||||
// set the target system
|
|
||||||
$target = $path->target ?? 'gitea';
|
|
||||||
$this->contents->setTarget($target);
|
|
||||||
|
|
||||||
// load the base and token if set
|
|
||||||
$this->loadApi(
|
|
||||||
$this->contents,
|
|
||||||
$target === 'gitea' ? ($path->base ?? null) : null,
|
|
||||||
$path->token ?? null
|
|
||||||
);
|
|
||||||
|
|
||||||
$power = $this->loadRemoteFile(
|
|
||||||
$path->organisation,
|
|
||||||
$path->repository,
|
|
||||||
"{$relative_path}/{$settings_name}",
|
|
||||||
$branch
|
|
||||||
);
|
|
||||||
|
|
||||||
if ($power === null || !isset($power->{$guid_field}))
|
|
||||||
{
|
|
||||||
$this->contents->reset_();
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
$path_guid = $path->guid ?? null;
|
|
||||||
|
|
||||||
$branch_field = $this->getBranchField();
|
|
||||||
|
|
||||||
if ($branch_field === 'write_branch' && $path_guid !== null)
|
|
||||||
{
|
|
||||||
$this->setRepoItemSha($power, $path, "{$relative_path}/{$settings_name}", $branch, "{$path_guid}-settings");
|
|
||||||
|
|
||||||
if ($readme_enabled)
|
|
||||||
{
|
|
||||||
$readme_name = $this->getItemReadmeName();
|
|
||||||
$this->setRepoItemSha($power, $path, "{$relative_path}/{$readme_name}", $branch, "{$path_guid}-readme");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$this->contents->reset_();
|
|
||||||
|
|
||||||
$this->setDependencies($power);
|
|
||||||
|
|
||||||
return $power;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Load dependency records into the tracker.
|
|
||||||
*
|
|
||||||
* This method supports each dependency item being either an object or an associative array.
|
|
||||||
* It verifies the presence of the `key`, `value`, and `entity` properties before adding them to the tracker.
|
|
||||||
*
|
|
||||||
* @param object $power The remote power object
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
* @since 5.1.1
|
|
||||||
*/
|
|
||||||
protected function setDependencies(object $power): void
|
|
||||||
{
|
|
||||||
$dependencies = $power->{"@dependencies"} ?? [];
|
|
||||||
|
|
||||||
if (empty($dependencies))
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
foreach ($dependencies as $item)
|
|
||||||
{
|
|
||||||
// Support both object and array types
|
|
||||||
$key = is_array($item) ? ($item['key'] ?? null) : ($item->key ?? null);
|
|
||||||
$value = is_array($item) ? ($item['value'] ?? null) : ($item->value ?? null);
|
|
||||||
$entity = is_array($item) ? ($item['entity'] ?? null) : ($item->entity ?? null);
|
|
||||||
$table = is_array($item) ? ($item['table'] ?? null) : ($item->table ?? null);
|
|
||||||
|
|
||||||
if (empty($key) || empty($value) || empty($entity))
|
|
||||||
{
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($table === 'file_system')
|
|
||||||
{
|
|
||||||
$pointer = str_replace('.', '--', $key);
|
|
||||||
if (!$this->tracker->exists("{$entity}.save.{$pointer}"))
|
|
||||||
{
|
|
||||||
$this->tracker->set("{$entity}.get.{$pointer}", $item);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
elseif (!$this->tracker->exists("save.{$entity}.{$key}|{$value}"))
|
|
||||||
{
|
|
||||||
$this->tracker->set("get.{$entity}.{$key}|{$value}", $item);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set repository messages and errors based on given conditions.
|
* Set repository messages and errors based on given conditions.
|
||||||
*
|
*
|
||||||
|
@ -14,7 +14,7 @@ namespace VDM\Joomla\Componentbuilder\Package;
|
|||||||
|
|
||||||
use Joomla\CMS\Language\Text;
|
use Joomla\CMS\Language\Text;
|
||||||
use VDM\Joomla\Interfaces\GrepInterface;
|
use VDM\Joomla\Interfaces\GrepInterface;
|
||||||
use VDM\Joomla\Abstraction\Grep;
|
use VDM\Joomla\Componentbuilder\Remote\Grep;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -37,33 +37,6 @@ class GrepContent extends Grep implements GrepInterface
|
|||||||
**/
|
**/
|
||||||
protected ?string $target = 'package';
|
protected ?string $target = 'package';
|
||||||
|
|
||||||
/**
|
|
||||||
* Order of global search
|
|
||||||
*
|
|
||||||
* @var array
|
|
||||||
* @since 5.1.1
|
|
||||||
**/
|
|
||||||
protected array $order = ['remote'];
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Search for a remote item
|
|
||||||
*
|
|
||||||
* @param string $guid The global unique id of the item
|
|
||||||
*
|
|
||||||
* @return object|null
|
|
||||||
* @since 5.1.1
|
|
||||||
*/
|
|
||||||
protected function searchRemote(string $guid): ?object
|
|
||||||
{
|
|
||||||
// check if it exists remotely
|
|
||||||
if (($path = $this->existsRemotely($guid)) !== null)
|
|
||||||
{
|
|
||||||
return $this->getRemote($path, $guid);
|
|
||||||
}
|
|
||||||
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get a remote folder.zip from a repository.
|
* Get a remote folder.zip from a repository.
|
||||||
*
|
*
|
||||||
@ -90,7 +63,7 @@ class GrepContent extends Grep implements GrepInterface
|
|||||||
// load the base and token if set
|
// load the base and token if set
|
||||||
$this->loadApi(
|
$this->loadApi(
|
||||||
$this->contents,
|
$this->contents,
|
||||||
$target === 'gitea' ? ($path->base ?? null) : null,
|
$path->base ?? null,
|
||||||
$path->token ?? null
|
$path->token ?? null
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -23,7 +23,7 @@ use VDM\Joomla\Interfaces\Readme\MainInterface as MainReadme;
|
|||||||
use VDM\Joomla\Interfaces\Git\Repository\ContentsInterface as Git;
|
use VDM\Joomla\Interfaces\Git\Repository\ContentsInterface as Git;
|
||||||
use VDM\Joomla\Interfaces\Data\ItemsInterface as Items;
|
use VDM\Joomla\Interfaces\Data\ItemsInterface as Items;
|
||||||
use VDM\Joomla\Interfaces\Remote\SetInterface;
|
use VDM\Joomla\Interfaces\Remote\SetInterface;
|
||||||
use VDM\Joomla\Componentbuilder\Package\Remote\Set as ExtendingSet;
|
use VDM\Joomla\Componentbuilder\Remote\Set as ExtendingSet;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -13,7 +13,7 @@ namespace VDM\Joomla\Componentbuilder\Package\Remote\DynamicGet;
|
|||||||
|
|
||||||
|
|
||||||
use VDM\Joomla\Interfaces\Remote\SetInterface;
|
use VDM\Joomla\Interfaces\Remote\SetInterface;
|
||||||
use VDM\Joomla\Componentbuilder\Package\Remote\Set as ExtendingSet;
|
use VDM\Joomla\Componentbuilder\Remote\Set as ExtendingSet;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -14,7 +14,7 @@ namespace VDM\Joomla\Componentbuilder\Package\Remote;
|
|||||||
|
|
||||||
use Joomla\CMS\Language\Text;
|
use Joomla\CMS\Language\Text;
|
||||||
use VDM\Joomla\Interfaces\Remote\SetInterface;
|
use VDM\Joomla\Interfaces\Remote\SetInterface;
|
||||||
use VDM\Joomla\Componentbuilder\Package\Remote\Set;
|
use VDM\Joomla\Componentbuilder\Remote\Set;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -157,7 +157,7 @@ abstract class SetContent extends Set implements SetInterface
|
|||||||
// load the base and token if set
|
// load the base and token if set
|
||||||
$this->grep->loadApi(
|
$this->grep->loadApi(
|
||||||
$this->git,
|
$this->git,
|
||||||
$target_system === 'gitea' ? ($repo->base ?? null) : null,
|
$repo->base ?? null,
|
||||||
$repo->token ?? null
|
$repo->token ?? null
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -17,8 +17,8 @@ use Joomla\DI\ServiceProviderInterface;
|
|||||||
use VDM\Joomla\Componentbuilder\Package\Grep;
|
use VDM\Joomla\Componentbuilder\Package\Grep;
|
||||||
use VDM\Joomla\Componentbuilder\Package\AdminView\Remote\Config;
|
use VDM\Joomla\Componentbuilder\Package\AdminView\Remote\Config;
|
||||||
use VDM\Joomla\Componentbuilder\Package\Dependency\Resolver;
|
use VDM\Joomla\Componentbuilder\Package\Dependency\Resolver;
|
||||||
use VDM\Joomla\Componentbuilder\Power\Remote\Get;
|
use VDM\Joomla\Componentbuilder\Remote\Get;
|
||||||
use VDM\Joomla\Componentbuilder\Package\Remote\Set;
|
use VDM\Joomla\Componentbuilder\Remote\Set;
|
||||||
use VDM\Joomla\Componentbuilder\Package\AdminView\Readme\Item as ItemReadme;
|
use VDM\Joomla\Componentbuilder\Package\AdminView\Readme\Item as ItemReadme;
|
||||||
use VDM\Joomla\Componentbuilder\Package\AdminView\Readme\Main as MainReadme;
|
use VDM\Joomla\Componentbuilder\Package\AdminView\Readme\Main as MainReadme;
|
||||||
use VDM\Joomla\Componentbuilder\Package\AdminFields\Remote\Config as AdminFields;
|
use VDM\Joomla\Componentbuilder\Package\AdminFields\Remote\Config as AdminFields;
|
||||||
|
@ -17,8 +17,8 @@ use Joomla\DI\ServiceProviderInterface;
|
|||||||
use VDM\Joomla\Componentbuilder\Package\Grep;
|
use VDM\Joomla\Componentbuilder\Package\Grep;
|
||||||
use VDM\Joomla\Componentbuilder\Package\Component\Remote\Config;
|
use VDM\Joomla\Componentbuilder\Package\Component\Remote\Config;
|
||||||
use VDM\Joomla\Componentbuilder\Package\Dependency\Resolver;
|
use VDM\Joomla\Componentbuilder\Package\Dependency\Resolver;
|
||||||
use VDM\Joomla\Componentbuilder\Power\Remote\Get;
|
use VDM\Joomla\Componentbuilder\Remote\Get;
|
||||||
use VDM\Joomla\Componentbuilder\Package\Remote\Set;
|
use VDM\Joomla\Componentbuilder\Remote\Set;
|
||||||
use VDM\Joomla\Componentbuilder\Package\Component\Readme\Item as ItemReadme;
|
use VDM\Joomla\Componentbuilder\Package\Component\Readme\Item as ItemReadme;
|
||||||
use VDM\Joomla\Componentbuilder\Package\Component\Readme\Main as MainReadme;
|
use VDM\Joomla\Componentbuilder\Package\Component\Readme\Main as MainReadme;
|
||||||
use VDM\Joomla\Componentbuilder\Package\ComponentAdminViews\Remote\Config as ComponentAdminViews;
|
use VDM\Joomla\Componentbuilder\Package\ComponentAdminViews\Remote\Config as ComponentAdminViews;
|
||||||
|
@ -17,8 +17,8 @@ use Joomla\DI\ServiceProviderInterface;
|
|||||||
use VDM\Joomla\Componentbuilder\Package\Grep;
|
use VDM\Joomla\Componentbuilder\Package\Grep;
|
||||||
use VDM\Joomla\Componentbuilder\Package\CustomAdminView\Remote\Config;
|
use VDM\Joomla\Componentbuilder\Package\CustomAdminView\Remote\Config;
|
||||||
use VDM\Joomla\Componentbuilder\Package\Dependency\Resolver;
|
use VDM\Joomla\Componentbuilder\Package\Dependency\Resolver;
|
||||||
use VDM\Joomla\Componentbuilder\Power\Remote\Get;
|
use VDM\Joomla\Componentbuilder\Remote\Get;
|
||||||
use VDM\Joomla\Componentbuilder\Package\Remote\Set;
|
use VDM\Joomla\Componentbuilder\Remote\Set;
|
||||||
use VDM\Joomla\Componentbuilder\Package\CustomAdminView\Readme\Item as ItemReadme;
|
use VDM\Joomla\Componentbuilder\Package\CustomAdminView\Readme\Item as ItemReadme;
|
||||||
use VDM\Joomla\Componentbuilder\Package\CustomAdminView\Readme\Main as MainReadme;
|
use VDM\Joomla\Componentbuilder\Package\CustomAdminView\Readme\Main as MainReadme;
|
||||||
|
|
||||||
|
@ -17,7 +17,7 @@ use Joomla\DI\ServiceProviderInterface;
|
|||||||
use VDM\Joomla\Componentbuilder\Package\Grep;
|
use VDM\Joomla\Componentbuilder\Package\Grep;
|
||||||
use VDM\Joomla\Componentbuilder\Package\CustomCode\Remote\Config;
|
use VDM\Joomla\Componentbuilder\Package\CustomCode\Remote\Config;
|
||||||
use VDM\Joomla\Componentbuilder\Package\Dependency\Resolver;
|
use VDM\Joomla\Componentbuilder\Package\Dependency\Resolver;
|
||||||
use VDM\Joomla\Componentbuilder\Power\Remote\Get;
|
use VDM\Joomla\Componentbuilder\Remote\Get;
|
||||||
use VDM\Joomla\Componentbuilder\Package\Remote\CustomCode\Set;
|
use VDM\Joomla\Componentbuilder\Package\Remote\CustomCode\Set;
|
||||||
use VDM\Joomla\Componentbuilder\Package\CustomCode\Readme\Item as ItemReadme;
|
use VDM\Joomla\Componentbuilder\Package\CustomCode\Readme\Item as ItemReadme;
|
||||||
use VDM\Joomla\Componentbuilder\Package\CustomCode\Readme\Main as MainReadme;
|
use VDM\Joomla\Componentbuilder\Package\CustomCode\Readme\Main as MainReadme;
|
||||||
|
@ -15,8 +15,8 @@ namespace VDM\Joomla\Componentbuilder\Package\Service;
|
|||||||
use Joomla\DI\Container;
|
use Joomla\DI\Container;
|
||||||
use Joomla\DI\ServiceProviderInterface;
|
use Joomla\DI\ServiceProviderInterface;
|
||||||
use VDM\Joomla\Componentbuilder\Package\Grep;
|
use VDM\Joomla\Componentbuilder\Package\Grep;
|
||||||
use VDM\Joomla\Componentbuilder\Power\Remote\Get;
|
use VDM\Joomla\Componentbuilder\Remote\Get;
|
||||||
use VDM\Joomla\Componentbuilder\Package\Remote\Set;
|
use VDM\Joomla\Componentbuilder\Remote\Set;
|
||||||
use VDM\Joomla\Componentbuilder\Package\Dependency\Resolver;
|
use VDM\Joomla\Componentbuilder\Package\Dependency\Resolver;
|
||||||
use VDM\Joomla\Componentbuilder\Package\Children\Readme\Item as ItemReadme;
|
use VDM\Joomla\Componentbuilder\Package\Children\Readme\Item as ItemReadme;
|
||||||
use VDM\Joomla\Componentbuilder\Package\Children\Readme\Main as MainReadme;
|
use VDM\Joomla\Componentbuilder\Package\Children\Readme\Main as MainReadme;
|
||||||
|
@ -17,7 +17,7 @@ use Joomla\DI\ServiceProviderInterface;
|
|||||||
use VDM\Joomla\Componentbuilder\Package\Grep;
|
use VDM\Joomla\Componentbuilder\Package\Grep;
|
||||||
use VDM\Joomla\Componentbuilder\Package\DynamicGet\Remote\Config;
|
use VDM\Joomla\Componentbuilder\Package\DynamicGet\Remote\Config;
|
||||||
use VDM\Joomla\Componentbuilder\Package\Dependency\Resolver;
|
use VDM\Joomla\Componentbuilder\Package\Dependency\Resolver;
|
||||||
use VDM\Joomla\Componentbuilder\Power\Remote\Get;
|
use VDM\Joomla\Componentbuilder\Remote\Get;
|
||||||
use VDM\Joomla\Componentbuilder\Package\Remote\DynamicGet\Set;
|
use VDM\Joomla\Componentbuilder\Package\Remote\DynamicGet\Set;
|
||||||
use VDM\Joomla\Componentbuilder\Package\DynamicGet\Readme\Item as ItemReadme;
|
use VDM\Joomla\Componentbuilder\Package\DynamicGet\Readme\Item as ItemReadme;
|
||||||
use VDM\Joomla\Componentbuilder\Package\DynamicGet\Readme\Main as MainReadme;
|
use VDM\Joomla\Componentbuilder\Package\DynamicGet\Readme\Main as MainReadme;
|
||||||
|
@ -17,8 +17,8 @@ use Joomla\DI\ServiceProviderInterface;
|
|||||||
use VDM\Joomla\Componentbuilder\Package\Grep;
|
use VDM\Joomla\Componentbuilder\Package\Grep;
|
||||||
use VDM\Joomla\Componentbuilder\Package\Field\Remote\Config;
|
use VDM\Joomla\Componentbuilder\Package\Field\Remote\Config;
|
||||||
use VDM\Joomla\Componentbuilder\Package\Dependency\Resolver;
|
use VDM\Joomla\Componentbuilder\Package\Dependency\Resolver;
|
||||||
use VDM\Joomla\Componentbuilder\Power\Remote\Get;
|
use VDM\Joomla\Componentbuilder\Remote\Get;
|
||||||
use VDM\Joomla\Componentbuilder\Package\Remote\Set;
|
use VDM\Joomla\Componentbuilder\Remote\Set;
|
||||||
use VDM\Joomla\Componentbuilder\Package\Field\Readme\Item as ItemReadme;
|
use VDM\Joomla\Componentbuilder\Package\Field\Readme\Item as ItemReadme;
|
||||||
use VDM\Joomla\Componentbuilder\Package\Field\Readme\Main as MainReadme;
|
use VDM\Joomla\Componentbuilder\Package\Field\Readme\Main as MainReadme;
|
||||||
|
|
||||||
|
@ -17,8 +17,8 @@ use Joomla\DI\ServiceProviderInterface;
|
|||||||
use VDM\Joomla\Componentbuilder\Package\Grep;
|
use VDM\Joomla\Componentbuilder\Package\Grep;
|
||||||
use VDM\Joomla\Componentbuilder\Package\JoomlaModule\Remote\Config;
|
use VDM\Joomla\Componentbuilder\Package\JoomlaModule\Remote\Config;
|
||||||
use VDM\Joomla\Componentbuilder\Package\Dependency\Resolver;
|
use VDM\Joomla\Componentbuilder\Package\Dependency\Resolver;
|
||||||
use VDM\Joomla\Componentbuilder\Power\Remote\Get;
|
use VDM\Joomla\Componentbuilder\Remote\Get;
|
||||||
use VDM\Joomla\Componentbuilder\Package\Remote\Set;
|
use VDM\Joomla\Componentbuilder\Remote\Set;
|
||||||
use VDM\Joomla\Componentbuilder\Package\JoomlaModule\Readme\Item as ItemReadme;
|
use VDM\Joomla\Componentbuilder\Package\JoomlaModule\Readme\Item as ItemReadme;
|
||||||
use VDM\Joomla\Componentbuilder\Package\JoomlaModule\Readme\Main as MainReadme;
|
use VDM\Joomla\Componentbuilder\Package\JoomlaModule\Readme\Main as MainReadme;
|
||||||
use VDM\Joomla\Componentbuilder\Package\JoomlaModuleUpdates\Remote\Config as JoomlaModuleUpdates;
|
use VDM\Joomla\Componentbuilder\Package\JoomlaModuleUpdates\Remote\Config as JoomlaModuleUpdates;
|
||||||
|
@ -17,8 +17,8 @@ use Joomla\DI\ServiceProviderInterface;
|
|||||||
use VDM\Joomla\Componentbuilder\Package\Grep;
|
use VDM\Joomla\Componentbuilder\Package\Grep;
|
||||||
use VDM\Joomla\Componentbuilder\Package\JoomlaPlugin\Remote\Config;
|
use VDM\Joomla\Componentbuilder\Package\JoomlaPlugin\Remote\Config;
|
||||||
use VDM\Joomla\Componentbuilder\Package\Dependency\Resolver;
|
use VDM\Joomla\Componentbuilder\Package\Dependency\Resolver;
|
||||||
use VDM\Joomla\Componentbuilder\Power\Remote\Get;
|
use VDM\Joomla\Componentbuilder\Remote\Get;
|
||||||
use VDM\Joomla\Componentbuilder\Package\Remote\Set;
|
use VDM\Joomla\Componentbuilder\Remote\Set;
|
||||||
use VDM\Joomla\Componentbuilder\Package\JoomlaPlugin\Readme\Item as ItemReadme;
|
use VDM\Joomla\Componentbuilder\Package\JoomlaPlugin\Readme\Item as ItemReadme;
|
||||||
use VDM\Joomla\Componentbuilder\Package\JoomlaPlugin\Readme\Main as MainReadme;
|
use VDM\Joomla\Componentbuilder\Package\JoomlaPlugin\Readme\Main as MainReadme;
|
||||||
use VDM\Joomla\Componentbuilder\Package\JoomlaPluginUpdates\Remote\Config as JoomlaPluginUpdates;
|
use VDM\Joomla\Componentbuilder\Package\JoomlaPluginUpdates\Remote\Config as JoomlaPluginUpdates;
|
||||||
|
@ -17,8 +17,8 @@ use Joomla\DI\ServiceProviderInterface;
|
|||||||
use VDM\Joomla\Componentbuilder\Package\Grep;
|
use VDM\Joomla\Componentbuilder\Package\Grep;
|
||||||
use VDM\Joomla\Componentbuilder\Package\Layout\Remote\Config;
|
use VDM\Joomla\Componentbuilder\Package\Layout\Remote\Config;
|
||||||
use VDM\Joomla\Componentbuilder\Package\Dependency\Resolver;
|
use VDM\Joomla\Componentbuilder\Package\Dependency\Resolver;
|
||||||
use VDM\Joomla\Componentbuilder\Power\Remote\Get;
|
use VDM\Joomla\Componentbuilder\Remote\Get;
|
||||||
use VDM\Joomla\Componentbuilder\Package\Remote\Set;
|
use VDM\Joomla\Componentbuilder\Remote\Set;
|
||||||
use VDM\Joomla\Componentbuilder\Package\Layout\Readme\Item as ItemReadme;
|
use VDM\Joomla\Componentbuilder\Package\Layout\Readme\Item as ItemReadme;
|
||||||
use VDM\Joomla\Componentbuilder\Package\Layout\Readme\Main as MainReadme;
|
use VDM\Joomla\Componentbuilder\Package\Layout\Readme\Main as MainReadme;
|
||||||
|
|
||||||
|
@ -17,8 +17,8 @@ use Joomla\DI\ServiceProviderInterface;
|
|||||||
use VDM\Joomla\Componentbuilder\Package\Grep;
|
use VDM\Joomla\Componentbuilder\Package\Grep;
|
||||||
use VDM\Joomla\Componentbuilder\Package\Library\Remote\Config;
|
use VDM\Joomla\Componentbuilder\Package\Library\Remote\Config;
|
||||||
use VDM\Joomla\Componentbuilder\Package\Dependency\Resolver;
|
use VDM\Joomla\Componentbuilder\Package\Dependency\Resolver;
|
||||||
use VDM\Joomla\Componentbuilder\Power\Remote\Get;
|
use VDM\Joomla\Componentbuilder\Remote\Get;
|
||||||
use VDM\Joomla\Componentbuilder\Package\Remote\Set;
|
use VDM\Joomla\Componentbuilder\Remote\Set;
|
||||||
use VDM\Joomla\Componentbuilder\Package\Library\Readme\Item as ItemReadme;
|
use VDM\Joomla\Componentbuilder\Package\Library\Readme\Item as ItemReadme;
|
||||||
use VDM\Joomla\Componentbuilder\Package\Library\Readme\Main as MainReadme;
|
use VDM\Joomla\Componentbuilder\Package\Library\Readme\Main as MainReadme;
|
||||||
use VDM\Joomla\Componentbuilder\Package\LibraryConfig\Remote\Config as LibraryConfig;
|
use VDM\Joomla\Componentbuilder\Package\LibraryConfig\Remote\Config as LibraryConfig;
|
||||||
|
@ -17,8 +17,8 @@ use Joomla\DI\ServiceProviderInterface;
|
|||||||
use VDM\Joomla\Componentbuilder\Package\Grep;
|
use VDM\Joomla\Componentbuilder\Package\Grep;
|
||||||
use VDM\Joomla\Componentbuilder\Package\SiteView\Remote\Config;
|
use VDM\Joomla\Componentbuilder\Package\SiteView\Remote\Config;
|
||||||
use VDM\Joomla\Componentbuilder\Package\Dependency\Resolver;
|
use VDM\Joomla\Componentbuilder\Package\Dependency\Resolver;
|
||||||
use VDM\Joomla\Componentbuilder\Power\Remote\Get;
|
use VDM\Joomla\Componentbuilder\Remote\Get;
|
||||||
use VDM\Joomla\Componentbuilder\Package\Remote\Set;
|
use VDM\Joomla\Componentbuilder\Remote\Set;
|
||||||
use VDM\Joomla\Componentbuilder\Package\SiteView\Readme\Item as ItemReadme;
|
use VDM\Joomla\Componentbuilder\Package\SiteView\Readme\Item as ItemReadme;
|
||||||
use VDM\Joomla\Componentbuilder\Package\SiteView\Readme\Main as MainReadme;
|
use VDM\Joomla\Componentbuilder\Package\SiteView\Readme\Main as MainReadme;
|
||||||
|
|
||||||
|
@ -17,8 +17,8 @@ use Joomla\DI\ServiceProviderInterface;
|
|||||||
use VDM\Joomla\Componentbuilder\Package\Grep;
|
use VDM\Joomla\Componentbuilder\Package\Grep;
|
||||||
use VDM\Joomla\Componentbuilder\Package\Template\Remote\Config;
|
use VDM\Joomla\Componentbuilder\Package\Template\Remote\Config;
|
||||||
use VDM\Joomla\Componentbuilder\Package\Dependency\Resolver;
|
use VDM\Joomla\Componentbuilder\Package\Dependency\Resolver;
|
||||||
use VDM\Joomla\Componentbuilder\Power\Remote\Get;
|
use VDM\Joomla\Componentbuilder\Remote\Get;
|
||||||
use VDM\Joomla\Componentbuilder\Package\Remote\Set;
|
use VDM\Joomla\Componentbuilder\Remote\Set;
|
||||||
use VDM\Joomla\Componentbuilder\Package\Template\Readme\Item as ItemReadme;
|
use VDM\Joomla\Componentbuilder\Package\Template\Readme\Item as ItemReadme;
|
||||||
use VDM\Joomla\Componentbuilder\Package\Template\Readme\Main as MainReadme;
|
use VDM\Joomla\Componentbuilder\Package\Template\Readme\Main as MainReadme;
|
||||||
|
|
||||||
|
@ -136,7 +136,7 @@ final class Grep extends ExtendingGrep implements GrepInterface
|
|||||||
// load the base and token if set
|
// load the base and token if set
|
||||||
$this->loadApi(
|
$this->loadApi(
|
||||||
$this->contents,
|
$this->contents,
|
||||||
$target === 'gitea' ? ($path->base ?? null) : null,
|
$path->base ?? null,
|
||||||
$path->token ?? null
|
$path->token ?? null
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -17,7 +17,7 @@ use Joomla\DI\ServiceProviderInterface;
|
|||||||
use VDM\Joomla\Componentbuilder\Power\Config;
|
use VDM\Joomla\Componentbuilder\Power\Config;
|
||||||
use VDM\Joomla\Componentbuilder\Power\Grep;
|
use VDM\Joomla\Componentbuilder\Power\Grep;
|
||||||
use VDM\Joomla\Componentbuilder\Power\Remote\Config as RemoteConfig;
|
use VDM\Joomla\Componentbuilder\Power\Remote\Config as RemoteConfig;
|
||||||
use VDM\Joomla\Componentbuilder\Power\Remote\Get;
|
use VDM\Joomla\Componentbuilder\Remote\Get;
|
||||||
use VDM\Joomla\Componentbuilder\Power\Remote\Set;
|
use VDM\Joomla\Componentbuilder\Power\Remote\Set;
|
||||||
use VDM\Joomla\Componentbuilder\Power\Parser;
|
use VDM\Joomla\Componentbuilder\Power\Parser;
|
||||||
use VDM\Joomla\Componentbuilder\Power\Plantuml;
|
use VDM\Joomla\Componentbuilder\Power\Plantuml;
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace VDM\Joomla\Componentbuilder\Power\Remote;
|
namespace VDM\Joomla\Componentbuilder\Remote;
|
||||||
|
|
||||||
|
|
||||||
use VDM\Joomla\Interfaces\Remote\GetInterface;
|
use VDM\Joomla\Interfaces\Remote\GetInterface;
|
||||||
@ -17,7 +17,7 @@ use VDM\Joomla\Abstraction\Remote\Get as ExtendingGet;
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Remote Get Power of JCB
|
* Remote Get of an Entity
|
||||||
*
|
*
|
||||||
* @since 3.2.0
|
* @since 3.2.0
|
||||||
*/
|
*/
|
@ -0,0 +1,144 @@
|
|||||||
|
<?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\Remote;
|
||||||
|
|
||||||
|
|
||||||
|
use Joomla\CMS\Language\Text;
|
||||||
|
use VDM\Joomla\Interfaces\GrepInterface;
|
||||||
|
use VDM\Joomla\Abstraction\Grep as ExtendingGrep;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Global Resource Empowerment Platform
|
||||||
|
*
|
||||||
|
* The Grep feature will try to find your power in the repositories
|
||||||
|
* linked to this [area], and if it can't be found there will try the global core
|
||||||
|
* Super Powers of JCB. All searches are performed according the [algorithm:cascading]
|
||||||
|
* See documentation for more details: https://git.vdm.dev/joomla/super-powers/wiki
|
||||||
|
*
|
||||||
|
* @since 5.1.1
|
||||||
|
*/
|
||||||
|
abstract class Grep extends ExtendingGrep implements GrepInterface
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Order of global search
|
||||||
|
*
|
||||||
|
* @var array
|
||||||
|
* @since 5.1.1
|
||||||
|
**/
|
||||||
|
protected array $order = ['remote'];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Search for a remote item
|
||||||
|
*
|
||||||
|
* @param string $guid The global unique id of the item
|
||||||
|
*
|
||||||
|
* @return object|null
|
||||||
|
* @since 5.1.1
|
||||||
|
*/
|
||||||
|
protected function searchRemote(string $guid): ?object
|
||||||
|
{
|
||||||
|
// check if it exists remotely
|
||||||
|
if (($path = $this->existsRemotely($guid)) !== null)
|
||||||
|
{
|
||||||
|
return $this->getRemote($path, $guid);
|
||||||
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get a remote snippet object from a repository.
|
||||||
|
*
|
||||||
|
* @param object $path The repository path details
|
||||||
|
* @param string $guid The global unique ID of the power
|
||||||
|
*
|
||||||
|
* @return object|null
|
||||||
|
* @since 5.1.1
|
||||||
|
*/
|
||||||
|
protected function getRemote(object $path, string $guid): ?object
|
||||||
|
{
|
||||||
|
$relative_path = $path->index[$this->entity]->{$guid}->path ?? null;
|
||||||
|
if (empty($relative_path))
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
$branch = $this->getBranchName($path);
|
||||||
|
$guid_field = $this->getGuidField();
|
||||||
|
$settings_name = $this->getSettingsName();
|
||||||
|
$readme_enabled = $this->hasItemReadme();
|
||||||
|
|
||||||
|
// set the target system
|
||||||
|
$target = $path->target ?? 'gitea';
|
||||||
|
$this->contents->setTarget($target);
|
||||||
|
|
||||||
|
// load the base and token if set
|
||||||
|
$this->loadApi(
|
||||||
|
$this->contents,
|
||||||
|
$path->base ?? null,
|
||||||
|
$path->token ?? null
|
||||||
|
);
|
||||||
|
|
||||||
|
$power = $this->loadRemoteFile(
|
||||||
|
$path->organisation,
|
||||||
|
$path->repository,
|
||||||
|
"{$relative_path}/{$settings_name}",
|
||||||
|
$branch
|
||||||
|
);
|
||||||
|
|
||||||
|
if ($power === null || !isset($power->{$guid_field}))
|
||||||
|
{
|
||||||
|
$this->contents->reset_();
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
$path_guid = $path->guid ?? null;
|
||||||
|
|
||||||
|
$branch_field = $this->getBranchField();
|
||||||
|
|
||||||
|
if ($branch_field === 'write_branch' && $path_guid !== null)
|
||||||
|
{
|
||||||
|
$this->setRepoItemSha($power, $path, "{$relative_path}/{$settings_name}", $branch, "{$path_guid}-settings");
|
||||||
|
|
||||||
|
if ($readme_enabled)
|
||||||
|
{
|
||||||
|
$readme_name = $this->getItemReadmeName();
|
||||||
|
$this->setRepoItemSha($power, $path, "{$relative_path}/{$readme_name}", $branch, "{$path_guid}-readme");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->contents->reset_();
|
||||||
|
|
||||||
|
if (method_exists($this, 'setDependencies'))
|
||||||
|
{
|
||||||
|
$this->setDependencies($power);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $power;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set repository messages and errors based on given conditions.
|
||||||
|
*
|
||||||
|
* @param string $message The message to set (if error)
|
||||||
|
* @param string $path Path value
|
||||||
|
* @param string $repository Repository name
|
||||||
|
* @param string $organisation Organisation name
|
||||||
|
* @param string|null $base Base URL
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
* @since 3.2.0
|
||||||
|
*/
|
||||||
|
abstract protected function setRemoteIndexMessage(string $message, string $path, string $repository, string $organisation, ?string $base): void;
|
||||||
|
}
|
||||||
|
|
@ -9,7 +9,7 @@
|
|||||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace VDM\Joomla\Componentbuilder\Package\Remote;
|
namespace VDM\Joomla\Componentbuilder\Remote;
|
||||||
|
|
||||||
|
|
||||||
use Joomla\CMS\Language\Text;
|
use Joomla\CMS\Language\Text;
|
||||||
@ -27,7 +27,7 @@ use VDM\Joomla\Abstraction\Remote\Set as ExtendingSet;
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set package based on global unique ids to remote repository
|
* Set global unique ids to remote repository
|
||||||
*
|
*
|
||||||
* @since 5.1.1
|
* @since 5.1.1
|
||||||
*/
|
*/
|
@ -0,0 +1,70 @@
|
|||||||
|
<?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\Remote;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The Set Dependencies Method
|
||||||
|
*
|
||||||
|
* @since 5.1.1
|
||||||
|
*/
|
||||||
|
trait SetDependenciesTrait
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Load dependency records into the tracker.
|
||||||
|
*
|
||||||
|
* This method supports each dependency item being either an object or an associative array.
|
||||||
|
* It verifies the presence of the `key`, `value`, and `entity` properties before adding them to the tracker.
|
||||||
|
*
|
||||||
|
* @param object $power The remote power object
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
* @since 5.1.1
|
||||||
|
*/
|
||||||
|
protected function setDependencies(object $power): void
|
||||||
|
{
|
||||||
|
$dependencies = $power->{"@dependencies"} ?? [];
|
||||||
|
|
||||||
|
if (empty($dependencies))
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach ($dependencies as $item)
|
||||||
|
{
|
||||||
|
// Support both object and array types
|
||||||
|
$key = is_array($item) ? ($item['key'] ?? null) : ($item->key ?? null);
|
||||||
|
$value = is_array($item) ? ($item['value'] ?? null) : ($item->value ?? null);
|
||||||
|
$entity = is_array($item) ? ($item['entity'] ?? null) : ($item->entity ?? null);
|
||||||
|
$table = is_array($item) ? ($item['table'] ?? null) : ($item->table ?? null);
|
||||||
|
|
||||||
|
if (empty($key) || empty($value) || empty($entity))
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($table === 'file_system')
|
||||||
|
{
|
||||||
|
$pointer = str_replace('.', '--', $key);
|
||||||
|
if (!$this->tracker->exists("{$entity}.save.{$pointer}"))
|
||||||
|
{
|
||||||
|
$this->tracker->set("{$entity}.get.{$pointer}", $item);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
elseif (!$this->tracker->exists("save.{$entity}.{$key}|{$value}"))
|
||||||
|
{
|
||||||
|
$this->tracker->set("get.{$entity}.{$key}|{$value}", $item);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,147 @@
|
|||||||
|
<?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\Repository;
|
||||||
|
|
||||||
|
|
||||||
|
use Joomla\Registry\Registry as JoomlaRegistry;
|
||||||
|
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\ComponentConfig;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Compiler Configurations
|
||||||
|
*
|
||||||
|
* All these functions are accessed via the direct name without the get:
|
||||||
|
* example: $this->component_code_name calls: $this->getComponentcodename()
|
||||||
|
*
|
||||||
|
* All values once called are cached, yet can be updated directly:
|
||||||
|
* example: $this->component_code_name = 'new_code_name'; // be warned!
|
||||||
|
*
|
||||||
|
* @since 5.1.1
|
||||||
|
*/
|
||||||
|
class Config extends ComponentConfig
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* The Global Joomla Configuration
|
||||||
|
*
|
||||||
|
* @var JoomlaRegistry
|
||||||
|
* @since 5.1.1
|
||||||
|
*/
|
||||||
|
protected JoomlaRegistry $config;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor
|
||||||
|
*
|
||||||
|
* @param Input|null $input Input
|
||||||
|
* @param Registry|null $params The component parameters
|
||||||
|
* @param Registry|null $config The Joomla configuration
|
||||||
|
*
|
||||||
|
* @throws \Exception
|
||||||
|
* @since 5.1.1
|
||||||
|
*/
|
||||||
|
public function __construct(?Input $input = null, ?JoomlaRegistry $params = null, ?JoomlaRegistry $config = null)
|
||||||
|
{
|
||||||
|
parent::__construct($input, $params);
|
||||||
|
|
||||||
|
$this->config = $config ?: JoomlaFactory::getConfig();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* get Gitea Username
|
||||||
|
*
|
||||||
|
* @return string the access token
|
||||||
|
* @since 5.1.1
|
||||||
|
*/
|
||||||
|
protected function getGiteausername(): ?string
|
||||||
|
{
|
||||||
|
return $this->params->get('gitea_username');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* get Gitea Access Token
|
||||||
|
*
|
||||||
|
* @return string the access token
|
||||||
|
* @since 5.1.1
|
||||||
|
*/
|
||||||
|
protected function getGiteatoken(): ?string
|
||||||
|
{
|
||||||
|
return $this->params->get('gitea_token');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get snippet core organisation
|
||||||
|
*
|
||||||
|
* @return string The snippet core organisation
|
||||||
|
* @since 5.1.1
|
||||||
|
*/
|
||||||
|
protected function getRepositorycoreorganisation(): string
|
||||||
|
{
|
||||||
|
// the VDM default organisation is [joomla]
|
||||||
|
$organisation = 'joomla';
|
||||||
|
|
||||||
|
return $this->params->get('repository_core_organisation', $organisation);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get Snippet init repos
|
||||||
|
*
|
||||||
|
* @return array The init repositories on Gitea
|
||||||
|
* @since 5.1.1
|
||||||
|
*/
|
||||||
|
protected function getRepositoryinitrepos(): array
|
||||||
|
{
|
||||||
|
// some defaults repos we need by JCB
|
||||||
|
$repos = [];
|
||||||
|
// get the users own power repo (can overwrite all)
|
||||||
|
if (!empty($this->gitea_username))
|
||||||
|
{
|
||||||
|
$repos[$this->gitea_username . '.repository'] = (object) ['organisation' => $this->gitea_username, 'repository' => 'repository', 'read_branch' => 'master'];
|
||||||
|
}
|
||||||
|
$repos[$this->repository_core_organisation . '.repository'] = (object) ['organisation' => $this->repository_core_organisation, 'repository' => 'repository', 'read_branch' => 'master'];
|
||||||
|
|
||||||
|
return $repos;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get joomla snippet approved paths
|
||||||
|
*
|
||||||
|
* @return array The approved paths to the repositories on Gitea
|
||||||
|
* @since 5.1.1
|
||||||
|
*/
|
||||||
|
protected function getApprovedjoomlapaths(): array
|
||||||
|
{
|
||||||
|
// some defaults repos we need by JCB
|
||||||
|
$approved = $this->repository_init_repos;
|
||||||
|
|
||||||
|
$paths = RepoHelper::get(6); // Repository = 6
|
||||||
|
|
||||||
|
if ($paths !== null)
|
||||||
|
{
|
||||||
|
foreach ($paths as $path)
|
||||||
|
{
|
||||||
|
$owner = $path->organisation ?? null;
|
||||||
|
$repo = $path->repository ?? null;
|
||||||
|
if ($owner !== null && $repo !== null)
|
||||||
|
{
|
||||||
|
// we make sure to get only the objects
|
||||||
|
$approved = ["{$owner}.{$repo}" => $path] + $approved;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return array_values($approved);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,74 @@
|
|||||||
|
<?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\Repository;
|
||||||
|
|
||||||
|
|
||||||
|
use Joomla\DI\Container;
|
||||||
|
use VDM\Joomla\Componentbuilder\Repository\Service\Repository;
|
||||||
|
use VDM\Joomla\Componentbuilder\Package\Service\Power;
|
||||||
|
use VDM\Joomla\Service\Database;
|
||||||
|
use VDM\Joomla\Service\Model;
|
||||||
|
use VDM\Joomla\Service\Data;
|
||||||
|
use VDM\Joomla\Componentbuilder\Power\Service\Git;
|
||||||
|
use VDM\Joomla\Componentbuilder\Power\Service\Github;
|
||||||
|
use VDM\Joomla\Github\Service\Utilities as GithubUtilities;
|
||||||
|
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;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Repository Power Factory
|
||||||
|
*
|
||||||
|
* @since 5.1.1
|
||||||
|
*/
|
||||||
|
abstract class Factory extends ExtendingFactory implements FactoryInterface
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Package Container
|
||||||
|
*
|
||||||
|
* @var Container|null
|
||||||
|
* @since 5.1.1
|
||||||
|
**/
|
||||||
|
protected static ?Container $container = null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a container object
|
||||||
|
*
|
||||||
|
* @return Container
|
||||||
|
* @since 5.1.1
|
||||||
|
*/
|
||||||
|
protected static function createContainer(): Container
|
||||||
|
{
|
||||||
|
return (new Container())
|
||||||
|
->registerServiceProvider(new Repository())
|
||||||
|
->registerServiceProvider(new Power())
|
||||||
|
->registerServiceProvider(new Database())
|
||||||
|
->registerServiceProvider(new Model())
|
||||||
|
->registerServiceProvider(new Data())
|
||||||
|
->registerServiceProvider(new Git())
|
||||||
|
->registerServiceProvider(new Github())
|
||||||
|
->registerServiceProvider(new GithubUtilities())
|
||||||
|
->registerServiceProvider(new Gitea())
|
||||||
|
->registerServiceProvider(new GiteaPower())
|
||||||
|
->registerServiceProvider(new GiteaUtilities())
|
||||||
|
->registerServiceProvider(new Api())
|
||||||
|
->registerServiceProvider(new Network())
|
||||||
|
->registerServiceProvider(new Utilities());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,60 @@
|
|||||||
|
<?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\Repository;
|
||||||
|
|
||||||
|
|
||||||
|
use Joomla\CMS\Language\Text;
|
||||||
|
use VDM\Joomla\Interfaces\GrepInterface;
|
||||||
|
use VDM\Joomla\Componentbuilder\Remote\Grep as ExtendingGrep;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Global Resource Empowerment Platform
|
||||||
|
*
|
||||||
|
* The Grep feature will try to find your power in the repositories
|
||||||
|
* linked to this [area], and if it can't be found there will try the global core
|
||||||
|
* Super Powers of JCB. All searches are performed according the [algorithm:cascading]
|
||||||
|
* See documentation for more details: https://git.vdm.dev/joomla/super-powers/wiki
|
||||||
|
*
|
||||||
|
* @since 5.1.1
|
||||||
|
*/
|
||||||
|
final class Grep extends ExtendingGrep implements GrepInterface
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* The Grep target [network]
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
* @since 5.1.1
|
||||||
|
**/
|
||||||
|
protected ?string $target = 'repository';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set repository messages and errors based on given conditions.
|
||||||
|
*
|
||||||
|
* @param string $message The message to set (if error)
|
||||||
|
* @param string $path Path value
|
||||||
|
* @param string $repository Repository name
|
||||||
|
* @param string $organisation Organisation name
|
||||||
|
* @param string|null $base Base URL
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
* @since 5.1.1
|
||||||
|
*/
|
||||||
|
protected function setRemoteIndexMessage(string $message, string $path, string $repository, string $organisation, ?string $base): void
|
||||||
|
{
|
||||||
|
$this->app->enqueueMessage(
|
||||||
|
Text::sprintf('COM_COMPONENTBUILDER_PREPOSITORYB_ENTITY_AT_BSSB_GAVE_THE_FOLLOWING_ERRORBR_SP', $this->contents->api(), $path, $message),
|
||||||
|
'Error'
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,191 @@
|
|||||||
|
<?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\Repository\Readme;
|
||||||
|
|
||||||
|
|
||||||
|
use VDM\Joomla\Interfaces\Readme\ItemInterface;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Compiler Repository Item Readme
|
||||||
|
*
|
||||||
|
* @since 5.1.1
|
||||||
|
*/
|
||||||
|
final class Item implements ItemInterface
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* @const array<int, string> Maps target values to labels.
|
||||||
|
* @since 5.1.1
|
||||||
|
*/
|
||||||
|
private const TARGET_LABELS = [
|
||||||
|
1 => 'Super Power',
|
||||||
|
2 => 'Joomla Power',
|
||||||
|
3 => 'Field Types',
|
||||||
|
4 => 'Packages',
|
||||||
|
5 => 'Snippets',
|
||||||
|
6 => 'Repositories',
|
||||||
|
];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @const array<int, string> Maps access repo values to labels.
|
||||||
|
* @since 5.1.1
|
||||||
|
*/
|
||||||
|
private const ACCESS_LABELS = [
|
||||||
|
0 => 'Global',
|
||||||
|
1 => 'Override',
|
||||||
|
];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Generate a structured Markdown README for a JCB Repository.
|
||||||
|
*
|
||||||
|
* This README displays the repository connection metadata, access level,
|
||||||
|
* and Git configuration in a two-column layout similar to plugin README formatting.
|
||||||
|
*
|
||||||
|
* @param object $item The JCB Repository definition.
|
||||||
|
*
|
||||||
|
* @return string The generated Markdown README.
|
||||||
|
* @since 5.1.1
|
||||||
|
*/
|
||||||
|
public function get(object $item): string
|
||||||
|
{
|
||||||
|
$readme = [];
|
||||||
|
|
||||||
|
// Title
|
||||||
|
$readme[] = '### JCB! Repository';
|
||||||
|
$name = $item->system_name ?? 'error: missing repository name';
|
||||||
|
|
||||||
|
if (!empty($item->base))
|
||||||
|
{
|
||||||
|
$readme[] = "# [{$name}]({$this->getUrl($item)})";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$readme[] = "# {$name}";
|
||||||
|
}
|
||||||
|
$readme[] = '';
|
||||||
|
|
||||||
|
// Access & Target Settings
|
||||||
|
$readme[] = "- **Target:** {$this->getTargetLabel($item->target)}";
|
||||||
|
$readme[] = "- **Access:** {$this->getAccessLabel($item->access_repo)}";
|
||||||
|
$readme[] = '';
|
||||||
|
|
||||||
|
// Prepare Git Metadata
|
||||||
|
$readme[] = $this->getDetailsTable($item);
|
||||||
|
|
||||||
|
$readme[] = '';
|
||||||
|
|
||||||
|
// Footer Quote
|
||||||
|
$readme[] = '> Defines the Git repository and credentials used by JCB to synchronize content during push, init, and reset operations.';
|
||||||
|
$readme[] = '';
|
||||||
|
|
||||||
|
$readme[] = <<<MD
|
||||||
|
### Used in [Joomla Component Builder](https://www.joomlacomponentbuilder.com) - [Source](https://git.vdm.dev/joomla/Component-Builder) - [Mirror](https://github.com/vdm-io/Joomla-Component-Builder) - [Download](https://git.vdm.dev/joomla/pkg-component-builder/releases)
|
||||||
|
|
||||||
|
---
|
||||||
|
[](https://volunteers.joomla.org/joomlers/1396-llewellyn-van-der-merwe "Join Llewellyn on the Joomla Volunteer Portal: Shaping the Future Together!") [](https://git.vdm.dev/octoleo "--quiet") [](https://git.vdm.dev/Llewellyn "Collaborate and Innovate with Llewellyn on Git: Building a Better Code Future!") [](https://t.me/Joomla_component_builder "Join Llewellyn and the Community on Telegram: Building Joomla Components Together!") [](https://joomla.social/@llewellyn "Connect and Engage with Llewellyn on Joomla Social: Empowering Communities, One Post at a Time!") [](https://x.com/llewellynvdm "Join the Conversation with Llewellyn on X: Where Ideas Take Flight!") [](https://github.com/Llewellynvdm "Build, Innovate, and Thrive with Llewellyn on GitHub: Turning Ideas into Impact!") [](https://www.youtube.com/@OctoYou "Explore, Learn, and Create with Llewellyn on YouTube: Your Gateway to Inspiration!") [](https://n8n.io/creators/octoleo "Effortless Automation and Impactful Workflows with Llewellyn on n8n!") [](https://hub.docker.com/u/llewellyn "Llewellyn on Docker: Containerize Your Creativity!") [](https://opencollective.com/joomla-component-builder "Donate towards JCB: Help Llewellyn financially so he can continue developing this great tool!") [](https://git.vdm.dev/Llewellyn/gpg "Unlock Trust and Security with Llewellyn's GPG Key: Your Gateway to Verified Connections!")
|
||||||
|
MD;
|
||||||
|
|
||||||
|
return implode("\n", $readme);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Converts an integer target value to its corresponding string label.
|
||||||
|
*
|
||||||
|
* @param int $value The integer value of the target.
|
||||||
|
* @param string $fallback The fallback label if invalid.
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
* @since 5.1.1
|
||||||
|
*/
|
||||||
|
protected function getTargetLabel(int $value, string $fallback = 'error: empty target'): string
|
||||||
|
{
|
||||||
|
return self::TARGET_LABELS[$value] ?? $fallback;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Converts an integer access_repo value to its corresponding string label.
|
||||||
|
*
|
||||||
|
* @param int $value The integer value of the access_repo.
|
||||||
|
* @param string $fallback The fallback label if invalid.
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
* @since 5.1.1
|
||||||
|
*/
|
||||||
|
protected function getAccessLabel(int $value, string $fallback = 'error: empty access repo'): string
|
||||||
|
{
|
||||||
|
return self::ACCESS_LABELS[$value] ?? $fallback;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the repository target URL.
|
||||||
|
*
|
||||||
|
* @param object $item The JCB Repository definition.
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
* @since 5.1.1
|
||||||
|
*/
|
||||||
|
protected function getUrl(object $item): string
|
||||||
|
{
|
||||||
|
return sprintf(
|
||||||
|
'%s/%s/%s',
|
||||||
|
$this->getValue($item, 'base', '[base]'),
|
||||||
|
$this->getValue($item, 'organisation', '[org]'),
|
||||||
|
$this->getValue($item, 'repository', '[repo]')
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the repository details in Markdown table format.
|
||||||
|
*
|
||||||
|
* @param object $item The JCB Repository definition.
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
* @since 5.1.1
|
||||||
|
*/
|
||||||
|
protected function getDetailsTable(object $item): string
|
||||||
|
{
|
||||||
|
$details = [
|
||||||
|
'Base Url' => $this->getValue($item, 'base', '[base]'),
|
||||||
|
'Organisation' => $this->getValue($item, 'organisation', '[org]'),
|
||||||
|
'Repository' => $this->getValue($item, 'repository', '[repo]'),
|
||||||
|
'Username' => $item->username ?? '[empty username]',
|
||||||
|
'Author Name' => $item->author_name ?? '[empty author name]',
|
||||||
|
'Author Email' => $item->author_email ?? '[empty author email]',
|
||||||
|
'Read Branch' => $item->read_branch ?? '[empty read branch]',
|
||||||
|
'Write Branch' => $item->write_branch ?? '[empty write branch]',
|
||||||
|
];
|
||||||
|
|
||||||
|
$rows = array_map(
|
||||||
|
fn($key, $value) => "| {$key} | {$value} |",
|
||||||
|
array_keys($details),
|
||||||
|
$details
|
||||||
|
);
|
||||||
|
|
||||||
|
return "## Repository Details\n\n| Setting | Value |\n|---------|--------|\n" . implode("\n", $rows);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieve and sanitize a string property from an object.
|
||||||
|
*
|
||||||
|
* @param object $item The source object.
|
||||||
|
* @param string $prop Property name.
|
||||||
|
* @param string $fallback Value to use if not found.
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
* @since 5.1.1
|
||||||
|
*/
|
||||||
|
private function getValue(object $item, string $prop, string $fallback = ''): string
|
||||||
|
{
|
||||||
|
return trim((string)($item->{$prop} ?? $fallback), '/');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,139 @@
|
|||||||
|
<?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\Repository\Readme;
|
||||||
|
|
||||||
|
|
||||||
|
use VDM\Joomla\Interfaces\Readme\MainInterface;
|
||||||
|
use VDM\Joomla\Componentbuilder\Package\Readme\Main as ExtendingMain;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Repository Main Readme
|
||||||
|
*
|
||||||
|
* @since 5.1.1
|
||||||
|
*/
|
||||||
|
final class Main extends ExtendingMain implements MainInterface
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Generate the main README for the JCB Repositories repository in Markdown format.
|
||||||
|
*
|
||||||
|
* JCB Repositories define the Git destinations used by Joomla Component Builder (JCB)
|
||||||
|
* to push, init, and reset packages such as Snippets, Super Powers, Field Types, Joomla Powers,
|
||||||
|
* and JCB Packages. Each repository sets the authentication and target configuration for remote syncing.
|
||||||
|
*
|
||||||
|
* @param array $items All configured repository definitions in this collection.
|
||||||
|
*
|
||||||
|
* @return string The full generated Markdown README.
|
||||||
|
* @since 5.1.1
|
||||||
|
*/
|
||||||
|
public function get(array $items): string
|
||||||
|
{
|
||||||
|
$readme = [];
|
||||||
|
|
||||||
|
// Header
|
||||||
|
$readme[] = '# JCB! Repositories';
|
||||||
|
$readme[] = '';
|
||||||
|
|
||||||
|
// What is it?
|
||||||
|
$readme[] = '### What Are JCB Repositories?';
|
||||||
|
$readme[] = <<<MD
|
||||||
|
JCB Repositories define where Joomla Component Builder (JCB) pushes or pulls content from
|
||||||
|
during INIT, RESET, and PUSH operations.
|
||||||
|
|
||||||
|
They act as the Git configuration layer for managing remote syncing of the following entity types:
|
||||||
|
- 🧩 Snippets
|
||||||
|
- ⚡ Super Powers
|
||||||
|
- 🧬 Field Types
|
||||||
|
- 🔧 Joomla Powers
|
||||||
|
- 📦 JCB Packages
|
||||||
|
|
||||||
|
Each repository configuration defines how and where content is versioned - using GitHub, Gitea, or similar Git platforms.
|
||||||
|
|
||||||
|
---
|
||||||
|
MD;
|
||||||
|
|
||||||
|
// Function
|
||||||
|
$readme[] = '### What Do Repositories Do?';
|
||||||
|
$readme[] = <<<MD
|
||||||
|
A JCB Repository specifies:
|
||||||
|
|
||||||
|
- Which Git platform (e.g., GitHub or Gitea)
|
||||||
|
- Which organization/repo to use
|
||||||
|
- What branches to read from and write to
|
||||||
|
- How authentication should be handled (token, user, URL)
|
||||||
|
- Whether to use **Global Config** credentials or **Override** credentials locally
|
||||||
|
- Author name/email for Git commits
|
||||||
|
|
||||||
|
Each repository becomes a "target" used by JCB to push and pull data between your local builder and remote Git Repo.
|
||||||
|
|
||||||
|
Repositories themselves do not contain the data - they provide the link for transferring it.
|
||||||
|
|
||||||
|
---
|
||||||
|
MD;
|
||||||
|
|
||||||
|
// Access Modes
|
||||||
|
$readme[] = '### Access & Authentication';
|
||||||
|
$readme[] = <<<MD
|
||||||
|
You can define two authentication modes:
|
||||||
|
|
||||||
|
- `Global`: Pull credentials from the global configuration of your JCB Component.
|
||||||
|
- `Override`: Manually provide your own Git credentials within this repository setup.
|
||||||
|
|
||||||
|
This provides fine-grained control for contributors, CI/CD automation, or organization-level collaboration.
|
||||||
|
|
||||||
|
Depending on the selected Git type:
|
||||||
|
- GitHub requires token, organization, and repo
|
||||||
|
- Gitea requires base URL, token, and organization
|
||||||
|
|
||||||
|
---
|
||||||
|
MD;
|
||||||
|
|
||||||
|
// Integration
|
||||||
|
$readme[] = '### Repository Targets';
|
||||||
|
$readme[] = <<<MD
|
||||||
|
Each Repository can be assigned as the sync target for:
|
||||||
|
|
||||||
|
- Snippets
|
||||||
|
- Super Powers
|
||||||
|
- Field Types
|
||||||
|
- Joomla Powers
|
||||||
|
- JCB Packages
|
||||||
|
|
||||||
|
When INIT or RESET is triggered in those respective areas, JCB uses the matching repository settings to:
|
||||||
|
- Clone content from the repository into JCB
|
||||||
|
- Push updated content from JCB into Git
|
||||||
|
|
||||||
|
Multiple repositories can exist for different content types or development environments.
|
||||||
|
|
||||||
|
> Repositories define where things go — they are the communication bridge between your structured data in JCB and your remote Git Repositories.
|
||||||
|
|
||||||
|
MD;
|
||||||
|
|
||||||
|
// Index
|
||||||
|
$readme[] = '### Index of JCB Repositories';
|
||||||
|
$readme[] = '';
|
||||||
|
|
||||||
|
// Add the dynamic index
|
||||||
|
$readme[] = $this->getIndex($items);
|
||||||
|
$readme[] = '';
|
||||||
|
|
||||||
|
$readme[] = <<<MD
|
||||||
|
### All used in [Joomla Component Builder](https://www.joomlacomponentbuilder.com) - [Source](https://git.vdm.dev/joomla/Component-Builder) - [Mirror](https://github.com/vdm-io/Joomla-Component-Builder) - [Download](https://git.vdm.dev/joomla/pkg-component-builder/releases)
|
||||||
|
|
||||||
|
---
|
||||||
|
[](https://volunteers.joomla.org/joomlers/1396-llewellyn-van-der-merwe "Join Llewellyn on the Joomla Volunteer Portal: Shaping the Future Together!") [](https://git.vdm.dev/octoleo "--quiet") [](https://git.vdm.dev/Llewellyn "Collaborate and Innovate with Llewellyn on Git: Building a Better Code Future!") [](https://t.me/Joomla_component_builder "Join Llewellyn and the Community on Telegram: Building Joomla Components Together!") [](https://joomla.social/@llewellyn "Connect and Engage with Llewellyn on Joomla Social: Empowering Communities, One Post at a Time!") [](https://x.com/llewellynvdm "Join the Conversation with Llewellyn on X: Where Ideas Take Flight!") [](https://github.com/Llewellynvdm "Build, Innovate, and Thrive with Llewellyn on GitHub: Turning Ideas into Impact!") [](https://www.youtube.com/@OctoYou "Explore, Learn, and Create with Llewellyn on YouTube: Your Gateway to Inspiration!") [](https://n8n.io/creators/octoleo "Effortless Automation and Impactful Workflows with Llewellyn on n8n!") [](https://hub.docker.com/u/llewellyn "Llewellyn on Docker: Containerize Your Creativity!") [](https://opencollective.com/joomla-component-builder "Donate towards JCB: Help Llewellyn financially so he can continue developing this great tool!") [](https://git.vdm.dev/Llewellyn/gpg "Unlock Trust and Security with Llewellyn's GPG Key: Your Gateway to Verified Connections!")
|
||||||
|
MD;
|
||||||
|
|
||||||
|
return implode("\n", $readme);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,50 @@
|
|||||||
|
<?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\Repository\Remote;
|
||||||
|
|
||||||
|
|
||||||
|
use VDM\Joomla\Interfaces\Remote\ConfigInterface;
|
||||||
|
use VDM\Joomla\Abstraction\Remote\Config as ExtendingConfig;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Base Configure values for the remote classes
|
||||||
|
*
|
||||||
|
* @since 5.1.1
|
||||||
|
*/
|
||||||
|
final class Config extends ExtendingConfig implements ConfigInterface
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Table Name
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
* @since 5.1.1
|
||||||
|
*/
|
||||||
|
protected string $table = 'repository';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Area Name
|
||||||
|
*
|
||||||
|
* @var string|null
|
||||||
|
* @since 5.1.1
|
||||||
|
*/
|
||||||
|
protected ?string $area = 'Repository';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The ignore fields
|
||||||
|
*
|
||||||
|
* @var array
|
||||||
|
* @since 5.1.1
|
||||||
|
*/
|
||||||
|
protected array $ignore = ['token', 'access'];
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1 @@
|
|||||||
|
<html><body bgcolor="#FFFFFF"></body></html>
|
@ -0,0 +1,204 @@
|
|||||||
|
<?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\Repository\Service;
|
||||||
|
|
||||||
|
|
||||||
|
use Joomla\DI\Container;
|
||||||
|
use Joomla\DI\ServiceProviderInterface;
|
||||||
|
use VDM\Joomla\Componentbuilder\Repository\Config;
|
||||||
|
use VDM\Joomla\Componentbuilder\Repository\Grep;
|
||||||
|
use VDM\Joomla\Componentbuilder\Repository\Remote\Config as RemoteConfig;
|
||||||
|
use VDM\Joomla\Componentbuilder\Package\Dependency\Resolver;
|
||||||
|
use VDM\Joomla\Componentbuilder\Remote\Get;
|
||||||
|
use VDM\Joomla\Componentbuilder\Remote\Set;
|
||||||
|
use VDM\Joomla\Componentbuilder\Repository\Readme\Item as ItemReadme;
|
||||||
|
use VDM\Joomla\Componentbuilder\Repository\Readme\Main as MainReadme;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Repository Service Provider
|
||||||
|
*
|
||||||
|
* @since 5.1.1
|
||||||
|
*/
|
||||||
|
class Repository implements ServiceProviderInterface
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Registers the service provider with a DI container.
|
||||||
|
*
|
||||||
|
* @param Container $container The DI container.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
* @since 5.1.1
|
||||||
|
*/
|
||||||
|
public function register(Container $container)
|
||||||
|
{
|
||||||
|
$container->alias(Config::class, 'Repository.Config')->alias('Config', 'Repository.Config')
|
||||||
|
->share('Repository.Config', [$this, 'getConfig'], true);
|
||||||
|
|
||||||
|
$container->alias(Grep::class, 'Repository.Grep')
|
||||||
|
->share('Repository.Grep', [$this, 'getGrep'], true);
|
||||||
|
|
||||||
|
$container->alias(RemoteConfig::class, 'Repository.Remote.Config')
|
||||||
|
->share('Repository.Remote.Config', [$this, 'getRemoteConfig'], true);
|
||||||
|
|
||||||
|
$container->alias(Resolver::class, 'Repository.Resolver')
|
||||||
|
->share('Repository.Resolver', [$this, 'getResolver'], true);
|
||||||
|
|
||||||
|
$container->alias(Get::class, 'Repository.Remote.Get')
|
||||||
|
->share('Repository.Remote.Get', [$this, 'getRepositoryGet'], true);
|
||||||
|
|
||||||
|
$container->alias(Set::class, 'Repository.Remote.Set')
|
||||||
|
->share('Repository.Remote.Set', [$this, 'getRepositorySet'], true);
|
||||||
|
|
||||||
|
$container->alias(ItemReadme::class, 'Repository.Readme.Item')
|
||||||
|
->share('Repository.Readme.Item', [$this, 'getItemReadme'], true);
|
||||||
|
|
||||||
|
$container->alias(MainReadme::class, 'Repository.Readme.Main')
|
||||||
|
->share('Repository.Readme.Main', [$this, 'getMainReadme'], true);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get The Config Class.
|
||||||
|
*
|
||||||
|
* @param Container $container The DI container.
|
||||||
|
*
|
||||||
|
* @return Config
|
||||||
|
* @since 5.1.1
|
||||||
|
*/
|
||||||
|
public function getConfig(Container $container): Config
|
||||||
|
{
|
||||||
|
return new Config();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get The Grep Class.
|
||||||
|
*
|
||||||
|
* @param Container $container The DI container.
|
||||||
|
*
|
||||||
|
* @return Grep
|
||||||
|
* @since 5.1.1
|
||||||
|
*/
|
||||||
|
public function getGrep(Container $container): Grep
|
||||||
|
{
|
||||||
|
return new Grep(
|
||||||
|
$container->get('Repository.Remote.Config'),
|
||||||
|
$container->get('Git.Repository.Contents'),
|
||||||
|
$container->get('Network.Resolve'),
|
||||||
|
$container->get('Power.Tracker'),
|
||||||
|
$container->get('Repository.Config')->approved_joomla_paths
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get The Remote Configure Class.
|
||||||
|
*
|
||||||
|
* @param Container $container The DI container.
|
||||||
|
*
|
||||||
|
* @return RemoteConfig
|
||||||
|
* @since 5.1.1
|
||||||
|
*/
|
||||||
|
public function getRemoteConfig(Container $container): RemoteConfig
|
||||||
|
{
|
||||||
|
return new RemoteConfig(
|
||||||
|
$container->get('Power.Table')
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get The Resolver Class.
|
||||||
|
*
|
||||||
|
* @param Container $container The DI container.
|
||||||
|
*
|
||||||
|
* @return Resolver
|
||||||
|
* @since 5.1.1
|
||||||
|
*/
|
||||||
|
public function getResolver(Container $container): Resolver
|
||||||
|
{
|
||||||
|
return new Resolver(
|
||||||
|
$container->get('Repository.Remote.Config'),
|
||||||
|
$container->get('Utilities.Normalize'),
|
||||||
|
$container->get('Power.Tracker'),
|
||||||
|
$container->get('Power.Table'),
|
||||||
|
$container->get('Load')
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get The Remote Get Class.
|
||||||
|
*
|
||||||
|
* @param Container $container The DI container.
|
||||||
|
*
|
||||||
|
* @return Get
|
||||||
|
* @since 5.1.1
|
||||||
|
*/
|
||||||
|
public function getRepositoryGet(Container $container): Get
|
||||||
|
{
|
||||||
|
return new Get(
|
||||||
|
$container->get('Repository.Remote.Config'),
|
||||||
|
$container->get('Repository.Grep'),
|
||||||
|
$container->get('Data.Item'),
|
||||||
|
$container->get('Power.Tracker'),
|
||||||
|
$container->get('Power.Message')
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get The Remote Set Class.
|
||||||
|
*
|
||||||
|
* @param Container $container The DI container.
|
||||||
|
*
|
||||||
|
* @return Set
|
||||||
|
* @since 5.1.1
|
||||||
|
*/
|
||||||
|
public function getRepositorySet(Container $container): Set
|
||||||
|
{
|
||||||
|
return new Set(
|
||||||
|
$container->get('Power.Tracker'),
|
||||||
|
$container->get('Power.Message'),
|
||||||
|
$container->get('Repository.Grep'),
|
||||||
|
$container->get('Repository.Resolver'),
|
||||||
|
$container->get('Repository.Remote.Config'),
|
||||||
|
$container->get('Repository.Readme.Item'),
|
||||||
|
$container->get('Repository.Readme.Main'),
|
||||||
|
$container->get('Git.Repository.Contents'),
|
||||||
|
$container->get('Data.Items'),
|
||||||
|
$container->get('Repository.Config')->approved_joomla_paths
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get The Item Class.
|
||||||
|
*
|
||||||
|
* @param Container $container The DI container.
|
||||||
|
*
|
||||||
|
* @return ItemReadme
|
||||||
|
* @since 5.1.1
|
||||||
|
*/
|
||||||
|
public function getItemReadme(Container $container): ItemReadme
|
||||||
|
{
|
||||||
|
return new ItemReadme();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get The Main Class.
|
||||||
|
*
|
||||||
|
* @param Container $container The DI container.
|
||||||
|
*
|
||||||
|
* @return MainReadme
|
||||||
|
* @since 5.1.1
|
||||||
|
*/
|
||||||
|
public function getMainReadme(Container $container): MainReadme
|
||||||
|
{
|
||||||
|
return new MainReadme();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1 @@
|
|||||||
|
<html><body bgcolor="#FFFFFF"></body></html>
|
@ -0,0 +1 @@
|
|||||||
|
<html><body bgcolor="#FFFFFF"></body></html>
|
@ -13,8 +13,9 @@ namespace VDM\Joomla\Componentbuilder\Snippet;
|
|||||||
|
|
||||||
|
|
||||||
use Joomla\CMS\Language\Text;
|
use Joomla\CMS\Language\Text;
|
||||||
|
use VDM\Joomla\Componentbuilder\Remote\SetDependenciesTrait;
|
||||||
use VDM\Joomla\Interfaces\GrepInterface;
|
use VDM\Joomla\Interfaces\GrepInterface;
|
||||||
use VDM\Joomla\Abstraction\Grep as ExtendingGrep;
|
use VDM\Joomla\Componentbuilder\Remote\Grep as ExtendingGrep;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -29,6 +30,13 @@ use VDM\Joomla\Abstraction\Grep as ExtendingGrep;
|
|||||||
*/
|
*/
|
||||||
final class Grep extends ExtendingGrep implements GrepInterface
|
final class Grep extends ExtendingGrep implements GrepInterface
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* The Set Dependencies Method
|
||||||
|
*
|
||||||
|
* @since 5.1.1
|
||||||
|
**/
|
||||||
|
use SetDependenciesTrait;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The Grep target [network]
|
* The Grep target [network]
|
||||||
*
|
*
|
||||||
@ -37,139 +45,6 @@ final class Grep extends ExtendingGrep implements GrepInterface
|
|||||||
**/
|
**/
|
||||||
protected ?string $target = 'snippet';
|
protected ?string $target = 'snippet';
|
||||||
|
|
||||||
/**
|
|
||||||
* Order of global search
|
|
||||||
*
|
|
||||||
* @var array
|
|
||||||
* @since 5.1.1
|
|
||||||
**/
|
|
||||||
protected array $order = ['remote'];
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Search for a remote item
|
|
||||||
*
|
|
||||||
* @param string $guid The global unique id of the item
|
|
||||||
*
|
|
||||||
* @return object|null
|
|
||||||
* @since 5.1.1
|
|
||||||
*/
|
|
||||||
protected function searchRemote(string $guid): ?object
|
|
||||||
{
|
|
||||||
// check if it exists remotely
|
|
||||||
if (($path = $this->existsRemotely($guid)) !== null)
|
|
||||||
{
|
|
||||||
return $this->getRemote($path, $guid);
|
|
||||||
}
|
|
||||||
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Get a remote snippet object from a repository.
|
|
||||||
*
|
|
||||||
* @param object $path The repository path details
|
|
||||||
* @param string $guid The global unique ID of the power
|
|
||||||
*
|
|
||||||
* @return object|null
|
|
||||||
* @since 5.1.1
|
|
||||||
*/
|
|
||||||
protected function getRemote(object $path, string $guid): ?object
|
|
||||||
{
|
|
||||||
$relative_path = $path->index[$this->entity]->{$guid}->path ?? null;
|
|
||||||
if (empty($relative_path))
|
|
||||||
{
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
$branch = $this->getBranchName($path);
|
|
||||||
$guid_field = $this->getGuidField();
|
|
||||||
$settings_name = $this->getSettingsName();
|
|
||||||
$readme_enabled = $this->hasItemReadme();
|
|
||||||
|
|
||||||
// set the target system
|
|
||||||
$target = $path->target ?? 'gitea';
|
|
||||||
$this->contents->setTarget($target);
|
|
||||||
|
|
||||||
// load the base and token if set
|
|
||||||
$target === 'gitea'
|
|
||||||
? $this->loadApi($this->contents, $path->base ?? null, $path->token ?? null)
|
|
||||||
: $this->loadApi($this->contents, null, $path->token ?? null);
|
|
||||||
|
|
||||||
$power = $this->loadRemoteFile(
|
|
||||||
$path->organisation,
|
|
||||||
$path->repository,
|
|
||||||
"{$relative_path}/{$settings_name}",
|
|
||||||
$branch
|
|
||||||
);
|
|
||||||
|
|
||||||
if ($power === null || !isset($power->{$guid_field}))
|
|
||||||
{
|
|
||||||
$this->contents->reset_();
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
$path_guid = $path->guid ?? null;
|
|
||||||
|
|
||||||
$branch_field = $this->getBranchField();
|
|
||||||
|
|
||||||
if ($branch_field === 'write_branch' && $path_guid !== null)
|
|
||||||
{
|
|
||||||
$this->setRepoItemSha($power, $path, "{$relative_path}/{$settings_name}", $branch, "{$path_guid}-settings");
|
|
||||||
|
|
||||||
if ($readme_enabled)
|
|
||||||
{
|
|
||||||
$readme_name = $this->getItemReadmeName();
|
|
||||||
$this->setRepoItemSha($power, $path, "{$relative_path}/{$readme_name}", $branch, "{$path_guid}-readme");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$this->contents->reset_();
|
|
||||||
|
|
||||||
$this->setDependencies($power);
|
|
||||||
|
|
||||||
return $power;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Load dependency records into the tracker.
|
|
||||||
*
|
|
||||||
* This method supports each dependency item being either an object or an associative array.
|
|
||||||
* It verifies the presence of the `key`, `value`, and `entity` properties before adding them to the tracker.
|
|
||||||
*
|
|
||||||
* @param object $power The remote power object
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
* @since 5.1.1
|
|
||||||
*/
|
|
||||||
protected function setDependencies(object $power): void
|
|
||||||
{
|
|
||||||
$dependencies = $power->{"@dependencies"} ?? [];
|
|
||||||
|
|
||||||
if (empty($dependencies))
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
foreach ($dependencies as $item)
|
|
||||||
{
|
|
||||||
// Support both object and array types
|
|
||||||
$key = is_array($item) ? ($item['key'] ?? null) : ($item->key ?? null);
|
|
||||||
$value = is_array($item) ? ($item['value'] ?? null) : ($item->value ?? null);
|
|
||||||
$entity = is_array($item) ? ($item['entity'] ?? null) : ($item->entity ?? null);
|
|
||||||
$table = is_array($item) ? ($item['table'] ?? null) : ($item->table ?? null);
|
|
||||||
|
|
||||||
if (empty($key) || empty($value) || empty($entity) || $table === 'file_system')
|
|
||||||
{
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!$this->tracker->exists("save.{$entity}.{$key}|{$value}"))
|
|
||||||
{
|
|
||||||
$this->tracker->set("get.{$entity}.{$key}|{$value}", $item);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set repository messages and errors based on given conditions.
|
* Set repository messages and errors based on given conditions.
|
||||||
*
|
*
|
||||||
|
@ -18,8 +18,8 @@ use VDM\Joomla\Componentbuilder\Snippet\Config;
|
|||||||
use VDM\Joomla\Componentbuilder\Snippet\Grep;
|
use VDM\Joomla\Componentbuilder\Snippet\Grep;
|
||||||
use VDM\Joomla\Componentbuilder\Snippet\Remote\Config as RemoteConfig;
|
use VDM\Joomla\Componentbuilder\Snippet\Remote\Config as RemoteConfig;
|
||||||
use VDM\Joomla\Componentbuilder\Package\Dependency\Resolver;
|
use VDM\Joomla\Componentbuilder\Package\Dependency\Resolver;
|
||||||
use VDM\Joomla\Componentbuilder\Power\Remote\Get;
|
use VDM\Joomla\Componentbuilder\Remote\Get;
|
||||||
use VDM\Joomla\Componentbuilder\Package\Remote\Set;
|
use VDM\Joomla\Componentbuilder\Remote\Set;
|
||||||
use VDM\Joomla\Componentbuilder\Snippet\Builder\Entities;
|
use VDM\Joomla\Componentbuilder\Snippet\Builder\Entities;
|
||||||
use VDM\Joomla\Componentbuilder\Package\Builder\Set as BuilderSet;
|
use VDM\Joomla\Componentbuilder\Package\Builder\Set as BuilderSet;
|
||||||
use VDM\Joomla\Componentbuilder\Package\Builder\Get as BuilderGet;
|
use VDM\Joomla\Componentbuilder\Package\Builder\Get as BuilderGet;
|
||||||
|
Reference in New Issue
Block a user