forked from joomla/Component-Builder
Release of v5.0.3-alpha3
Fix usergrouplist compiler triggers. #1100. Add field type power integration [init, reset, push].
This commit is contained in:
parent
045e6df2e2
commit
fc8fabe298
12
CHANGELOG.md
12
CHANGELOG.md
@ -1,12 +1,14 @@
|
|||||||
# v5.0.3-alpha2
|
# v5.0.3-alpha3
|
||||||
|
|
||||||
- Fix library save as copy error. #1162
|
- Fix usergrouplist compiler triggers. #1100
|
||||||
- Fix the error when no components exists. #1164
|
- Add field type power integration [init, reset, push]
|
||||||
- Fix search page error due to File class.
|
|
||||||
|
|
||||||
# v5.0.3-alpha
|
# v5.0.3-alpha
|
||||||
|
|
||||||
- Add push option to powers area
|
- Add push option to powers area
|
||||||
|
- Fix library save as copy error. #1162
|
||||||
|
- Fix the error when no components exists. #1164
|
||||||
|
- Fix search page error due to File class.
|
||||||
|
|
||||||
# v5.0.2
|
# v5.0.2
|
||||||
|
|
||||||
|
@ -1514,7 +1514,7 @@ class Com_ComponentbuilderInstallerScript implements InstallerScriptInterface
|
|||||||
|
|
||||||
|
|
||||||
// Fix the assets table rules column size.
|
// Fix the assets table rules column size.
|
||||||
$this->setDatabaseAssetsRulesFix(95200, "MEDIUMTEXT");
|
$this->setDatabaseAssetsRulesFix(95680, "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":"default","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":"1","type_name_builder":"1","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":"default","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":"1","type_name_builder":"1","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":""}'
|
||||||
@ -3270,7 +3270,7 @@ class Com_ComponentbuilderInstallerScript implements InstallerScriptInterface
|
|||||||
echo '<div style="background-color: #fff;" class="alert alert-info"><a target="_blank" href="https://dev.vdm.io" title="Component Builder">
|
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.0.3-alpha2 Was Successful! Let us know if anything is not working as expected.</h3></div>';
|
<h3>Upgrade to Version 5.0.3-alpha3 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();
|
||||||
|
12
README.md
12
README.md
@ -9,7 +9,7 @@ The Component Builder for [Joomla](https://extensions.joomla.org/extension/compo
|
|||||||
|
|
||||||
Whether you're a seasoned [Joomla](https://extensions.joomla.org/extension/component-builder/) developer, or have just started, Component Builder will save you lots of time and money. A real must have!
|
Whether you're a seasoned [Joomla](https://extensions.joomla.org/extension/component-builder/) developer, or have just started, Component Builder will save you lots of time and money. A real must have!
|
||||||
|
|
||||||
You can install it quite easily and with no limitations. On [gitea](https://git.vdm.dev/joomla/Component-Builder/tags) is the latest release (5.0.3-alpha2) with **ALL** its features and **ALL** concepts totally open-source and free!
|
You can install it quite easily and with no limitations. On [gitea](https://git.vdm.dev/joomla/Component-Builder/tags) is the latest release (5.0.3-alpha3) with **ALL** its features and **ALL** concepts totally open-source and free!
|
||||||
|
|
||||||
> Watch Quick Build of a Hello World component in [JCB on Youtube](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=45)
|
> Watch Quick Build of a Hello World component in [JCB on Youtube](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=45)
|
||||||
|
|
||||||
@ -144,14 +144,14 @@ TODO
|
|||||||
+ *Author*: [Llewellyn van der Merwe](mailto:joomla@vdm.io)
|
+ *Author*: [Llewellyn van der Merwe](mailto:joomla@vdm.io)
|
||||||
+ *Name*: [Component Builder](https://git.vdm.dev/joomla/Component-Builder)
|
+ *Name*: [Component Builder](https://git.vdm.dev/joomla/Component-Builder)
|
||||||
+ *First Build*: 30th April, 2015
|
+ *First Build*: 30th April, 2015
|
||||||
+ *Last Build*: 21st August, 2024
|
+ *Last Build*: 23rd August, 2024
|
||||||
+ *Version*: 5.0.3-alpha2
|
+ *Version*: 5.0.3-alpha3
|
||||||
+ *Copyright*: Copyright (C) 2015 Vast Development Method. All rights reserved.
|
+ *Copyright*: Copyright (C) 2015 Vast Development Method. All rights reserved.
|
||||||
+ *License*: GNU General Public License version 2 or later; see LICENSE.txt
|
+ *License*: GNU General Public License version 2 or later; see LICENSE.txt
|
||||||
+ *Line count*: **830588**
|
+ *Line count*: **835017**
|
||||||
+ *Field count*: **2104**
|
+ *Field count*: **2104**
|
||||||
+ *File count*: **5761**
|
+ *File count*: **5805**
|
||||||
+ *Folder count*: **618**
|
+ *Folder count*: **622**
|
||||||
|
|
||||||
> This **component** was build with a [Joomla](https://extensions.joomla.org/extension/component-builder/) [Automated Component Builder](https://www.joomlacomponentbuilder.com).
|
> This **component** was build with a [Joomla](https://extensions.joomla.org/extension/component-builder/) [Automated Component Builder](https://www.joomlacomponentbuilder.com).
|
||||||
> Developed by [Llewellyn van der Merwe](mailto:joomla@vdm.io)
|
> Developed by [Llewellyn van der Merwe](mailto:joomla@vdm.io)
|
||||||
|
@ -9,7 +9,7 @@ The Component Builder for [Joomla](https://extensions.joomla.org/extension/compo
|
|||||||
|
|
||||||
Whether you're a seasoned [Joomla](https://extensions.joomla.org/extension/component-builder/) developer, or have just started, Component Builder will save you lots of time and money. A real must have!
|
Whether you're a seasoned [Joomla](https://extensions.joomla.org/extension/component-builder/) developer, or have just started, Component Builder will save you lots of time and money. A real must have!
|
||||||
|
|
||||||
You can install it quite easily and with no limitations. On [gitea](https://git.vdm.dev/joomla/Component-Builder/tags) is the latest release (5.0.3-alpha2) with **ALL** its features and **ALL** concepts totally open-source and free!
|
You can install it quite easily and with no limitations. On [gitea](https://git.vdm.dev/joomla/Component-Builder/tags) is the latest release (5.0.3-alpha3) with **ALL** its features and **ALL** concepts totally open-source and free!
|
||||||
|
|
||||||
> Watch Quick Build of a Hello World component in [JCB on Youtube](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=45)
|
> Watch Quick Build of a Hello World component in [JCB on Youtube](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=45)
|
||||||
|
|
||||||
@ -144,14 +144,14 @@ TODO
|
|||||||
+ *Author*: [Llewellyn van der Merwe](mailto:joomla@vdm.io)
|
+ *Author*: [Llewellyn van der Merwe](mailto:joomla@vdm.io)
|
||||||
+ *Name*: [Component Builder](https://git.vdm.dev/joomla/Component-Builder)
|
+ *Name*: [Component Builder](https://git.vdm.dev/joomla/Component-Builder)
|
||||||
+ *First Build*: 30th April, 2015
|
+ *First Build*: 30th April, 2015
|
||||||
+ *Last Build*: 21st August, 2024
|
+ *Last Build*: 23rd August, 2024
|
||||||
+ *Version*: 5.0.3-alpha2
|
+ *Version*: 5.0.3-alpha3
|
||||||
+ *Copyright*: Copyright (C) 2015 Vast Development Method. All rights reserved.
|
+ *Copyright*: Copyright (C) 2015 Vast Development Method. All rights reserved.
|
||||||
+ *License*: GNU General Public License version 2 or later; see LICENSE.txt
|
+ *License*: GNU General Public License version 2 or later; see LICENSE.txt
|
||||||
+ *Line count*: **830588**
|
+ *Line count*: **835017**
|
||||||
+ *Field count*: **2104**
|
+ *Field count*: **2104**
|
||||||
+ *File count*: **5761**
|
+ *File count*: **5805**
|
||||||
+ *Folder count*: **618**
|
+ *Folder count*: **622**
|
||||||
|
|
||||||
> This **component** was build with a [Joomla](https://extensions.joomla.org/extension/component-builder/) [Automated Component Builder](https://www.joomlacomponentbuilder.com).
|
> This **component** was build with a [Joomla](https://extensions.joomla.org/extension/component-builder/) [Automated Component Builder](https://www.joomlacomponentbuilder.com).
|
||||||
> Developed by [Llewellyn van der Merwe](mailto:joomla@vdm.io)
|
> Developed by [Llewellyn van der Merwe](mailto:joomla@vdm.io)
|
||||||
|
@ -271,6 +271,9 @@
|
|||||||
<action name="field.edit.state" title="COM_COMPONENTBUILDER_FIELDS_EDIT_STATE" description="COM_COMPONENTBUILDER_FIELDS_EDIT_STATE_DESC" />
|
<action name="field.edit.state" title="COM_COMPONENTBUILDER_FIELDS_EDIT_STATE" description="COM_COMPONENTBUILDER_FIELDS_EDIT_STATE_DESC" />
|
||||||
<action name="field.version" title="COM_COMPONENTBUILDER_FIELDS_EDIT_VERSION" description="COM_COMPONENTBUILDER_FIELDS_EDIT_VERSION_DESC" />
|
<action name="field.version" title="COM_COMPONENTBUILDER_FIELDS_EDIT_VERSION" description="COM_COMPONENTBUILDER_FIELDS_EDIT_VERSION_DESC" />
|
||||||
<action name="field.submenu" title="COM_COMPONENTBUILDER_FIELDS_SUBMENU" description="COM_COMPONENTBUILDER_FIELDS_SUBMENU_DESC" />
|
<action name="field.submenu" title="COM_COMPONENTBUILDER_FIELDS_SUBMENU" description="COM_COMPONENTBUILDER_FIELDS_SUBMENU_DESC" />
|
||||||
|
<action name="fieldtype.init" title="COM_COMPONENTBUILDER_FIELDTYPE_INIT_BUTTON_ACCESS" description="COM_COMPONENTBUILDER_FIELDTYPE_INIT_BUTTON_ACCESS_DESC" />
|
||||||
|
<action name="fieldtype.push" title="COM_COMPONENTBUILDER_FIELDTYPE_PUSH_BUTTON_ACCESS" description="COM_COMPONENTBUILDER_FIELDTYPE_PUSH_BUTTON_ACCESS_DESC" />
|
||||||
|
<action name="fieldtype.reset" title="COM_COMPONENTBUILDER_FIELDTYPE_RESET_BUTTON_ACCESS" description="COM_COMPONENTBUILDER_FIELDTYPE_RESET_BUTTON_ACCESS_DESC" />
|
||||||
<action name="fieldtype.access" title="COM_COMPONENTBUILDER_FIELDTYPES_ACCESS" description="COM_COMPONENTBUILDER_FIELDTYPES_ACCESS_DESC" />
|
<action name="fieldtype.access" title="COM_COMPONENTBUILDER_FIELDTYPES_ACCESS" description="COM_COMPONENTBUILDER_FIELDTYPES_ACCESS_DESC" />
|
||||||
<action name="fieldtype.batch" title="COM_COMPONENTBUILDER_FIELDTYPES_BATCH_USE" description="COM_COMPONENTBUILDER_FIELDTYPES_BATCH_USE_DESC" />
|
<action name="fieldtype.batch" title="COM_COMPONENTBUILDER_FIELDTYPES_BATCH_USE" description="COM_COMPONENTBUILDER_FIELDTYPES_BATCH_USE_DESC" />
|
||||||
<action name="fieldtype.create" title="COM_COMPONENTBUILDER_FIELDTYPES_CREATE" description="COM_COMPONENTBUILDER_FIELDTYPES_CREATE_DESC" />
|
<action name="fieldtype.create" title="COM_COMPONENTBUILDER_FIELDTYPES_CREATE" description="COM_COMPONENTBUILDER_FIELDTYPES_CREATE_DESC" />
|
||||||
|
@ -72,10 +72,10 @@
|
|||||||
<option value="a.type DESC">COM_COMPONENTBUILDER_FILTER_TYPE_DESCENDING</option>
|
<option value="a.type DESC">COM_COMPONENTBUILDER_FILTER_TYPE_DESCENDING</option>
|
||||||
<option value="a.location ASC">COM_COMPONENTBUILDER_FILTER_LOCATION_ASCENDING</option>
|
<option value="a.location ASC">COM_COMPONENTBUILDER_FILTER_LOCATION_ASCENDING</option>
|
||||||
<option value="a.location DESC">COM_COMPONENTBUILDER_FILTER_LOCATION_DESCENDING</option>
|
<option value="a.location DESC">COM_COMPONENTBUILDER_FILTER_LOCATION_DESCENDING</option>
|
||||||
<option value="h. ASC">COM_COMPONENTBUILDER_FILTER_ADMIN_VIEWS_ASCENDING</option>
|
<option value="g. ASC">COM_COMPONENTBUILDER_FILTER_ADMIN_VIEWS_ASCENDING</option>
|
||||||
<option value="h. DESC">COM_COMPONENTBUILDER_FILTER_ADMIN_VIEWS_DESCENDING</option>
|
<option value="g. DESC">COM_COMPONENTBUILDER_FILTER_ADMIN_VIEWS_DESCENDING</option>
|
||||||
<option value="i. ASC">COM_COMPONENTBUILDER_FILTER_SITE_VIEWS_ASCENDING</option>
|
<option value="h. ASC">COM_COMPONENTBUILDER_FILTER_SITE_VIEWS_ASCENDING</option>
|
||||||
<option value="i. DESC">COM_COMPONENTBUILDER_FILTER_SITE_VIEWS_DESCENDING</option>
|
<option value="h. DESC">COM_COMPONENTBUILDER_FILTER_SITE_VIEWS_DESCENDING</option>
|
||||||
<option value="a.id ASC">JGRID_HEADING_ID_ASC</option>
|
<option value="a.id ASC">JGRID_HEADING_ID_ASC</option>
|
||||||
<option value="a.id DESC">JGRID_HEADING_ID_DESC</option>
|
<option value="a.id DESC">JGRID_HEADING_ID_DESC</option>
|
||||||
</field>
|
</field>
|
||||||
|
@ -118,7 +118,7 @@
|
|||||||
<option value="3">
|
<option value="3">
|
||||||
COM_COMPONENTBUILDER_HELP_DOCUMENT_URL</option>
|
COM_COMPONENTBUILDER_HELP_DOCUMENT_URL</option>
|
||||||
</field>
|
</field>
|
||||||
<!-- Groups Field. Type: Usergrouplist. (custom) -->
|
<!-- Groups Field. Type: Usergrouplist. (joomla) -->
|
||||||
<field
|
<field
|
||||||
type="usergrouplist"
|
type="usergrouplist"
|
||||||
name="groups"
|
name="groups"
|
||||||
|
@ -158,6 +158,8 @@
|
|||||||
COM_COMPONENTBUILDER_REPOSITORY_SUPER_POWER</option>
|
COM_COMPONENTBUILDER_REPOSITORY_SUPER_POWER</option>
|
||||||
<option value="2">
|
<option value="2">
|
||||||
COM_COMPONENTBUILDER_REPOSITORY_JOOMLA_POWER</option>
|
COM_COMPONENTBUILDER_REPOSITORY_JOOMLA_POWER</option>
|
||||||
|
<option value="3">
|
||||||
|
COM_COMPONENTBUILDER_REPOSITORY_JOOMLA_FIELD_TYPES</option>
|
||||||
</field>
|
</field>
|
||||||
<!-- Type Field. Type: List. (joomla) -->
|
<!-- Type Field. Type: List. (joomla) -->
|
||||||
<field
|
<field
|
||||||
|
@ -4271,6 +4271,7 @@ COM_COMPONENTBUILDER_DTEMAILDTDDSDD="<dt>Email</dt><dd>%s</dd>"
|
|||||||
COM_COMPONENTBUILDER_DTLICENSEDTDDSDD="<dt>License</dt><dd>%s</dd>"
|
COM_COMPONENTBUILDER_DTLICENSEDTDDSDD="<dt>License</dt><dd>%s</dd>"
|
||||||
COM_COMPONENTBUILDER_DTOWNERDTDDSDD="<dt>Owner</dt><dd>%s</dd>"
|
COM_COMPONENTBUILDER_DTOWNERDTDDSDD="<dt>Owner</dt><dd>%s</dd>"
|
||||||
COM_COMPONENTBUILDER_DTWEBSITEDTDDSDD="<dt>Website</dt><dd>%s</dd>"
|
COM_COMPONENTBUILDER_DTWEBSITEDTDDSDD="<dt>Website</dt><dd>%s</dd>"
|
||||||
|
COM_COMPONENTBUILDER_DURING_THE_INITIAL_COMPILATION_OF_ANY_COMPONENT_THE_PROCESS_MAY_TAKE_ADDITIONAL_TIME_AS_WE_RETRIEVE_AND_CONFIGURE_THE_ASSOCIATED_SUPERPOWERS_="During the initial compilation of any component, the process may take additional time as we retrieve and configure the associated super-powers.."
|
||||||
COM_COMPONENTBUILDER_DYNAMIC_BUTTON_ERROR="Dynamic Button Error"
|
COM_COMPONENTBUILDER_DYNAMIC_BUTTON_ERROR="Dynamic Button Error"
|
||||||
COM_COMPONENTBUILDER_DYNAMIC_GET="Dynamic Get"
|
COM_COMPONENTBUILDER_DYNAMIC_GET="Dynamic Get"
|
||||||
COM_COMPONENTBUILDER_DYNAMIC_GETS="Dynamic Gets"
|
COM_COMPONENTBUILDER_DYNAMIC_GETS="Dynamic Gets"
|
||||||
@ -4766,6 +4767,8 @@ COM_COMPONENTBUILDER_FIELDTYPE_HAS_DEFAULTS_DESCRIPTION="set the database defaul
|
|||||||
COM_COMPONENTBUILDER_FIELDTYPE_HAS_DEFAULTS_LABEL="Set Database Defaults"
|
COM_COMPONENTBUILDER_FIELDTYPE_HAS_DEFAULTS_LABEL="Set Database Defaults"
|
||||||
COM_COMPONENTBUILDER_FIELDTYPE_ID="Id"
|
COM_COMPONENTBUILDER_FIELDTYPE_ID="Id"
|
||||||
COM_COMPONENTBUILDER_FIELDTYPE_INDEXES_LABEL="Indexes Type"
|
COM_COMPONENTBUILDER_FIELDTYPE_INDEXES_LABEL="Indexes Type"
|
||||||
|
COM_COMPONENTBUILDER_FIELDTYPE_INIT_BUTTON_ACCESS="Fieldtype Init Button Access"
|
||||||
|
COM_COMPONENTBUILDER_FIELDTYPE_INIT_BUTTON_ACCESS_DESC="Allows the users in this group to access the init button."
|
||||||
COM_COMPONENTBUILDER_FIELDTYPE_INT="INT"
|
COM_COMPONENTBUILDER_FIELDTYPE_INT="INT"
|
||||||
COM_COMPONENTBUILDER_FIELDTYPE_JSON="JSON"
|
COM_COMPONENTBUILDER_FIELDTYPE_JSON="JSON"
|
||||||
COM_COMPONENTBUILDER_FIELDTYPE_KEY="KEY"
|
COM_COMPONENTBUILDER_FIELDTYPE_KEY="KEY"
|
||||||
@ -4807,6 +4810,10 @@ COM_COMPONENTBUILDER_FIELDTYPE_PERMISSION="Permissions"
|
|||||||
COM_COMPONENTBUILDER_FIELDTYPE_PROPERTIES_DESCRIPTION="Options for this field"
|
COM_COMPONENTBUILDER_FIELDTYPE_PROPERTIES_DESCRIPTION="Options for this field"
|
||||||
COM_COMPONENTBUILDER_FIELDTYPE_PROPERTIES_LABEL="Properties"
|
COM_COMPONENTBUILDER_FIELDTYPE_PROPERTIES_LABEL="Properties"
|
||||||
COM_COMPONENTBUILDER_FIELDTYPE_PUBLISHING="Publishing"
|
COM_COMPONENTBUILDER_FIELDTYPE_PUBLISHING="Publishing"
|
||||||
|
COM_COMPONENTBUILDER_FIELDTYPE_PUSH_BUTTON_ACCESS="Fieldtype Push Button Access"
|
||||||
|
COM_COMPONENTBUILDER_FIELDTYPE_PUSH_BUTTON_ACCESS_DESC="Allows the users in this group to access the push button."
|
||||||
|
COM_COMPONENTBUILDER_FIELDTYPE_RESET_BUTTON_ACCESS="Fieldtype Reset Button Access"
|
||||||
|
COM_COMPONENTBUILDER_FIELDTYPE_RESET_BUTTON_ACCESS_DESC="Allows the users in this group to access the reset button."
|
||||||
COM_COMPONENTBUILDER_FIELDTYPE_SAVE_WARNING="Alias already existed so a number was added at the end. You can re-edit the Fieldtype to customise the alias."
|
COM_COMPONENTBUILDER_FIELDTYPE_SAVE_WARNING="Alias already existed so a number was added at the end. You can re-edit the Fieldtype to customise the alias."
|
||||||
COM_COMPONENTBUILDER_FIELDTYPE_SELECT_AN_OPTION="Select an option"
|
COM_COMPONENTBUILDER_FIELDTYPE_SELECT_AN_OPTION="Select an option"
|
||||||
COM_COMPONENTBUILDER_FIELDTYPE_SEVEN="7"
|
COM_COMPONENTBUILDER_FIELDTYPE_SEVEN="7"
|
||||||
@ -7621,6 +7628,7 @@ COM_COMPONENTBUILDER_PATH_TO_THE_ZIPPED_PACKAGE_IS_CODESCODE_BR_S_S="Path to the
|
|||||||
COM_COMPONENTBUILDER_PERMISSIONS="Permissions"
|
COM_COMPONENTBUILDER_PERMISSIONS="Permissions"
|
||||||
COM_COMPONENTBUILDER_PERMISSION_DENIED="Permission Denied!"
|
COM_COMPONENTBUILDER_PERMISSION_DENIED="Permission Denied!"
|
||||||
COM_COMPONENTBUILDER_PFILE_AT_BSSB_GAVE_THE_FOLLOWING_ERRORBR_SP="<p>File at <b>%s/%s</b> gave the following error!<br />%s</p>"
|
COM_COMPONENTBUILDER_PFILE_AT_BSSB_GAVE_THE_FOLLOWING_ERRORBR_SP="<p>File at <b>%s/%s</b> gave the following error!<br />%s</p>"
|
||||||
|
COM_COMPONENTBUILDER_PJOOMLA_FIELD_TYPEB_REPOSITORY_AT_BSSB_GAVE_THE_FOLLOWING_ERRORBR_SP="<p>Joomla Field Type</b> repository at <b>%s/%s</b> gave the following error!<br />%s</p>"
|
||||||
COM_COMPONENTBUILDER_PJOOMLA_POWERB_REPOSITORY_AT_BSSB_GAVE_THE_FOLLOWING_ERRORBR_SP="<p>Joomla Power</b> repository at <b>%s/%s</b> gave the following error!<br />%s</p>"
|
COM_COMPONENTBUILDER_PJOOMLA_POWERB_REPOSITORY_AT_BSSB_GAVE_THE_FOLLOWING_ERRORBR_SP="<p>Joomla Power</b> repository at <b>%s/%s</b> gave the following error!<br />%s</p>"
|
||||||
COM_COMPONENTBUILDER_PJOOMLA_POWER_BGUIDSB_NOT_FOUNDP="<p>Joomla Power <b>guid:%s</b> not found!</p>"
|
COM_COMPONENTBUILDER_PJOOMLA_POWER_BGUIDSB_NOT_FOUNDP="<p>Joomla Power <b>guid:%s</b> not found!</p>"
|
||||||
COM_COMPONENTBUILDER_PJOOMLA_POWER_BGUIDSB_WAS_FOUND_BUT_MISSING_A_NAMESPACE_VALUE_FOR_JOOMLA_SP="<p>Joomla Power <b>guid:%s</b> was found, but missing a namespace value for Joomla %s!</p>"
|
COM_COMPONENTBUILDER_PJOOMLA_POWER_BGUIDSB_WAS_FOUND_BUT_MISSING_A_NAMESPACE_VALUE_FOR_JOOMLA_SP="<p>Joomla Power <b>guid:%s</b> was found, but missing a namespace value for Joomla %s!</p>"
|
||||||
@ -7995,6 +8003,7 @@ 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_JOOMLA_FIELD_TYPES="Joomla Field Types"
|
||||||
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"
|
||||||
@ -8902,7 +8911,6 @@ COM_COMPONENTBUILDER_SUBMENU_TEMPLATES="Templates"
|
|||||||
COM_COMPONENTBUILDER_SUBMENU_VALIDATION_RULES="Validation Rules"
|
COM_COMPONENTBUILDER_SUBMENU_VALIDATION_RULES="Validation Rules"
|
||||||
COM_COMPONENTBUILDER_SUCCESS="Success"
|
COM_COMPONENTBUILDER_SUCCESS="Success"
|
||||||
COM_COMPONENTBUILDER_SUCCESSFULLY_INITIALIZED_ALL_REMOTE_JOOMLA_POWERS="Successfully Initialized all Remote Joomla Powers"
|
COM_COMPONENTBUILDER_SUCCESSFULLY_INITIALIZED_ALL_REMOTE_JOOMLA_POWERS="Successfully Initialized all Remote Joomla Powers"
|
||||||
COM_COMPONENTBUILDER_SUCCESSFULLY_INITIALIZED_ALL_REMOTE_POWERS="Successfully Initialized all Remote Powers"
|
|
||||||
COM_COMPONENTBUILDER_SUCCESS_THE_SNIPPET_WAS_SAVED="Success! The snippet was saved."
|
COM_COMPONENTBUILDER_SUCCESS_THE_SNIPPET_WAS_SAVED="Success! The snippet was saved."
|
||||||
COM_COMPONENTBUILDER_SUCCESS_THE_SNIPPET_WAS_SAVED_BUT_THE_MODIFIED_DATE_COULD_NOT_BE_ADJUSTED_BR_BR_BTHIS_MEANS_THE_SNIPPETS_WILL_CONTINUE_TO_APPEAR_OUT_OF_DATEB="Success! The snippet was saved. But the modified date could not be adjusted. <br /><br /><b>This means the snippets will continue to appear out of date.</b>"
|
COM_COMPONENTBUILDER_SUCCESS_THE_SNIPPET_WAS_SAVED_BUT_THE_MODIFIED_DATE_COULD_NOT_BE_ADJUSTED_BR_BR_BTHIS_MEANS_THE_SNIPPETS_WILL_CONTINUE_TO_APPEAR_OUT_OF_DATEB="Success! The snippet was saved. But the modified date could not be adjusted. <br /><br /><b>This means the snippets will continue to appear out of date.</b>"
|
||||||
COM_COMPONENTBUILDER_SUPER_POWER="Super Power"
|
COM_COMPONENTBUILDER_SUPER_POWER="Super Power"
|
||||||
@ -9048,12 +9056,14 @@ COM_COMPONENTBUILDER_THERE_WAS_AN_ERROR_GETTING_THE_PACKAGE_INFO="There was an e
|
|||||||
COM_COMPONENTBUILDER_THERE_WAS_A_PROBLEM_BNO_VIEW_OR_ID_FOUND_IN_SESSION_OR_VIEW_NOT_ALLOWED_TO_ACCESS_AREAB_WE_COULD_NOT_LOAD_ANY_LINKED_TO_VALUES_PLEASE_INFORM_YOUR_SYSTEM_ADMINISTRATOR="There was a problem, <b>no view or id found in session or view not allowed to access area</b>, we could not load any linked to values. Please inform your system administrator!"
|
COM_COMPONENTBUILDER_THERE_WAS_A_PROBLEM_BNO_VIEW_OR_ID_FOUND_IN_SESSION_OR_VIEW_NOT_ALLOWED_TO_ACCESS_AREAB_WE_COULD_NOT_LOAD_ANY_LINKED_TO_VALUES_PLEASE_INFORM_YOUR_SYSTEM_ADMINISTRATOR="There was a problem, <b>no view or id found in session or view not allowed to access area</b>, we could not load any linked to values. Please inform your system administrator!"
|
||||||
COM_COMPONENTBUILDER_THESE_ARE_THE_SAME_PACKAGES_FOUND_ON_A_S_GITHUBA_AND_CAN_BE_IMPORTED_BY_SIMPLY_MAKING_A_SELECTION_AND_THEN_CLICKING_THE_BGET_PACKAGEB_BUTTONBR_SOME_OF_THESE_PACKAGES_WOULD_REQUIRE_A_KEY_SINCE_THEY_ARE_NOT_FREE="These are the same packages found on <a %s >gitHub</a> and can be imported by simply making a selection and then clicking the <b>[Get Package]</b> button.<br />Some of these packages would require a key, since they are not free."
|
COM_COMPONENTBUILDER_THESE_ARE_THE_SAME_PACKAGES_FOUND_ON_A_S_GITHUBA_AND_CAN_BE_IMPORTED_BY_SIMPLY_MAKING_A_SELECTION_AND_THEN_CLICKING_THE_BGET_PACKAGEB_BUTTONBR_SOME_OF_THESE_PACKAGES_WOULD_REQUIRE_A_KEY_SINCE_THEY_ARE_NOT_FREE="These are the same packages found on <a %s >gitHub</a> and can be imported by simply making a selection and then clicking the <b>[Get Package]</b> button.<br />Some of these packages would require a key, since they are not free."
|
||||||
COM_COMPONENTBUILDER_THESE_ARE_THE_SAME_PACKAGES_FOUND_ON_A_S_GITHUBA_AND_CAN_BE_IMPORTED_BY_SIMPLY_MAKING_A_SELECTION_AND_THEN_CLICKING_THE_BGET_PACKAGEB_BUTTONBR_SOME_OF_THESE_PACKAGES_WOULD_REQUIRE_A_KEY_SINCE_THEY_ARE_NOT_FREE_A_S_GET_A_KEY_TODAYA="These are the same packages found on <a %s >gitHub</a> and can be imported by simply making a selection and then clicking the <b>[Get Package]</b> button.<br />Some of these packages would require a key, since they are not free. <a %s >Get a key today!</a>."
|
COM_COMPONENTBUILDER_THESE_ARE_THE_SAME_PACKAGES_FOUND_ON_A_S_GITHUBA_AND_CAN_BE_IMPORTED_BY_SIMPLY_MAKING_A_SELECTION_AND_THEN_CLICKING_THE_BGET_PACKAGEB_BUTTONBR_SOME_OF_THESE_PACKAGES_WOULD_REQUIRE_A_KEY_SINCE_THEY_ARE_NOT_FREE_A_S_GET_A_KEY_TODAYA="These are the same packages found on <a %s >gitHub</a> and can be imported by simply making a selection and then clicking the <b>[Get Package]</b> button.<br />Some of these packages would require a key, since they are not free. <a %s >Get a key today!</a>."
|
||||||
COM_COMPONENTBUILDER_THESE_JOOMLA_POWERS_HAVE_SUCCESSFULLY_BEEN_PUSHED="These Joomla powers have successfully been pushed."
|
COM_COMPONENTBUILDER_THESE_JOOMLA_FIELD_TYPES_HAVE_SUCCESSFULLY_BEEN_PUSHED="These Joomla Field Types have successfully been pushed."
|
||||||
COM_COMPONENTBUILDER_THESE_JOOMLA_POWERS_HAVE_SUCCESSFULLY_BEEN_RESET="These Joomla powers have successfully been reset."
|
COM_COMPONENTBUILDER_THESE_JOOMLA_FIELD_TYPES_HAVE_SUCCESSFULLY_BEEN_RESET="These Joomla Field Types have successfully been reset."
|
||||||
|
COM_COMPONENTBUILDER_THESE_JOOMLA_POWERS_HAVE_SUCCESSFULLY_BEEN_PUSHED="These Joomla Powers have successfully been pushed."
|
||||||
|
COM_COMPONENTBUILDER_THESE_JOOMLA_POWERS_HAVE_SUCCESSFULLY_BEEN_RESET="These Joomla Powers have successfully been reset."
|
||||||
COM_COMPONENTBUILDER_THESE_OPTIONS_ARE_NOT_AVAILABLE_TO_THE_FIELD_IF_BNONE_DBB_OPTION_IS_SELECTED="These options are not available to the field if <b>None DB</b> option is selected."
|
COM_COMPONENTBUILDER_THESE_OPTIONS_ARE_NOT_AVAILABLE_TO_THE_FIELD_IF_BNONE_DBB_OPTION_IS_SELECTED="These options are not available to the field if <b>None DB</b> option is selected."
|
||||||
COM_COMPONENTBUILDER_THESE_OPTIONS_ARE_ONLY_AVAILABLE_TO_THE_FIELD_IF_BSHOW_IN_LIST_VIEWB_OPTION_IS_SELECTED="These options are only available to the field if <b>Show in list view</b> option is selected."
|
COM_COMPONENTBUILDER_THESE_OPTIONS_ARE_ONLY_AVAILABLE_TO_THE_FIELD_IF_BSHOW_IN_LIST_VIEWB_OPTION_IS_SELECTED="These options are only available to the field if <b>Show in list view</b> option is selected."
|
||||||
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_THE_ADMIN_CUSTOM_TABS="The admin custom tabs"
|
COM_COMPONENTBUILDER_THE_ADMIN_CUSTOM_TABS="The admin custom tabs"
|
||||||
COM_COMPONENTBUILDER_THE_ADMIN_FIELDS="The admin fields"
|
COM_COMPONENTBUILDER_THE_ADMIN_FIELDS="The admin fields"
|
||||||
COM_COMPONENTBUILDER_THE_ADMIN_FIELDS_CONDITIONS="The admin fields conditions"
|
COM_COMPONENTBUILDER_THE_ADMIN_FIELDS_CONDITIONS="The admin fields conditions"
|
||||||
@ -9098,15 +9108,19 @@ COM_COMPONENTBUILDER_THE_FILE_PATH_BSB_DOES_NOT_EXIST_AND_WAS_NOT_ADDED="The fil
|
|||||||
COM_COMPONENTBUILDER_THE_FOLDER_PATH_BSB_DOES_NOT_EXIST_AND_WAS_NOT_ADDED="The folder path: <b>%s</b> does not exist, and was not added!"
|
COM_COMPONENTBUILDER_THE_FOLDER_PATH_BSB_DOES_NOT_EXIST_AND_WAS_NOT_ADDED="The folder path: <b>%s</b> does not exist, and was not added!"
|
||||||
COM_COMPONENTBUILDER_THE_FTP_CONNECTION_FOR_BSB_COULD_NOT_BE_MADE_PLEASE_CHECK_YOUR_SIGNATURE_DETAILS="The FTP connection for <b>%s</b> could not be made. Please check your signature details!"
|
COM_COMPONENTBUILDER_THE_FTP_CONNECTION_FOR_BSB_COULD_NOT_BE_MADE_PLEASE_CHECK_YOUR_SIGNATURE_DETAILS="The FTP connection for <b>%s</b> could not be made. Please check your signature details!"
|
||||||
COM_COMPONENTBUILDER_THE_FTP_SIGNATURE_FOR_BSB_WAS_NOT_WELL_FORMED_PLEASE_CHECK_YOUR_SIGNATURE_DETAILS="The FTP signature for <b>%s</b> was not well formed, please check your signature details!"
|
COM_COMPONENTBUILDER_THE_FTP_SIGNATURE_FOR_BSB_WAS_NOT_WELL_FORMED_PLEASE_CHECK_YOUR_SIGNATURE_DETAILS="The FTP signature for <b>%s</b> was not well formed, please check your signature details!"
|
||||||
COM_COMPONENTBUILDER_THE_INITIALIZATION_OF_THIS_JOOMLA_POWERS_HAS_FAILED="The initialization of this Joomla powers has failed."
|
COM_COMPONENTBUILDER_THE_INITIALIZATION_OF_THIS_JOOMLA_FIELD_TYPES_HAS_FAILED="The initialization of this Joomla Field Types has failed."
|
||||||
COM_COMPONENTBUILDER_THE_INITIALIZATION_OF_THIS_POWERS_HAS_FAILED="The initialization of this powers has failed."
|
COM_COMPONENTBUILDER_THE_INITIALIZATION_OF_THIS_JOOMLA_POWERS_HAS_FAILED="The initialization of this Joomla Powers has failed."
|
||||||
COM_COMPONENTBUILDER_THE_JOOMLA_POWER_HAS_SUCCESSFULLY_BEEN_PUSHED="The Joomla power has successfully been pushed."
|
COM_COMPONENTBUILDER_THE_INITIALIZATION_OF_THIS_POWERS_HAS_FAILED="The initialization of this Powers has failed."
|
||||||
COM_COMPONENTBUILDER_THE_JOOMLA_POWER_HAS_SUCCESSFULLY_BEEN_RESET="The Joomla power has successfully been reset."
|
COM_COMPONENTBUILDER_THE_JOOMLA_FIELD_TYPE_HAS_SUCCESSFULLY_BEEN_PUSHED="The Joomla Field Type has successfully been pushed."
|
||||||
|
COM_COMPONENTBUILDER_THE_JOOMLA_FIELD_TYPE_HAS_SUCCESSFULLY_BEEN_RESET="The Joomla Field Type has successfully been reset."
|
||||||
|
COM_COMPONENTBUILDER_THE_JOOMLA_POWER_HAS_SUCCESSFULLY_BEEN_PUSHED="The Joomla Power has successfully been pushed."
|
||||||
|
COM_COMPONENTBUILDER_THE_JOOMLA_POWER_HAS_SUCCESSFULLY_BEEN_RESET="The Joomla Power has successfully been reset."
|
||||||
COM_COMPONENTBUILDER_THE_KEY_OF_THIS_PACKAGE="The key of this package."
|
COM_COMPONENTBUILDER_THE_KEY_OF_THIS_PACKAGE="The key of this package."
|
||||||
COM_COMPONENTBUILDER_THE_LIBRARY_CONFIG_FIELDS="The library config fields"
|
COM_COMPONENTBUILDER_THE_LIBRARY_CONFIG_FIELDS="The library config fields"
|
||||||
COM_COMPONENTBUILDER_THE_LIBRARY_FILES_FOLDERS_URLS="The library files, folders & URLs"
|
COM_COMPONENTBUILDER_THE_LIBRARY_FILES_FOLDERS_URLS="The library files, folders & URLs"
|
||||||
COM_COMPONENTBUILDER_THE_LOCAL_DATABASE_JOOMLA_POWERS_HAS_SUCCESSFULLY_BEEN_SYNCED_WITH_THE_REMOTE_REPOSITORIES="The local database Joomla powers has successfully been synced with the remote repositories."
|
COM_COMPONENTBUILDER_THE_LOCAL_DATABASE_JOOMLA_FIELD_TYPES_HAS_SUCCESSFULLY_BEEN_SYNCED_WITH_THE_REMOTE_REPOSITORIES="The local database Joomla Field Types has successfully been synced with the remote repositories."
|
||||||
COM_COMPONENTBUILDER_THE_LOCAL_DATABASE_POWERS_HAS_SUCCESSFULLY_BEEN_SYNCED_WITH_THE_REMOTE_REPOSITORIES="The local database powers has successfully been synced with the remote repositories."
|
COM_COMPONENTBUILDER_THE_LOCAL_DATABASE_JOOMLA_POWERS_HAS_SUCCESSFULLY_BEEN_SYNCED_WITH_THE_REMOTE_REPOSITORIES="The local database Joomla Powers has successfully been synced with the remote repositories."
|
||||||
|
COM_COMPONENTBUILDER_THE_LOCAL_DATABASE_POWERS_HAS_SUCCESSFULLY_BEEN_SYNCED_WITH_THE_REMOTE_REPOSITORIES="The local database Powers has successfully been synced with the remote repositories."
|
||||||
COM_COMPONENTBUILDER_THE_LOGIN_TO_BSB_HAS_FAILED_PLEASE_CHECK_THAT_YOUR_DETAILS_ARE_CORRECT="The login to <b>%s</b> has failed, please check that your details are correct!"
|
COM_COMPONENTBUILDER_THE_LOGIN_TO_BSB_HAS_FAILED_PLEASE_CHECK_THAT_YOUR_DETAILS_ARE_CORRECT="The login to <b>%s</b> has failed, please check that your details are correct!"
|
||||||
COM_COMPONENTBUILDER_THE_MODULE_FILES_FOLDERS="The module files & folders"
|
COM_COMPONENTBUILDER_THE_MODULE_FILES_FOLDERS="The module files & folders"
|
||||||
COM_COMPONENTBUILDER_THE_MODULE_UPDATES="The module updates"
|
COM_COMPONENTBUILDER_THE_MODULE_UPDATES="The module updates"
|
||||||
@ -9122,15 +9136,19 @@ COM_COMPONENTBUILDER_THE_POWER_HAS_SUCCESSFULLY_BEEN_RESET="The power has succes
|
|||||||
COM_COMPONENTBUILDER_THE_PRIVATE_KEY_FIELD_COULD_NOT_BE_LOADED_FOR_BSB_SERVER="The private key field could not be loaded for <b>%s</b> server!"
|
COM_COMPONENTBUILDER_THE_PRIVATE_KEY_FIELD_COULD_NOT_BE_LOADED_FOR_BSB_SERVER="The private key field could not be loaded for <b>%s</b> server!"
|
||||||
COM_COMPONENTBUILDER_THE_PRIVATE_KEY_FILE_COULD_NOT_BE_LOADEDFOUND_FOR_BSB_SERVER="The private key file could not be loaded/found for <b>%s</b> server!"
|
COM_COMPONENTBUILDER_THE_PRIVATE_KEY_FILE_COULD_NOT_BE_LOADEDFOUND_FOR_BSB_SERVER="The private key file could not be loaded/found for <b>%s</b> server!"
|
||||||
COM_COMPONENTBUILDER_THE_PRO_BOARD_IS_LOADING="The pro board is loading"
|
COM_COMPONENTBUILDER_THE_PRO_BOARD_IS_LOADING="The pro board is loading"
|
||||||
COM_COMPONENTBUILDER_THE_PUSH_OF_THESE_JOOMLA_POWERS_HAS_FAILED="The push of these Joomla powers has failed."
|
COM_COMPONENTBUILDER_THE_PUSH_OF_THESE_JOOMLA_FIELD_TYPES_HAS_FAILED="The push of these Joomla Field Types has failed."
|
||||||
COM_COMPONENTBUILDER_THE_PUSH_OF_THESE_POWERS_HAS_FAILED="The push of these powers has failed."
|
COM_COMPONENTBUILDER_THE_PUSH_OF_THESE_JOOMLA_POWERS_HAS_FAILED="The push of these Joomla Powers has failed."
|
||||||
COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_JOOMLA_POWER_HAS_FAILED="The push of this Joomla power has failed."
|
COM_COMPONENTBUILDER_THE_PUSH_OF_THESE_POWERS_HAS_FAILED="The push of these Powers has failed."
|
||||||
|
COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_JOOMLA_FIELD_TYPE_HAS_FAILED="The push of this Joomla Field Type has failed."
|
||||||
|
COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_JOOMLA_POWER_HAS_FAILED="The push of this Joomla 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_POWER_HAS_FAILED="The push of this power has failed."
|
||||||
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_RESET_OF_THESE_JOOMLA_POWERS_HAS_FAILED="The reset of these Joomla powers has failed."
|
COM_COMPONENTBUILDER_THE_RESET_OF_THESE_JOOMLA_FIELD_TYPES_HAS_FAILED="The reset of these Joomla Field Types has failed."
|
||||||
COM_COMPONENTBUILDER_THE_RESET_OF_THESE_POWERS_HAS_FAILED="The reset of these powers has failed."
|
COM_COMPONENTBUILDER_THE_RESET_OF_THESE_JOOMLA_POWERS_HAS_FAILED="The reset of these Joomla Powers has failed."
|
||||||
COM_COMPONENTBUILDER_THE_RESET_OF_THIS_JOOMLA_POWER_HAS_FAILED="The reset of this Joomla power has failed."
|
COM_COMPONENTBUILDER_THE_RESET_OF_THESE_POWERS_HAS_FAILED="The reset of these Powers has failed."
|
||||||
|
COM_COMPONENTBUILDER_THE_RESET_OF_THIS_JOOMLA_FIELD_TYPE_HAS_FAILED="The reset of this Joomla Field Type has failed."
|
||||||
|
COM_COMPONENTBUILDER_THE_RESET_OF_THIS_JOOMLA_POWER_HAS_FAILED="The reset of this Joomla 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_POWER_HAS_FAILED="The reset of this power has failed."
|
||||||
COM_COMPONENTBUILDER_THE_SEARCH_FOR_THE_SNIPPETS_ARE_CASE_SENSITIVE_SO_IF_YOU_CHANGED_THE_LOCAL_BNAMESB_OF_EITHER_OR_THE_BSNIPPET_LIBRARY_OR_SNIPPET_TYPESB_IN_ANY_SMALL_WAY_THE_SYSTEM_WILL_NOT_BE_ABLE_TO_CONNECT_YOUR_LOCAL_SNIPPETS_WITH_THOSE_IN_THE_COMMUNITY_REPOSITORY_SO_WE_STRONGLY_ADVICE_TO_BKEEP_TO_THE_COMMUNITY_NAMINGB_TO_AVOID_MISMATCHING_THAT_WILL_IN_TURN_CAUSE_DUPLICATION_SO_IF_YOU_CHANGED_ANY_NAMES_JUST_CHANGE_THEM_BACK_AND_ALL_WILL_AGAIN_WORK_AS_EXPECTED="The search for the snippets are case sensitive so if you changed the local <b>names</b> of either or the <b>snippet, library or snippet types</b> in any small way, the system will not be able to connect your local snippets with those in the community repository. So we strongly advice to <b>keep to the community naming</b> to avoid mismatching, that will in turn cause duplication. So if you changed any names, just change them back and all will again work as expected."
|
COM_COMPONENTBUILDER_THE_SEARCH_FOR_THE_SNIPPETS_ARE_CASE_SENSITIVE_SO_IF_YOU_CHANGED_THE_LOCAL_BNAMESB_OF_EITHER_OR_THE_BSNIPPET_LIBRARY_OR_SNIPPET_TYPESB_IN_ANY_SMALL_WAY_THE_SYSTEM_WILL_NOT_BE_ABLE_TO_CONNECT_YOUR_LOCAL_SNIPPETS_WITH_THOSE_IN_THE_COMMUNITY_REPOSITORY_SO_WE_STRONGLY_ADVICE_TO_BKEEP_TO_THE_COMMUNITY_NAMINGB_TO_AVOID_MISMATCHING_THAT_WILL_IN_TURN_CAUSE_DUPLICATION_SO_IF_YOU_CHANGED_ANY_NAMES_JUST_CHANGE_THEM_BACK_AND_ALL_WILL_AGAIN_WORK_AS_EXPECTED="The search for the snippets are case sensitive so if you changed the local <b>names</b> of either or the <b>snippet, library or snippet types</b> in any small way, the system will not be able to connect your local snippets with those in the community repository. So we strongly advice to <b>keep to the community naming</b> to avoid mismatching, that will in turn cause duplication. So if you changed any names, just change them back and all will again work as expected."
|
||||||
COM_COMPONENTBUILDER_THE_SEARCH_PROCESS_HAD_AN_ERROR_WITH_TABLE="The search process had an error with table"
|
COM_COMPONENTBUILDER_THE_SEARCH_PROCESS_HAD_AN_ERROR_WITH_TABLE="The search process had an error with table"
|
||||||
@ -9375,15 +9393,18 @@ COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_ACCESS_THE_SERVER_DETAILS_BS_
|
|||||||
COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_CLONE_A_COMPONENT_PLEASE_CONTACT_YOUR_SYSTEM_ADMINISTRATOR_FOR_MORE_HELP="You do not have permission to clone a component, please contact your system administrator for more help."
|
COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_CLONE_A_COMPONENT_PLEASE_CONTACT_YOUR_SYSTEM_ADMINISTRATOR_FOR_MORE_HELP="You do not have permission to clone a component, please contact your system administrator for more help."
|
||||||
COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_DOWNLOAD_THE_COMPILER_ANIMATIONS="You do not have permission to download the compiler animations!"
|
COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_DOWNLOAD_THE_COMPILER_ANIMATIONS="You do not have permission to download the compiler animations!"
|
||||||
COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_IMPORT_A_COMPONENT_PLEASE_CONTACT_YOUR_SYSTEM_ADMINISTRATOR_FOR_MORE_HELP="You do not have permission to import a component, please contact your system administrator for more help."
|
COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_IMPORT_A_COMPONENT_PLEASE_CONTACT_YOUR_SYSTEM_ADMINISTRATOR_FOR_MORE_HELP="You do not have permission to import a component, please contact your system administrator for more help."
|
||||||
COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_INITIALIZE_JOOMLA_POWERS="You do not have permission to initialize Joomla powers"
|
COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_INITIALIZE_JOOMLA_FIELD_TYPES="You do not have permission to initialize Joomla Field Types"
|
||||||
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_JOOMLA_POWERS="You do not have permission to initialize Joomla 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_INSTALL_THESE_EXTENSIONS="You do not have permission to install these extensions!"
|
COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_INSTALL_THESE_EXTENSIONS="You do not have permission to install these extensions!"
|
||||||
COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_INSTALL_THE_COMPONENT="You do not have permission to install the component!"
|
COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_INSTALL_THE_COMPONENT="You do not have permission to install the component!"
|
||||||
COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_INSTALL_THE_MODULE="You do not have permission to install the module!"
|
COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_INSTALL_THE_MODULE="You do not have permission to install the module!"
|
||||||
COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_INSTALL_THE_PLUGIN="You do not have permission to install the plugin!"
|
COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_INSTALL_THE_PLUGIN="You do not have permission to install the plugin!"
|
||||||
COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_PUSH_THIS_JOOMLA_POWER="You do not have permission to push this Joomla power"
|
COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_PUSH_THIS_JOOMLA_FIELD_TYPE="You do not have permission to push this Joomla Field Type"
|
||||||
|
COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_PUSH_THIS_JOOMLA_POWER="You do not have permission to push this Joomla 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_POWER="You do not have permission to push this power"
|
||||||
COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_RESET_THIS_JOOMLA_POWER="You do not have permission to reset this Joomla power"
|
COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_RESET_THIS_JOOMLA_FIELD_TYPE="You do not have permission to reset this Joomla Field Type"
|
||||||
|
COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_RESET_THIS_JOOMLA_POWER="You do not have permission to reset this Joomla 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_POWER="You do not have permission to reset this power"
|
||||||
COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_RUN_THE_GET_BOILERPLATE_MODULE="You do not have permission to run the get boilerplate module!"
|
COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_RUN_THE_GET_BOILERPLATE_MODULE="You do not have permission to run the get boilerplate module!"
|
||||||
COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_RUN_THE_TRANSLATOR_MODULE="You do not have permission to run the translator module!"
|
COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_RUN_THE_TRANSLATOR_MODULE="You do not have permission to run the translator module!"
|
||||||
@ -9395,7 +9416,8 @@ COM_COMPONENTBUILDER_YOU_MUST_ADD_AN_UNIQUE_PLACEHOLDER="You must add an unique
|
|||||||
COM_COMPONENTBUILDER_YOU_MUST_ADD_AN_UNIQUE_VALIDATION_RULE_NAME="You must add an unique validation rule name."
|
COM_COMPONENTBUILDER_YOU_MUST_ADD_AN_UNIQUE_VALIDATION_RULE_NAME="You must add an unique validation rule name."
|
||||||
COM_COMPONENTBUILDER_YOU_MUST_ENABLE_THE_BTIDYB_EXTENSION_IN_YOUR_PHPINI_FILE_SO_WE_CAN_TIDY_UP_YOUR_XML_IF_YOU_NEED_HELP_PLEASE_A_SSTART_HEREA="You must enable the <b>Tidy</b> extension in your php.ini file so we can tidy up your xml! If you need help please <a %s>start here</a>!"
|
COM_COMPONENTBUILDER_YOU_MUST_ENABLE_THE_BTIDYB_EXTENSION_IN_YOUR_PHPINI_FILE_SO_WE_CAN_TIDY_UP_YOUR_XML_IF_YOU_NEED_HELP_PLEASE_A_SSTART_HEREA="You must enable the <b>Tidy</b> extension in your php.ini file so we can tidy up your xml! If you need help please <a %s>start here</a>!"
|
||||||
COM_COMPONENTBUILDER_YOU_MUST_FIRST_LINK_AN_ADMIN_OR_A_CUSTOM_ADMIN_VIEW_TO_THIS_COMPONENT_THEN_YOU_CAN_SELECT_IT_HERE="You must first link an admin or a custom admin view to this component, then you can select it here"
|
COM_COMPONENTBUILDER_YOU_MUST_FIRST_LINK_AN_ADMIN_OR_A_CUSTOM_ADMIN_VIEW_TO_THIS_COMPONENT_THEN_YOU_CAN_SELECT_IT_HERE="You must first link an admin or a custom admin view to this component, then you can select it here"
|
||||||
COM_COMPONENTBUILDER_YOU_MUST_FIRST_SAVE_THE_JOOMLA_POWER_BEFORE_YOU_CAN_USE_THIS_FEATURE="You must first save the Joomla power, before you can use this feature."
|
COM_COMPONENTBUILDER_YOU_MUST_FIRST_SAVE_THE_JOOMLA_FIELD_TYPE_BEFORE_YOU_CAN_USE_THIS_FEATURE="You must first save the Joomla Field Type, before you can use this feature."
|
||||||
|
COM_COMPONENTBUILDER_YOU_MUST_FIRST_SAVE_THE_JOOMLA_POWER_BEFORE_YOU_CAN_USE_THIS_FEATURE="You must first save the Joomla 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_POWER_BEFORE_YOU_CAN_USE_THIS_FEATURE="You must first save the power, before you can use this feature."
|
||||||
COM_COMPONENTBUILDER_YOU_MUST_SELECT_A_COMPONENT="You must select a component!"
|
COM_COMPONENTBUILDER_YOU_MUST_SELECT_A_COMPONENT="You must select a component!"
|
||||||
COM_COMPONENTBUILDER_YOU_SHOULD_ADD_THE_CORRECT_OWNER_DETAILS="You should add the correct owner details."
|
COM_COMPONENTBUILDER_YOU_SHOULD_ADD_THE_CORRECT_OWNER_DETAILS="You should add the correct owner details."
|
||||||
|
@ -552,6 +552,12 @@ COM_COMPONENTBUILDER_FIELDTYPES_EDIT_VERSION="Fieldtypes Edit Version"
|
|||||||
COM_COMPONENTBUILDER_FIELDTYPES_EDIT_VERSION_DESC="Allows the users in this group to edit versions of version fieldtypes"
|
COM_COMPONENTBUILDER_FIELDTYPES_EDIT_VERSION_DESC="Allows the users in this group to edit versions of version fieldtypes"
|
||||||
COM_COMPONENTBUILDER_FIELDTYPES_SUBMENU="Fieldtypes Submenu"
|
COM_COMPONENTBUILDER_FIELDTYPES_SUBMENU="Fieldtypes Submenu"
|
||||||
COM_COMPONENTBUILDER_FIELDTYPES_SUBMENU_DESC="Allows the users in this group to submenu of fieldtype"
|
COM_COMPONENTBUILDER_FIELDTYPES_SUBMENU_DESC="Allows the users in this group to submenu of fieldtype"
|
||||||
|
COM_COMPONENTBUILDER_FIELDTYPE_INIT_BUTTON_ACCESS="Fieldtype Init Button Access"
|
||||||
|
COM_COMPONENTBUILDER_FIELDTYPE_INIT_BUTTON_ACCESS_DESC="Allows the users in this group to access the init button."
|
||||||
|
COM_COMPONENTBUILDER_FIELDTYPE_PUSH_BUTTON_ACCESS="Fieldtype Push Button Access"
|
||||||
|
COM_COMPONENTBUILDER_FIELDTYPE_PUSH_BUTTON_ACCESS_DESC="Allows the users in this group to access the push button."
|
||||||
|
COM_COMPONENTBUILDER_FIELDTYPE_RESET_BUTTON_ACCESS="Fieldtype Reset Button Access"
|
||||||
|
COM_COMPONENTBUILDER_FIELDTYPE_RESET_BUTTON_ACCESS_DESC="Allows the users in this group to access the reset button."
|
||||||
COM_COMPONENTBUILDER_GET_SNIPPETS_ACCESS="Get Snippets Access"
|
COM_COMPONENTBUILDER_GET_SNIPPETS_ACCESS="Get Snippets Access"
|
||||||
COM_COMPONENTBUILDER_GET_SNIPPETS_ACCESS_DESC="Allows the users in this group to access get snippets."
|
COM_COMPONENTBUILDER_GET_SNIPPETS_ACCESS_DESC="Allows the users in this group to access get snippets."
|
||||||
COM_COMPONENTBUILDER_GET_SNIPPETS_CUSTOM_ADMIN_VIEWS_BUTTON_ACCESS="Get Snippets Custom Admin Views Button Access"
|
COM_COMPONENTBUILDER_GET_SNIPPETS_CUSTOM_ADMIN_VIEWS_BUTTON_ACCESS="Get Snippets Custom Admin Views Button Access"
|
||||||
|
File diff suppressed because one or more lines are too long
@ -24,6 +24,8 @@ 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\Fieldtype\Factory as FieldtypeFactory;
|
||||||
|
use VDM\Joomla\Utilities\GetHelper;
|
||||||
|
|
||||||
// No direct access to this file
|
// No direct access to this file
|
||||||
\defined('_JEXEC') or die;
|
\defined('_JEXEC') or die;
|
||||||
@ -62,6 +64,221 @@ class FieldtypeController extends FormController
|
|||||||
*/
|
*/
|
||||||
protected $view_list = 'fieldtypes';
|
protected $view_list = 'fieldtypes';
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Initializes all remote Joomla Field Types and syncs them with the local database.
|
||||||
|
*
|
||||||
|
* This function performs several checks and operations:
|
||||||
|
* 1. It verifies the authenticity of the request to prevent request forgery.
|
||||||
|
* 2. It checks whether the current user has the necessary permissions to initialize the Joomla Field Types.
|
||||||
|
* 3. If the user is authorized, it attempts to initialize the remote Joomla Field Types.
|
||||||
|
* 4. Depending on the result of the initialization operation, it sets the appropriate success or error message.
|
||||||
|
* 5. It redirects the user to a specified URL with the result message and status.
|
||||||
|
*
|
||||||
|
* @return bool True on successful initialization, false on failure.
|
||||||
|
*/
|
||||||
|
public function initPowers()
|
||||||
|
{
|
||||||
|
// Check for request forgeries
|
||||||
|
Session::checkToken() or die(Text::_('JINVALID_TOKEN'));
|
||||||
|
|
||||||
|
// check if user has the right
|
||||||
|
$user = Factory::getUser();
|
||||||
|
|
||||||
|
// set default error message
|
||||||
|
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PERMISSION_DENIED') . '</h1>';
|
||||||
|
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_INITIALIZE_JOOMLA_FIELD_TYPES') . '</p>';
|
||||||
|
$status = 'error';
|
||||||
|
$success = false;
|
||||||
|
|
||||||
|
if($user->authorise('fieldtype.init', 'com_componentbuilder'))
|
||||||
|
{
|
||||||
|
try {
|
||||||
|
if (FieldtypeFactory::_('Joomla.Fieldtype.Remote.Get')->init())
|
||||||
|
{
|
||||||
|
// set success message
|
||||||
|
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_SUCCESSFULLY_INITIALIZED_ALL_REMOTE_JOOMLA_POWERS') . '</h1>';
|
||||||
|
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_LOCAL_DATABASE_JOOMLA_FIELD_TYPES_HAS_SUCCESSFULLY_BEEN_SYNCED_WITH_THE_REMOTE_REPOSITORIES') . '</p>';
|
||||||
|
|
||||||
|
$status = 'success';
|
||||||
|
$success = true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_INITIALIZATION_FAILED') . '</h1>';
|
||||||
|
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_INITIALIZATION_OF_THIS_JOOMLA_FIELD_TYPES_HAS_FAILED') . '</p>';
|
||||||
|
}
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_INITIALIZATION_FAILED') . '</h1>';
|
||||||
|
$message .= '<p>' . \htmlspecialchars($e->getMessage()) . '</p>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// set redirect
|
||||||
|
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=fieldtypes', $success);
|
||||||
|
$this->setRedirect($redirect_url, $message, $status);
|
||||||
|
|
||||||
|
return $success;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Resets the selected Joomla Field Types.
|
||||||
|
*
|
||||||
|
* 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 Joomla Field Types.
|
||||||
|
* 6. If the user is authorized and powers are selected, it attempts to reset the selected Joomla Field Types.
|
||||||
|
* 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.
|
||||||
|
*/
|
||||||
|
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=fieldtypes', false);
|
||||||
|
$this->setRedirect($redirect_url, $message, 'error');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
$status = 'error';
|
||||||
|
$success = false;
|
||||||
|
|
||||||
|
// check if user has the right
|
||||||
|
$user = Factory::getUser();
|
||||||
|
if($user->authorise('fieldtype.reset', 'com_componentbuilder'))
|
||||||
|
{
|
||||||
|
$guids = GetHelper::vars('fieldtype', $pks, 'id', 'guid');
|
||||||
|
|
||||||
|
try {
|
||||||
|
if (FieldtypeFactory::_('Joomla.Fieldtype.Remote.Get')->reset($guids))
|
||||||
|
{
|
||||||
|
// set success message
|
||||||
|
$message = '<h1>'.Text::_('COM_COMPONENTBUILDER_SUCCESS').'</h1>';
|
||||||
|
$message .= '<p>'.Text::_('COM_COMPONENTBUILDER_THESE_JOOMLA_FIELD_TYPES_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_JOOMLA_FIELD_TYPES_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=fieldtypes', $success);
|
||||||
|
$this->setRedirect($redirect_url, $message, $status);
|
||||||
|
|
||||||
|
return $success;
|
||||||
|
}
|
||||||
|
|
||||||
|
// set redirect
|
||||||
|
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=fieldtypes', false);
|
||||||
|
$this->setRedirect($redirect_url);
|
||||||
|
return $success;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Pushes the selected Joomla Field Types.
|
||||||
|
*
|
||||||
|
* 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 Joomla Field Types.
|
||||||
|
* 6. If the user is authorized and powers are selected, it attempts to push the selected Joomla Field Types.
|
||||||
|
* 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.
|
||||||
|
*/
|
||||||
|
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=fieldtypes', false);
|
||||||
|
$this->setRedirect($redirect_url, $message, 'error');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
$status = 'error';
|
||||||
|
$success = false;
|
||||||
|
|
||||||
|
// check if user has the right
|
||||||
|
$user = Factory::getUser();
|
||||||
|
if($user->authorise('fieldtype.push', 'com_componentbuilder'))
|
||||||
|
{
|
||||||
|
$guids = GetHelper::vars('fieldtype', $pks, 'id', 'guid');
|
||||||
|
|
||||||
|
try {
|
||||||
|
if (FieldtypeFactory::_('Joomla.Fieldtype.Remote.Set')->items($guids))
|
||||||
|
{
|
||||||
|
// set success message
|
||||||
|
$message = '<h1>'.Text::_('COM_COMPONENTBUILDER_SUCCESS').'</h1>';
|
||||||
|
$message .= '<p>'.Text::_('COM_COMPONENTBUILDER_THESE_JOOMLA_FIELD_TYPES_HAVE_SUCCESSFULLY_BEEN_PUSHED').'</p>';
|
||||||
|
$status = 'success';
|
||||||
|
$success = true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PUSH_FAILED') . '</h1>';
|
||||||
|
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_PUSH_OF_THESE_JOOMLA_FIELD_TYPES_HAS_FAILED') . '</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=fieldtypes', $success);
|
||||||
|
$this->setRedirect($redirect_url, $message, $status);
|
||||||
|
|
||||||
|
return $success;
|
||||||
|
}
|
||||||
|
|
||||||
|
// set redirect
|
||||||
|
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=fieldtypes', false);
|
||||||
|
$this->setRedirect($redirect_url);
|
||||||
|
return $success;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Method override to check if you can add a new record.
|
* Method override to check if you can add a new record.
|
||||||
*
|
*
|
||||||
|
@ -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\Fieldtype\Factory as FieldtypeFactory;
|
||||||
|
|
||||||
// No direct access to this file
|
// No direct access to this file
|
||||||
\defined('_JEXEC') or die;
|
\defined('_JEXEC') or die;
|
||||||
@ -51,4 +52,155 @@ class FieldtypesController extends AdminController
|
|||||||
{
|
{
|
||||||
return parent::getModel($name, $prefix, $config);
|
return parent::getModel($name, $prefix, $config);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Resets the specified Joomla Field Type.
|
||||||
|
*
|
||||||
|
* 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 Joomla Field Type.
|
||||||
|
* 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 Joomla Field Type.
|
||||||
|
* 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.
|
||||||
|
*/
|
||||||
|
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 = Factory::getUser();
|
||||||
|
|
||||||
|
// 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_JOOMLA_FIELD_TYPE') . '</p>';
|
||||||
|
$status = 'error';
|
||||||
|
$success = false;
|
||||||
|
|
||||||
|
// load the ID
|
||||||
|
$id = $item['id'] ?? null;
|
||||||
|
$guid = $item['guid'] ?? 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_JOOMLA_FIELD_TYPE_BEFORE_YOU_CAN_USE_THIS_FEATURE') . '</p>';
|
||||||
|
}
|
||||||
|
elseif($user->authorise('fieldtype.reset', 'com_componentbuilder'))
|
||||||
|
{
|
||||||
|
try {
|
||||||
|
if (FieldtypeFactory::_('Joomla.Fieldtype.Remote.Get')->reset([$guid]))
|
||||||
|
{
|
||||||
|
// set success message
|
||||||
|
$message = '<h1>'.Text::_('COM_COMPONENTBUILDER_SUCCESS').'</h1>';
|
||||||
|
$message .= '<p>'.Text::_('COM_COMPONENTBUILDER_THE_JOOMLA_FIELD_TYPE_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_JOOMLA_FIELD_TYPE_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=fieldtype'
|
||||||
|
. $this->getRedirectToItemAppend($id), $success
|
||||||
|
);
|
||||||
|
|
||||||
|
$this->setRedirect($redirect_url, $message, $status);
|
||||||
|
|
||||||
|
return $success;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Pushes the specified Joomla Field Type.
|
||||||
|
*
|
||||||
|
* 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 Joomla Field Type.
|
||||||
|
* 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 Joomla Field Type.
|
||||||
|
* 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.
|
||||||
|
*/
|
||||||
|
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 = Factory::getUser();
|
||||||
|
|
||||||
|
// 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_JOOMLA_FIELD_TYPE') . '</p>';
|
||||||
|
$status = 'error';
|
||||||
|
$success = false;
|
||||||
|
|
||||||
|
// load the ID
|
||||||
|
$id = $item['id'] ?? null;
|
||||||
|
$guid = $item['guid'] ?? 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_JOOMLA_FIELD_TYPE_BEFORE_YOU_CAN_USE_THIS_FEATURE') . '</p>';
|
||||||
|
}
|
||||||
|
elseif($user->authorise('fieldtype.push', 'com_componentbuilder'))
|
||||||
|
{
|
||||||
|
try {
|
||||||
|
if (FieldtypeFactory::_('Joomla.Fieldtype.Remote.Set')->items([$guid]))
|
||||||
|
{
|
||||||
|
// set success message
|
||||||
|
$message = '<h1>'.Text::_('COM_COMPONENTBUILDER_SUCCESS').'</h1>';
|
||||||
|
$message .= '<p>'.Text::_('COM_COMPONENTBUILDER_THE_JOOMLA_FIELD_TYPE_HAS_SUCCESSFULLY_BEEN_PUSHED').'</p>';
|
||||||
|
$status = 'success';
|
||||||
|
$success = true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PUSH_FAILED') . '</h1>';
|
||||||
|
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_JOOMLA_FIELD_TYPE_HAS_FAILED') . '</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=fieldtype'
|
||||||
|
. $this->getRedirectToItemAppend($id), $success
|
||||||
|
);
|
||||||
|
|
||||||
|
$this->setRedirect($redirect_url, $message, $status);
|
||||||
|
|
||||||
|
return $success;
|
||||||
|
}
|
||||||
}
|
}
|
@ -63,15 +63,16 @@ class Joomla_powerController extends FormController
|
|||||||
*/
|
*/
|
||||||
protected $view_list = 'joomla_powers';
|
protected $view_list = 'joomla_powers';
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Resets the specified Joomla power.
|
* Resets the specified Joomla Power.
|
||||||
*
|
*
|
||||||
* This function performs several checks and operations:
|
* This function performs several checks and operations:
|
||||||
* 1. It verifies the authenticity of the request to prevent request forgery.
|
* 1. It verifies the authenticity of the request to prevent request forgery.
|
||||||
* 2. It retrieves the item data posted by the user.
|
* 2. It retrieves the item data posted by the user.
|
||||||
* 3. It checks whether the current user has the necessary permissions to reset the Joomla power.
|
* 3. It checks whether the current user has the necessary permissions to reset the Joomla Power.
|
||||||
* 4. It validates the presence of the necessary item identifiers (ID and GUID).
|
* 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 power.
|
* 5. If the user is authorized and the identifiers are valid, it attempts to reset the specified Joomla Power.
|
||||||
* 6. Depending on the result of the reset operation, it sets the appropriate success or error message.
|
* 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.
|
* 7. It redirects the user to a specified URL with the result message and status.
|
||||||
*
|
*
|
||||||
@ -139,14 +140,14 @@ class Joomla_powerController extends FormController
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Pushes the specified Joomla power.
|
* Pushes the specified Joomla Power.
|
||||||
*
|
*
|
||||||
* This function performs several checks and operations:
|
* This function performs several checks and operations:
|
||||||
* 1. It verifies the authenticity of the request to prevent request forgery.
|
* 1. It verifies the authenticity of the request to prevent request forgery.
|
||||||
* 2. It retrieves the item data posted by the user.
|
* 2. It retrieves the item data posted by the user.
|
||||||
* 3. It checks whether the current user has the necessary permissions to push the Joomla power.
|
* 3. It checks whether the current user has the necessary permissions to push the Joomla Power.
|
||||||
* 4. It validates the presence of the necessary item identifiers (ID and GUID).
|
* 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 power.
|
* 5. If the user is authorized and the identifiers are valid, it attempts to push the specified Joomla Power.
|
||||||
* 6. Depending on the result of the push operation, it sets the appropriate success or error message.
|
* 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.
|
* 7. It redirects the user to a specified URL with the result message and status.
|
||||||
*
|
*
|
||||||
|
@ -54,13 +54,14 @@ class Joomla_powersController extends AdminController
|
|||||||
return parent::getModel($name, $prefix, $config);
|
return parent::getModel($name, $prefix, $config);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Initializes all remote Joomla powers and syncs them with the local database.
|
* Initializes all remote Joomla Powers and syncs them with the local database.
|
||||||
*
|
*
|
||||||
* This function performs several checks and operations:
|
* This function performs several checks and operations:
|
||||||
* 1. It verifies the authenticity of the request to prevent request forgery.
|
* 1. It verifies the authenticity of the request to prevent request forgery.
|
||||||
* 2. It checks whether the current user has the necessary permissions to initialize the Joomla powers.
|
* 2. It checks whether the current user has the necessary permissions to initialize the Joomla Powers.
|
||||||
* 3. If the user is authorized, it attempts to initialize the remote Joomla powers.
|
* 3. If the user is authorized, it attempts to initialize the remote Joomla Powers.
|
||||||
* 4. Depending on the result of the initialization operation, it sets the appropriate success or error message.
|
* 4. Depending on the result of the initialization operation, it sets the appropriate success or error message.
|
||||||
* 5. It redirects the user to a specified URL with the result message and status.
|
* 5. It redirects the user to a specified URL with the result message and status.
|
||||||
*
|
*
|
||||||
@ -111,15 +112,15 @@ class Joomla_powersController extends AdminController
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Resets the selected Joomla powers.
|
* Resets the selected Joomla Powers.
|
||||||
*
|
*
|
||||||
* This function performs several checks and operations:
|
* This function performs several checks and operations:
|
||||||
* 1. It verifies the authenticity of the request to prevent request forgery.
|
* 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.
|
* 2. It retrieves the IDs of the selected powers from the user input.
|
||||||
* 3. It sanitizes the input by converting the IDs to integers.
|
* 3. It sanitizes the input by converting the IDs to integers.
|
||||||
* 4. It checks whether any powers have been selected.
|
* 4. It checks whether any powers have been selected.
|
||||||
* 5. It checks whether the current user has the necessary permissions to reset the selected Joomla powers.
|
* 5. It checks whether the current user has the necessary permissions to reset the selected Joomla Powers.
|
||||||
* 6. If the user is authorized and powers are selected, it attempts to reset the selected Joomla powers.
|
* 6. If the user is authorized and powers are selected, it attempts to reset the selected Joomla Powers.
|
||||||
* 7. Depending on the result of the reset operation, it sets the appropriate success or error message.
|
* 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.
|
* 8. It redirects the user to a specified URL with the result message and status.
|
||||||
*
|
*
|
||||||
@ -190,15 +191,15 @@ class Joomla_powersController extends AdminController
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Pushes the selected Joomla powers.
|
* Pushes the selected Joomla Powers.
|
||||||
*
|
*
|
||||||
* This function performs several checks and operations:
|
* This function performs several checks and operations:
|
||||||
* 1. It verifies the authenticity of the request to prevent request forgery.
|
* 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.
|
* 2. It retrieves the IDs of the selected powers from the user input.
|
||||||
* 3. It sanitizes the input by converting the IDs to integers.
|
* 3. It sanitizes the input by converting the IDs to integers.
|
||||||
* 4. It checks whether any powers have been selected.
|
* 4. It checks whether any powers have been selected.
|
||||||
* 5. It checks whether the current user has the necessary permissions to push the selected Joomla powers.
|
* 5. It checks whether the current user has the necessary permissions to push the selected Joomla Powers.
|
||||||
* 6. If the user is authorized and powers are selected, it attempts to push the selected Joomla powers.
|
* 6. If the user is authorized and powers are selected, it attempts to push the selected Joomla Powers.
|
||||||
* 7. Depending on the result of the push operation, it sets the appropriate success or error message.
|
* 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.
|
* 8. It redirects the user to a specified URL with the result message and status.
|
||||||
*
|
*
|
||||||
|
@ -63,6 +63,7 @@ class PowerController extends FormController
|
|||||||
*/
|
*/
|
||||||
protected $view_list = 'powers';
|
protected $view_list = 'powers';
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Resets the specified power.
|
* Resets the specified power.
|
||||||
*
|
*
|
||||||
@ -107,18 +108,23 @@ class PowerController extends FormController
|
|||||||
}
|
}
|
||||||
elseif($user->authorise('power.reset', 'com_componentbuilder'))
|
elseif($user->authorise('power.reset', 'com_componentbuilder'))
|
||||||
{
|
{
|
||||||
if (PowerFactory::_('Power.Remote.Get')->reset([$guid]))
|
try {
|
||||||
{
|
if (PowerFactory::_('Power.Remote.Get')->reset([$guid]))
|
||||||
// set success message
|
{
|
||||||
$message = '<h1>'.Text::_('COM_COMPONENTBUILDER_SUCCESS').'</h1>';
|
// set success message
|
||||||
$message .= '<p>'.Text::_('COM_COMPONENTBUILDER_THE_POWER_HAS_SUCCESSFULLY_BEEN_RESET').'</p>';
|
$message = '<h1>'.Text::_('COM_COMPONENTBUILDER_SUCCESS').'</h1>';
|
||||||
$status = 'success';
|
$message .= '<p>'.Text::_('COM_COMPONENTBUILDER_THE_POWER_HAS_SUCCESSFULLY_BEEN_RESET').'</p>';
|
||||||
$success = true;
|
$status = 'success';
|
||||||
}
|
$success = true;
|
||||||
else
|
}
|
||||||
{
|
else
|
||||||
|
{
|
||||||
|
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_RESET_FAILED') . '</h1>';
|
||||||
|
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_RESET_OF_THIS_POWER_HAS_FAILED') . '</p>';
|
||||||
|
}
|
||||||
|
} catch (\Exception $e) {
|
||||||
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_RESET_FAILED') . '</h1>';
|
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_RESET_FAILED') . '</h1>';
|
||||||
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_RESET_OF_THIS_POWER_HAS_FAILED') . '</p>';
|
$message .= '<p>' . \htmlspecialchars($e->getMessage()) . '</p>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -54,13 +54,14 @@ class PowersController extends AdminController
|
|||||||
return parent::getModel($name, $prefix, $config);
|
return parent::getModel($name, $prefix, $config);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Initializes all remote powers and syncs them with the local database.
|
* Initializes all remote Powers and syncs them with the local database.
|
||||||
*
|
*
|
||||||
* This function performs several checks and operations:
|
* This function performs several checks and operations:
|
||||||
* 1. It verifies the authenticity of the request to prevent request forgery.
|
* 1. It verifies the authenticity of the request to prevent request forgery.
|
||||||
* 2. It checks whether the current user has the necessary permissions to initialize the powers.
|
* 2. It checks whether the current user has the necessary permissions to initialize the Powers.
|
||||||
* 3. If the user is authorized, it attempts to initialize the remote powers.
|
* 3. If the user is authorized, it attempts to initialize the remote Powers.
|
||||||
* 4. Depending on the result of the initialization operation, it sets the appropriate success or error message.
|
* 4. Depending on the result of the initialization operation, it sets the appropriate success or error message.
|
||||||
* 5. It redirects the user to a specified URL with the result message and status.
|
* 5. It redirects the user to a specified URL with the result message and status.
|
||||||
*
|
*
|
||||||
@ -82,19 +83,24 @@ class PowersController extends AdminController
|
|||||||
|
|
||||||
if($user->authorise('power.init', 'com_componentbuilder'))
|
if($user->authorise('power.init', 'com_componentbuilder'))
|
||||||
{
|
{
|
||||||
if (PowerFactory::_('Power.Remote.Get')->init())
|
try {
|
||||||
{
|
if (PowerFactory::_('Power.Remote.Get')->init())
|
||||||
// set success message
|
{
|
||||||
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_SUCCESSFULLY_INITIALIZED_ALL_REMOTE_POWERS') . '</h1>';
|
// set success message
|
||||||
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_LOCAL_DATABASE_POWERS_HAS_SUCCESSFULLY_BEEN_SYNCED_WITH_THE_REMOTE_REPOSITORIES') . '</p>';
|
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_SUCCESSFULLY_INITIALIZED_ALL_REMOTE_JOOMLA_POWERS') . '</h1>';
|
||||||
|
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_LOCAL_DATABASE_POWERS_HAS_SUCCESSFULLY_BEEN_SYNCED_WITH_THE_REMOTE_REPOSITORIES') . '</p>';
|
||||||
|
|
||||||
$status = 'success';
|
$status = 'success';
|
||||||
$success = true;
|
$success = true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_INITIALIZATION_FAILED') . '</h1>';
|
||||||
|
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_INITIALIZATION_OF_THIS_POWERS_HAS_FAILED') . '</p>';
|
||||||
|
}
|
||||||
|
} catch (\Exception $e) {
|
||||||
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_INITIALIZATION_FAILED') . '</h1>';
|
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_INITIALIZATION_FAILED') . '</h1>';
|
||||||
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_INITIALIZATION_OF_THIS_POWERS_HAS_FAILED') . '</p>';
|
$message .= '<p>' . \htmlspecialchars($e->getMessage()) . '</p>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -106,15 +112,15 @@ class PowersController extends AdminController
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Resets the selected powers.
|
* Resets the selected Powers.
|
||||||
*
|
*
|
||||||
* This function performs several checks and operations:
|
* This function performs several checks and operations:
|
||||||
* 1. It verifies the authenticity of the request to prevent request forgery.
|
* 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.
|
* 2. It retrieves the IDs of the selected powers from the user input.
|
||||||
* 3. It sanitizes the input by converting the IDs to integers.
|
* 3. It sanitizes the input by converting the IDs to integers.
|
||||||
* 4. It checks whether any powers have been selected.
|
* 4. It checks whether any powers have been selected.
|
||||||
* 5. It checks whether the current user has the necessary permissions to reset the selected powers.
|
* 5. It checks whether the current user has the necessary permissions to reset the selected Powers.
|
||||||
* 6. If the user is authorized and powers are selected, it attempts to reset the selected powers.
|
* 6. If the user is authorized and powers are selected, it attempts to reset the selected Powers.
|
||||||
* 7. Depending on the result of the reset operation, it sets the appropriate success or error message.
|
* 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.
|
* 8. It redirects the user to a specified URL with the result message and status.
|
||||||
*
|
*
|
||||||
@ -152,18 +158,23 @@ class PowersController extends AdminController
|
|||||||
{
|
{
|
||||||
$guids = GetHelper::vars('power', $pks, 'id', 'guid');
|
$guids = GetHelper::vars('power', $pks, 'id', 'guid');
|
||||||
|
|
||||||
if (PowerFactory::_('Power.Remote.Get')->reset($guids))
|
try {
|
||||||
{
|
if (PowerFactory::_('Power.Remote.Get')->reset($guids))
|
||||||
// set success message
|
{
|
||||||
$message = '<h1>'.Text::_('COM_COMPONENTBUILDER_SUCCESS').'</h1>';
|
// set success message
|
||||||
$message .= '<p>'.Text::_('COM_COMPONENTBUILDER_THESE_POWERS_HAVE_SUCCESSFULLY_BEEN_RESET').'</p>';
|
$message = '<h1>'.Text::_('COM_COMPONENTBUILDER_SUCCESS').'</h1>';
|
||||||
$status = 'success';
|
$message .= '<p>'.Text::_('COM_COMPONENTBUILDER_THESE_POWERS_HAVE_SUCCESSFULLY_BEEN_RESET').'</p>';
|
||||||
$success = true;
|
$status = 'success';
|
||||||
}
|
$success = true;
|
||||||
else
|
}
|
||||||
{
|
else
|
||||||
|
{
|
||||||
|
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_RESET_FAILED') . '</h1>';
|
||||||
|
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_RESET_OF_THESE_POWERS_HAS_FAILED') . '</p>';
|
||||||
|
}
|
||||||
|
} catch (\Exception $e) {
|
||||||
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_RESET_FAILED') . '</h1>';
|
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_RESET_FAILED') . '</h1>';
|
||||||
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_RESET_OF_THESE_POWERS_HAS_FAILED') . '</p>';
|
$message .= '<p>' . \htmlspecialchars($e->getMessage()) . '</p>';
|
||||||
}
|
}
|
||||||
|
|
||||||
// set redirect
|
// set redirect
|
||||||
@ -180,15 +191,15 @@ class PowersController extends AdminController
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Pushes the selected powers.
|
* Pushes the selected Powers.
|
||||||
*
|
*
|
||||||
* This function performs several checks and operations:
|
* This function performs several checks and operations:
|
||||||
* 1. It verifies the authenticity of the request to prevent request forgery.
|
* 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.
|
* 2. It retrieves the IDs of the selected powers from the user input.
|
||||||
* 3. It sanitizes the input by converting the IDs to integers.
|
* 3. It sanitizes the input by converting the IDs to integers.
|
||||||
* 4. It checks whether any powers have been selected.
|
* 4. It checks whether any powers have been selected.
|
||||||
* 5. It checks whether the current user has the necessary permissions to push the selected powers.
|
* 5. It checks whether the current user has the necessary permissions to push the selected Powers.
|
||||||
* 6. If the user is authorized and powers are selected, it attempts to push the selected powers.
|
* 6. If the user is authorized and powers are selected, it attempts to push the selected Powers.
|
||||||
* 7. Depending on the result of the push operation, it sets the appropriate success or error message.
|
* 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.
|
* 8. It redirects the user to a specified URL with the result message and status.
|
||||||
*
|
*
|
||||||
|
@ -3514,12 +3514,12 @@ abstract class ComponentbuilderHelper
|
|||||||
'editor', 'editors', 'email', 'file', 'file', 'filelist', 'folderlist', 'groupedlist', 'headertag', 'helpsite', 'hidden', 'imagelist',
|
'editor', 'editors', 'email', 'file', 'file', 'filelist', 'folderlist', 'groupedlist', 'headertag', 'helpsite', 'hidden', 'imagelist',
|
||||||
'integer', 'language', 'list', 'media', 'menu', 'modal_menu', 'menuitem', 'meter', 'modulelayout', 'moduleorder', 'moduleposition',
|
'integer', 'language', 'list', 'media', 'menu', 'modal_menu', 'menuitem', 'meter', 'modulelayout', 'moduleorder', 'moduleposition',
|
||||||
'moduletag', 'note', 'number', 'password', 'plugins', 'predefinedlist', 'radio', 'range', 'repeatable', 'rules',
|
'moduletag', 'note', 'number', 'password', 'plugins', 'predefinedlist', 'radio', 'range', 'repeatable', 'rules',
|
||||||
'sessionhandler', 'spacer', 'sql', 'subform', 'tag', 'tel', 'templatestyle', 'text', 'textarea', 'timezone', 'url', 'user', 'usergroup'
|
'sessionhandler', 'spacer', 'sql', 'subform', 'tag', 'tel', 'templatestyle', 'text', 'textarea', 'timezone', 'url', 'user', 'usergroup', 'usergrouplist'
|
||||||
),
|
),
|
||||||
'plain' => array(
|
'plain' => array(
|
||||||
'cachehandler', 'calendar', 'checkbox', 'chromestyle', 'color', 'componentlayout', 'contenttype', 'editor', 'editors', 'captcha',
|
'cachehandler', 'calendar', 'checkbox', 'chromestyle', 'color', 'componentlayout', 'contenttype', 'editor', 'editors', 'captcha',
|
||||||
'email', 'file', 'headertag', 'helpsite', 'hidden', 'integer', 'language', 'media', 'menu', 'modal_menu', 'menuitem', 'meter', 'modulelayout', 'templatestyle',
|
'email', 'file', 'headertag', 'helpsite', 'hidden', 'integer', 'language', 'media', 'menu', 'modal_menu', 'menuitem', 'meter', 'modulelayout', 'templatestyle',
|
||||||
'moduleorder', 'moduletag', 'number', 'password', 'range', 'rules', 'tag', 'tel', 'text', 'textarea', 'timezone', 'url', 'user', 'usergroup'
|
'moduleorder', 'moduletag', 'number', 'password', 'range', 'rules', 'tag', 'tel', 'text', 'textarea', 'timezone', 'url', 'user', 'usergroup', 'usergrouplist'
|
||||||
),
|
),
|
||||||
'option' => array(
|
'option' => array(
|
||||||
'accesslevel', 'category', 'checkboxes', 'combo', 'contentlanguage', 'databaseconnection', 'components',
|
'accesslevel', 'category', 'checkboxes', 'combo', 'contentlanguage', 'databaseconnection', 'components',
|
||||||
|
@ -25,7 +25,6 @@ use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper;
|
|||||||
use Joomla\CMS\Helper\TagsHelper;
|
use Joomla\CMS\Helper\TagsHelper;
|
||||||
use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper;
|
use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper;
|
||||||
use VDM\Joomla\Utilities\ObjectHelper;
|
use VDM\Joomla\Utilities\ObjectHelper;
|
||||||
use VDM\Joomla\Utilities\JsonHelper;
|
|
||||||
use VDM\Joomla\Utilities\StringHelper;
|
use VDM\Joomla\Utilities\StringHelper;
|
||||||
|
|
||||||
// No direct access to this file
|
// No direct access to this file
|
||||||
@ -216,8 +215,17 @@ class Help_documentsModel extends ListModel
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
// convert groups
|
// decode groups
|
||||||
$item->groups = JsonHelper::string($item->groups, ', ', 'groups');
|
$groupsArray = json_decode($item->groups, true);
|
||||||
|
if (UtilitiesArrayHelper::check($groupsArray))
|
||||||
|
{
|
||||||
|
$groupsNames = [];
|
||||||
|
foreach ($groupsArray as $groups)
|
||||||
|
{
|
||||||
|
$groupsNames[] = ComponentbuilderHelper::getGroupName($groups);
|
||||||
|
}
|
||||||
|
$item->groups = implode(', ', $groupsNames);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -317,7 +325,7 @@ class Help_documentsModel extends ListModel
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
$search = $db->quote('%' . $db->escape($search) . '%');
|
$search = $db->quote('%' . $db->escape($search) . '%');
|
||||||
$query->where('(a.title LIKE '.$search.' OR a.type LIKE '.$search.' OR a.location LIKE '.$search.' OR a.admin_view LIKE '.$search.' OR h. LIKE '.$search.' OR a.site_view LIKE '.$search.' OR i. LIKE '.$search.')');
|
$query->where('(a.title LIKE '.$search.' OR a.type LIKE '.$search.' OR a.location LIKE '.$search.' OR a.admin_view LIKE '.$search.' OR g. LIKE '.$search.' OR a.site_view LIKE '.$search.' OR h. LIKE '.$search.')');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -249,7 +249,8 @@ class RepositoriesModel extends ListModel
|
|||||||
$targetArray = array(
|
$targetArray = array(
|
||||||
0 => 'COM_COMPONENTBUILDER_REPOSITORY_SELECT_AN_OPTION',
|
0 => 'COM_COMPONENTBUILDER_REPOSITORY_SELECT_AN_OPTION',
|
||||||
1 => 'COM_COMPONENTBUILDER_REPOSITORY_SUPER_POWER',
|
1 => 'COM_COMPONENTBUILDER_REPOSITORY_SUPER_POWER',
|
||||||
2 => 'COM_COMPONENTBUILDER_REPOSITORY_JOOMLA_POWER'
|
2 => 'COM_COMPONENTBUILDER_REPOSITORY_JOOMLA_POWER',
|
||||||
|
3 => 'COM_COMPONENTBUILDER_REPOSITORY_JOOMLA_FIELD_TYPES'
|
||||||
);
|
);
|
||||||
// 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]))
|
||||||
|
@ -256,6 +256,16 @@ class HtmlView extends BaseHtmlView
|
|||||||
{
|
{
|
||||||
ToolbarHelper::custom('fieldtype.save2copy', 'save-copy.png', 'save-copy_f2.png', 'JTOOLBAR_SAVE_AS_COPY', false);
|
ToolbarHelper::custom('fieldtype.save2copy', 'save-copy.png', 'save-copy_f2.png', 'JTOOLBAR_SAVE_AS_COPY', false);
|
||||||
}
|
}
|
||||||
|
if ($this->canDo->get('fieldtype.reset'))
|
||||||
|
{
|
||||||
|
// add Reset button.
|
||||||
|
ToolbarHelper::custom('fieldtype.resetPowers', 'joomla custom-button-resetpowers', '', 'COM_COMPONENTBUILDER_RESET', false);
|
||||||
|
}
|
||||||
|
if ($this->canDo->get('fieldtype.push'))
|
||||||
|
{
|
||||||
|
// add Push button.
|
||||||
|
ToolbarHelper::custom('fieldtype.pushPowers', 'joomla custom-button-pushpowers', '', 'COM_COMPONENTBUILDER_PUSH', false);
|
||||||
|
}
|
||||||
ToolbarHelper::cancel('fieldtype.cancel', 'JTOOLBAR_CLOSE');
|
ToolbarHelper::cancel('fieldtype.cancel', 'JTOOLBAR_CLOSE');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -198,6 +198,21 @@ class HtmlView extends BaseHtmlView
|
|||||||
ToolbarHelper::trash('fieldtypes.trash');
|
ToolbarHelper::trash('fieldtypes.trash');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if ($this->user->authorise('fieldtype.init', 'com_componentbuilder'))
|
||||||
|
{
|
||||||
|
// add Init button.
|
||||||
|
ToolbarHelper::custom('fieldtypes.initPowers', 'health custom-button-initpowers', '', 'COM_COMPONENTBUILDER_INIT', false);
|
||||||
|
}
|
||||||
|
if ($this->user->authorise('fieldtype.reset', 'com_componentbuilder'))
|
||||||
|
{
|
||||||
|
// add Reset button.
|
||||||
|
ToolbarHelper::custom('fieldtypes.resetPowers', 'joomla custom-button-resetpowers', '', 'COM_COMPONENTBUILDER_RESET', false);
|
||||||
|
}
|
||||||
|
if ($this->user->authorise('fieldtype.push', 'com_componentbuilder'))
|
||||||
|
{
|
||||||
|
// add Push button.
|
||||||
|
ToolbarHelper::custom('fieldtypes.pushPowers', 'joomla 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('fieldtypes');
|
$this->help_url = ComponentbuilderHelper::getHelpUrl('fieldtypes');
|
||||||
|
@ -270,8 +270,8 @@ class HtmlView extends BaseHtmlView
|
|||||||
'a.title' => Text::_('COM_COMPONENTBUILDER_HELP_DOCUMENT_TITLE_LABEL'),
|
'a.title' => Text::_('COM_COMPONENTBUILDER_HELP_DOCUMENT_TITLE_LABEL'),
|
||||||
'a.type' => Text::_('COM_COMPONENTBUILDER_HELP_DOCUMENT_TYPE_LABEL'),
|
'a.type' => Text::_('COM_COMPONENTBUILDER_HELP_DOCUMENT_TYPE_LABEL'),
|
||||||
'a.location' => Text::_('COM_COMPONENTBUILDER_HELP_DOCUMENT_LOCATION_LABEL'),
|
'a.location' => Text::_('COM_COMPONENTBUILDER_HELP_DOCUMENT_LOCATION_LABEL'),
|
||||||
'h.' => Text::_('COM_COMPONENTBUILDER_HELP_DOCUMENT_ADMIN_VIEW_LABEL'),
|
'g.' => Text::_('COM_COMPONENTBUILDER_HELP_DOCUMENT_ADMIN_VIEW_LABEL'),
|
||||||
'i.' => Text::_('COM_COMPONENTBUILDER_HELP_DOCUMENT_SITE_VIEW_LABEL'),
|
'h.' => Text::_('COM_COMPONENTBUILDER_HELP_DOCUMENT_SITE_VIEW_LABEL'),
|
||||||
'a.id' => Text::_('JGRID_HEADING_ID')
|
'a.id' => Text::_('JGRID_HEADING_ID')
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -181,6 +181,7 @@ document.addEventListener('DOMContentLoaded', function() {
|
|||||||
<h3><?php echo Text::sprintf('COM_COMPONENTBUILDER_S_PLEASE_WAIT', $this->user->name); ?></h3>
|
<h3><?php echo Text::sprintf('COM_COMPONENTBUILDER_S_PLEASE_WAIT', $this->user->name); ?></h3>
|
||||||
<p style="font-size: smaller;"><?php echo Text::_('COM_COMPONENTBUILDER_THIS_MAY_TAKE_A_WHILE_DEPENDING_ON_THE_SIZE_OF_YOUR_PROJECT'); ?></p>
|
<p style="font-size: smaller;"><?php echo Text::_('COM_COMPONENTBUILDER_THIS_MAY_TAKE_A_WHILE_DEPENDING_ON_THE_SIZE_OF_YOUR_PROJECT'); ?></p>
|
||||||
<p><b><span class="component-name"><?php echo Text::_('COM_COMPONENTBUILDER_THE_COMPONENT'); ?></span></b> <?php echo Text::_('COM_COMPONENTBUILDER_IS_BEING_COMPILED'); ?> <span class="loading-dots">.</span></p>
|
<p><b><span class="component-name"><?php echo Text::_('COM_COMPONENTBUILDER_THE_COMPONENT'); ?></span></b> <?php echo Text::_('COM_COMPONENTBUILDER_IS_BEING_COMPILED'); ?> <span class="loading-dots">.</span></p>
|
||||||
|
<p style="font-size: smaller;"><?php echo Text::_('COM_COMPONENTBUILDER_DURING_THE_INITIAL_COMPILATION_OF_ANY_COMPONENT_THE_PROCESS_MAY_TAKE_ADDITIONAL_TIME_AS_WE_RETRIEVE_AND_CONFIGURE_THE_ASSOCIATED_SUPERPOWERS_'); ?></p>
|
||||||
<div style="text-align: center;"><?php echo ComponentbuilderHelper::getDynamicContent('builder-gif', $this->builder_gif_size); ?></div>
|
<div style="text-align: center;"><?php echo ComponentbuilderHelper::getDynamicContent('builder-gif', $this->builder_gif_size); ?></div>
|
||||||
</div>
|
</div>
|
||||||
<div id="compiler-notice" class="col-md-6 p-md-3" style="display:none;">
|
<div id="compiler-notice" class="col-md-6 p-md-3" style="display:none;">
|
||||||
|
@ -45,10 +45,10 @@ defined('_JEXEC') or die;
|
|||||||
<?php echo Html::_('searchtools.sort', 'COM_COMPONENTBUILDER_HELP_DOCUMENT_LOCATION_LABEL', 'a.location', $this->listDirn, $this->listOrder); ?>
|
<?php echo Html::_('searchtools.sort', 'COM_COMPONENTBUILDER_HELP_DOCUMENT_LOCATION_LABEL', 'a.location', $this->listDirn, $this->listOrder); ?>
|
||||||
</th>
|
</th>
|
||||||
<th class="nowrap hidden-phone" >
|
<th class="nowrap hidden-phone" >
|
||||||
<?php echo Html::_('searchtools.sort', 'COM_COMPONENTBUILDER_HELP_DOCUMENT_ADMIN_VIEW_LABEL', 'h.', $this->listDirn, $this->listOrder); ?>
|
<?php echo Html::_('searchtools.sort', 'COM_COMPONENTBUILDER_HELP_DOCUMENT_ADMIN_VIEW_LABEL', 'g.', $this->listDirn, $this->listOrder); ?>
|
||||||
</th>
|
</th>
|
||||||
<th class="nowrap hidden-phone" >
|
<th class="nowrap hidden-phone" >
|
||||||
<?php echo Html::_('searchtools.sort', 'COM_COMPONENTBUILDER_HELP_DOCUMENT_SITE_VIEW_LABEL', 'i.', $this->listDirn, $this->listOrder); ?>
|
<?php echo Html::_('searchtools.sort', 'COM_COMPONENTBUILDER_HELP_DOCUMENT_SITE_VIEW_LABEL', 'h.', $this->listDirn, $this->listOrder); ?>
|
||||||
</th>
|
</th>
|
||||||
<?php if ($this->canState): ?>
|
<?php if ($this->canState): ?>
|
||||||
<th width="10" class="nowrap center" >
|
<th width="10" class="nowrap center" >
|
||||||
|
@ -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>21st August, 2024</creationDate>
|
<creationDate>23rd August, 2024</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.0.3-alpha2</version>
|
<version>5.0.3-alpha3</version>
|
||||||
<description><![CDATA[
|
<description><![CDATA[
|
||||||
<h1>Component Builder (v.5.0.3-alpha2)</h1>
|
<h1>Component Builder (v.5.0.3-alpha3)</h1>
|
||||||
<div style="clear: both;"></div>
|
<div style="clear: both;"></div>
|
||||||
<p>The Component Builder for [Joomla](https://extensions.joomla.org/extension/component-builder/) is highly advanced tool that is truly able to build extremely complex components in a fraction of the time.
|
<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.
|
||||||
|
|
||||||
|
@ -98,7 +98,7 @@
|
|||||||
<version>5.0.3-alpha</version>
|
<version>5.0.3-alpha</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://git.vdm.dev/api/v1/repos/joomla/pkg-component-builder/archive/v5.0.3-alpha2.zip</downloadurl>
|
<downloadurl type="full" format="zip">https://git.vdm.dev/api/v1/repos/joomla/pkg-component-builder/archive/v5.0.3-alpha3.zip</downloadurl>
|
||||||
</downloads>
|
</downloads>
|
||||||
<tags>
|
<tags>
|
||||||
<tag>alpha</tag>
|
<tag>alpha</tag>
|
||||||
@ -113,10 +113,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.0.3-alpha2</version>
|
<version>5.0.3-alpha3</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://git.vdm.dev/api/v1/repos/joomla/pkg-component-builder/archive/v5.0.3-alpha2.zip</downloadurl>
|
<downloadurl type="full" format="zip">https://git.vdm.dev/api/v1/repos/joomla/pkg-component-builder/archive/v5.0.3-alpha3.zip</downloadurl>
|
||||||
</downloads>
|
</downloads>
|
||||||
<tags>
|
<tags>
|
||||||
<tag>alpha</tag>
|
<tag>alpha</tag>
|
||||||
|
@ -1116,7 +1116,7 @@ final class Builders
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
// just a heads-up for usergroups set to multiple
|
// just a heads-up for usergroups set to multiple
|
||||||
if ($typeName === 'usergroup')
|
if ($typeName === 'usergroup' || $typeName === 'usergrouplist')
|
||||||
{
|
{
|
||||||
$this->sitefielddata->set(
|
$this->sitefielddata->set(
|
||||||
$nameSingleCode, $name, 'json', $typeName
|
$nameSingleCode, $name, 'json', $typeName
|
||||||
|
@ -138,7 +138,7 @@ final class ConfigFieldsetsGroupControl
|
|||||||
{
|
{
|
||||||
$this->configfieldsets->add('component', Indent::_(2) . '<field name="'
|
$this->configfieldsets->add('component', Indent::_(2) . '<field name="'
|
||||||
. $selector . '"');
|
. $selector . '"');
|
||||||
$this->configfieldsets->add('component', Indent::_(3) . 'type="usergroup"');
|
$this->configfieldsets->add('component', Indent::_(3) . 'type="usergrouplist"');
|
||||||
$this->configfieldsets->add('component', Indent::_(3) . 'label="' . $label . '"');
|
$this->configfieldsets->add('component', Indent::_(3) . 'label="' . $label . '"');
|
||||||
$this->configfieldsets->add('component', Indent::_(3) . 'description="'
|
$this->configfieldsets->add('component', Indent::_(3) . 'description="'
|
||||||
. $lang . '_TARGET_GROUP_DESC"');
|
. $lang . '_TARGET_GROUP_DESC"');
|
||||||
|
@ -36,13 +36,13 @@ final class Groups
|
|||||||
'color', 'combo', 'componentlayout', 'contentlanguage', 'contenttype', 'databaseconnection', 'components',
|
'color', 'combo', 'componentlayout', 'contentlanguage', 'contenttype', 'databaseconnection', 'components',
|
||||||
'editor', 'editors', 'email', 'file', 'file', 'filelist', 'folderlist', 'groupedlist', 'headertag', 'helpsite', 'hidden', 'imagelist',
|
'editor', 'editors', 'email', 'file', 'file', 'filelist', 'folderlist', 'groupedlist', 'headertag', 'helpsite', 'hidden', 'imagelist',
|
||||||
'integer', 'language', 'list', 'media', 'menu', 'modal_menu', 'menuitem', 'meter', 'modulelayout', 'moduleorder', 'moduleposition',
|
'integer', 'language', 'list', 'media', 'menu', 'modal_menu', 'menuitem', 'meter', 'modulelayout', 'moduleorder', 'moduleposition',
|
||||||
'moduletag', 'note', 'number', 'password', 'plugins', 'predefinedlist', 'radio', 'range', 'repeatable', 'rules',
|
'moduletag', 'note', 'number', 'password', 'plugins', 'predefinedlist', 'radio', 'range', 'repeatable', 'rules', 'usergrouplist',
|
||||||
'sessionhandler', 'spacer', 'sql', 'subform', 'tag', 'tel', 'templatestyle', 'text', 'textarea', 'timezone', 'url', 'user', 'usergroup'
|
'sessionhandler', 'spacer', 'sql', 'subform', 'tag', 'tel', 'templatestyle', 'text', 'textarea', 'timezone', 'url', 'user', 'usergroup'
|
||||||
],
|
],
|
||||||
'plain' => [
|
'plain' => [
|
||||||
'cachehandler', 'calendar', 'checkbox', 'chromestyle', 'color', 'componentlayout', 'contenttype', 'editor', 'editors', 'captcha',
|
'cachehandler', 'calendar', 'checkbox', 'chromestyle', 'color', 'componentlayout', 'contenttype', 'editor', 'editors', 'captcha',
|
||||||
'email', 'file', 'headertag', 'helpsite', 'hidden', 'integer', 'language', 'media', 'menu', 'modal_menu', 'menuitem', 'meter', 'modulelayout', 'templatestyle',
|
'email', 'file', 'headertag', 'helpsite', 'hidden', 'integer', 'language', 'media', 'menu', 'modal_menu', 'menuitem', 'meter', 'modulelayout', 'templatestyle',
|
||||||
'moduleorder', 'moduletag', 'number', 'password', 'range', 'rules', 'tag', 'tel', 'text', 'textarea', 'timezone', 'url', 'user', 'usergroup'
|
'moduleorder', 'moduletag', 'number', 'password', 'range', 'rules', 'tag', 'tel', 'text', 'textarea', 'timezone', 'url', 'user', 'usergroup' , 'usergrouplist'
|
||||||
],
|
],
|
||||||
'option' => [
|
'option' => [
|
||||||
'accesslevel', 'category', 'checkboxes', 'combo', 'contentlanguage', 'databaseconnection', 'components',
|
'accesslevel', 'category', 'checkboxes', 'combo', 'contentlanguage', 'databaseconnection', 'components',
|
||||||
|
@ -18062,7 +18062,7 @@ class Interpretation extends Fields
|
|||||||
. "\$query = \$db->getQuery(true);";
|
. "\$query = \$db->getQuery(true);";
|
||||||
|
|
||||||
// check if usergroup as we change to an object query
|
// check if usergroup as we change to an object query
|
||||||
if ($filter['type'] === 'usergroup')
|
if ($filter['type'] === 'usergroup' || $filter['type'] === 'usergrouplist')
|
||||||
{
|
{
|
||||||
$function[] = PHP_EOL . Indent::_(2) . "//"
|
$function[] = PHP_EOL . Indent::_(2) . "//"
|
||||||
. Line::_(__Line__, __Class__) . " Select the text.";
|
. Line::_(__Line__, __Class__) . " Select the text.";
|
||||||
@ -18139,7 +18139,7 @@ class Interpretation extends Fields
|
|||||||
. $nameListCode . "');";
|
. $nameListCode . "');";
|
||||||
}
|
}
|
||||||
// check if usergroup as we change to an object query
|
// check if usergroup as we change to an object query
|
||||||
if ($filter['type'] !== 'usergroup')
|
if ($filter['type'] !== 'usergroup' && $filter['type'] !== 'usergrouplist')
|
||||||
{
|
{
|
||||||
$function[] = Indent::_(3)
|
$function[] = Indent::_(3)
|
||||||
. "\$_results = array_unique(\$_results);";
|
. "\$_results = array_unique(\$_results);";
|
||||||
@ -18197,7 +18197,7 @@ class Interpretation extends Fields
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if ($filter['type'] === 'usergroup')
|
if ($filter['type'] === 'usergroup' || $filter['type'] === 'usergrouplist')
|
||||||
{
|
{
|
||||||
$function[] = Indent::_(4) . "//" . Line::_(
|
$function[] = Indent::_(4) . "//" . Line::_(
|
||||||
__LINE__,__CLASS__
|
__LINE__,__CLASS__
|
||||||
@ -20677,7 +20677,7 @@ class Interpretation extends Fields
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($item['type'] === 'usergroup' && !$export
|
if (($item['type'] === 'usergroup' || $item['type'] === 'usergrouplist') && !$export
|
||||||
&& $item['method'] != 6)
|
&& $item['method'] != 6)
|
||||||
{
|
{
|
||||||
$fix .= PHP_EOL . Indent::_(1) . $tab . Indent::_(3) . "//"
|
$fix .= PHP_EOL . Indent::_(1) . $tab . Indent::_(3) . "//"
|
||||||
@ -20704,7 +20704,7 @@ class Interpretation extends Fields
|
|||||||
. $item['name'] . "Names);";
|
. $item['name'] . "Names);";
|
||||||
$fix .= PHP_EOL . Indent::_(1) . $tab . Indent::_(3) . "}";
|
$fix .= PHP_EOL . Indent::_(1) . $tab . Indent::_(3) . "}";
|
||||||
}
|
}
|
||||||
/* elseif ($item['type'] === 'usergroup' && $export)
|
/* elseif (($item['type'] === 'usergroup' || $item['type'] === 'usergrouplist') && $export)
|
||||||
{
|
{
|
||||||
$fix .= PHP_EOL.Indent::_(1).$tab.Indent::_(3) . "//".Line::_(__Line__, __Class__)." decode ".$item['name'];
|
$fix .= PHP_EOL.Indent::_(1).$tab.Indent::_(3) . "//".Line::_(__Line__, __Class__)." decode ".$item['name'];
|
||||||
$fix .= PHP_EOL.Indent::_(1).$tab.Indent::_(3) . "\$".$item['name']."Array = ".$decode."(\$item->".$item['name'].$suffix_decode.");";
|
$fix .= PHP_EOL.Indent::_(1).$tab.Indent::_(3) . "\$".$item['name']."Array = ".$decode."(\$item->".$item['name'].$suffix_decode.");";
|
||||||
|
@ -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\Fieldtype;
|
||||||
|
|
||||||
|
|
||||||
|
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\BaseConfig;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 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.0.3
|
||||||
|
*/
|
||||||
|
class Config extends BaseConfig
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* The Global Joomla Configuration
|
||||||
|
*
|
||||||
|
* @var JoomlaRegistry
|
||||||
|
* @since 5.0.3
|
||||||
|
*/
|
||||||
|
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.0.3
|
||||||
|
*/
|
||||||
|
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.0.3
|
||||||
|
*/
|
||||||
|
protected function getGiteausername(): ?string
|
||||||
|
{
|
||||||
|
return $this->params->get('gitea_username');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* get Gitea Access Token
|
||||||
|
*
|
||||||
|
* @return string the access token
|
||||||
|
* @since 5.0.3
|
||||||
|
*/
|
||||||
|
protected function getGiteatoken(): ?string
|
||||||
|
{
|
||||||
|
return $this->params->get('gitea_token');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get fieldtype core organisation
|
||||||
|
*
|
||||||
|
* @return string The fieldtype core organisation
|
||||||
|
* @since 5.0.3
|
||||||
|
*/
|
||||||
|
protected function getJoomlafieldtypecoreorganisation(): string
|
||||||
|
{
|
||||||
|
// the VDM default organisation is [joomla]
|
||||||
|
$organisation = 'joomla';
|
||||||
|
|
||||||
|
return $this->params->get('joomla_fieldtype_core_organisation', $organisation);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get Joomla fieldtype init repos
|
||||||
|
*
|
||||||
|
* @return array The init repositories on Gitea
|
||||||
|
* @since 5.0.3
|
||||||
|
*/
|
||||||
|
protected function getJoomlafieldtypeinitrepos(): 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 . '.joomla-fieldtypes'] = (object) ['organisation' => $this->gitea_username, 'repository' => 'joomla-fieldtypes', 'read_branch' => 'master'];
|
||||||
|
}
|
||||||
|
$repos[$this->joomla_fieldtype_core_organisation . '.joomla-fieldtypes'] = (object) ['organisation' => $this->joomla_fieldtype_core_organisation, 'repository' => 'joomla-fieldtypes', 'read_branch' => 'master'];
|
||||||
|
|
||||||
|
return $repos;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get joomla fieldtype approved paths
|
||||||
|
*
|
||||||
|
* @return array The approved paths to the repositories on Gitea
|
||||||
|
* @since 5.0.3
|
||||||
|
*/
|
||||||
|
protected function getApprovedjoomlapaths(): array
|
||||||
|
{
|
||||||
|
// some defaults repos we need by JCB
|
||||||
|
$approved = $this->joomla_fieldtype_init_repos;
|
||||||
|
|
||||||
|
$paths = RepoHelper::get(3); // Joomla Field Type = 3
|
||||||
|
|
||||||
|
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,52 @@
|
|||||||
|
<?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\Fieldtype;
|
||||||
|
|
||||||
|
|
||||||
|
use Joomla\DI\Container;
|
||||||
|
use VDM\Joomla\Componentbuilder\Fieldtype\Service\Fieldtype as Power;
|
||||||
|
use VDM\Joomla\Service\Database;
|
||||||
|
use VDM\Joomla\Service\Model;
|
||||||
|
use VDM\Joomla\Service\Data;
|
||||||
|
use VDM\Joomla\Componentbuilder\Service\Gitea;
|
||||||
|
use VDM\Joomla\Componentbuilder\Power\Service\Gitea as GiteaPower;
|
||||||
|
use VDM\Joomla\Gitea\Service\Utilities as GiteaUtilities;
|
||||||
|
use VDM\Joomla\Interfaces\FactoryInterface;
|
||||||
|
use VDM\Joomla\Abstraction\Factory as ExtendingFactory;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Field Type Power Factory
|
||||||
|
*
|
||||||
|
* @since 5.0.3
|
||||||
|
*/
|
||||||
|
abstract class Factory extends ExtendingFactory implements FactoryInterface
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Create a container object
|
||||||
|
*
|
||||||
|
* @return Container
|
||||||
|
* @since 5.0.3
|
||||||
|
*/
|
||||||
|
protected static function createContainer(): Container
|
||||||
|
{
|
||||||
|
return (new Container())
|
||||||
|
->registerServiceProvider(new Power())
|
||||||
|
->registerServiceProvider(new Database())
|
||||||
|
->registerServiceProvider(new Model())
|
||||||
|
->registerServiceProvider(new Data())
|
||||||
|
->registerServiceProvider(new Gitea())
|
||||||
|
->registerServiceProvider(new GiteaPower())
|
||||||
|
->registerServiceProvider(new GiteaUtilities());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,151 @@
|
|||||||
|
<?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\Fieldtype;
|
||||||
|
|
||||||
|
|
||||||
|
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 joomla power in the repositories listed in the global
|
||||||
|
* Options of JCB in the super powers tab, 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.0.3
|
||||||
|
*/
|
||||||
|
final class Grep extends ExtendingGrep implements GrepInterface
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 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 joomla power
|
||||||
|
*
|
||||||
|
* @param object $path The repository path details
|
||||||
|
* @param string $guid The global unique id of the power
|
||||||
|
*
|
||||||
|
* @return object|null
|
||||||
|
* @since 5.0.3
|
||||||
|
*/
|
||||||
|
protected function getRemote(object $path, string $guid): ?object
|
||||||
|
{
|
||||||
|
$power = null;
|
||||||
|
if (empty($path->index->{$guid}->path))
|
||||||
|
{
|
||||||
|
return $power;
|
||||||
|
}
|
||||||
|
|
||||||
|
// get the branch name
|
||||||
|
$branch = $this->getBranchName($path);
|
||||||
|
|
||||||
|
// load the base and token if set
|
||||||
|
$this->contents->load_($path->base ?? null, $path->token ?? null);
|
||||||
|
|
||||||
|
// get the settings
|
||||||
|
if (($power = $this->loadRemoteFile($path->organisation, $path->repository, $path->index->{$guid}->path . '/item.json', $branch)) !== null &&
|
||||||
|
isset($power->guid))
|
||||||
|
{
|
||||||
|
// set the git details in params
|
||||||
|
$path_guid = $path->guid ?? null;
|
||||||
|
if ($path_guid !== null)
|
||||||
|
{
|
||||||
|
// get the Settings meta
|
||||||
|
if (($meta = $this->contents->metadata($path->organisation, $path->repository, $path->index->{$guid}->path . '/item.json', $branch)) !== null &&
|
||||||
|
isset($meta->sha))
|
||||||
|
{
|
||||||
|
if (isset($power->params) && is_object($power->params) &&
|
||||||
|
isset($power->params->source) && is_array($power->params->source))
|
||||||
|
{
|
||||||
|
$power->params->source[$path_guid . '-settings'] = $meta->sha;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$power->params = (object) [
|
||||||
|
'source' => [$path_guid . '-settings' => $meta->sha]
|
||||||
|
];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// get the README meta
|
||||||
|
if (($meta = $this->contents->metadata($path->organisation, $path->repository, $path->index->{$guid}->path . '/README.md', $branch)) !== null &&
|
||||||
|
isset($meta->sha))
|
||||||
|
{
|
||||||
|
if (isset($power->params) && is_object($power->params) &&
|
||||||
|
isset($power->params->source) && is_array($power->params->source))
|
||||||
|
{
|
||||||
|
$power->params->source[$path_guid . '-readme'] = $meta->sha;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$power->params = (object) [
|
||||||
|
'source' => [$path_guid . '-readme' => $meta->sha]
|
||||||
|
];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// reset back to the global base and token
|
||||||
|
$this->contents->reset_();
|
||||||
|
|
||||||
|
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 5.0.3
|
||||||
|
*/
|
||||||
|
protected function setRemoteIndexMessage(string $message, string $path, string $repository, string $organisation, ?string $base): void
|
||||||
|
{
|
||||||
|
$this->app->enqueueMessage(
|
||||||
|
Text::sprintf('COM_COMPONENTBUILDER_PJOOMLA_FIELD_TYPEB_REPOSITORY_AT_BSSB_GAVE_THE_FOLLOWING_ERRORBR_SP', $this->contents->api(), $path, $message),
|
||||||
|
'Error'
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,71 @@
|
|||||||
|
<?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\Fieldtype\Readme;
|
||||||
|
|
||||||
|
|
||||||
|
use VDM\Joomla\Interfaces\Readme\ItemInterface;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Compiler Field Type Item Readme
|
||||||
|
*
|
||||||
|
* @since 5.0.3
|
||||||
|
*/
|
||||||
|
final class Item implements ItemInterface
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Get an item readme
|
||||||
|
*
|
||||||
|
* @param object $item An item details.
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
* @since 3.2.2
|
||||||
|
*/
|
||||||
|
public function get(object $item): string
|
||||||
|
{
|
||||||
|
// build readme
|
||||||
|
$readme = ["```
|
||||||
|
██╗ ██████╗ ██████╗ ███╗ ███╗██╗ █████╗ ███████╗██╗███████╗██╗ ██████╗ ████████╗██╗ ██╗██████╗ ███████╗
|
||||||
|
██║██╔═══██╗██╔═══██╗████╗ ████║██║ ██╔══██╗ ██╔════╝██║██╔════╝██║ ██╔══██╗ ╚══██╔══╝╚██╗ ██╔╝██╔══██╗██╔════╝
|
||||||
|
██║██║ ██║██║ ██║██╔████╔██║██║ ███████║ █████╗ ██║█████╗ ██║ ██║ ██║ ██║ ╚████╔╝ ██████╔╝█████╗
|
||||||
|
██ ██║██║ ██║██║ ██║██║╚██╔╝██║██║ ██╔══██║ ██╔══╝ ██║██╔══╝ ██║ ██║ ██║ ██║ ╚██╔╝ ██╔═══╝ ██╔══╝
|
||||||
|
╚█████╔╝╚██████╔╝╚██████╔╝██║ ╚═╝ ██║███████╗██║ ██║ ██║ ██║███████╗███████╗██████╔╝ ██║ ██║ ██║ ███████╗
|
||||||
|
╚════╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ ╚═╝ ╚═╝╚══════╝╚══════╝╚═════╝ ╚═╝ ╚═╝ ╚═╝ ╚══════╝
|
||||||
|
```"];
|
||||||
|
// system name
|
||||||
|
$readme[] = "# " . $item->name;
|
||||||
|
|
||||||
|
if (!empty($item->description))
|
||||||
|
{
|
||||||
|
$readme[] = "\n" . $item->description;
|
||||||
|
}
|
||||||
|
elseif (!empty($item->short_description))
|
||||||
|
{
|
||||||
|
$readme[] = "\n" . $item->short_description;
|
||||||
|
}
|
||||||
|
|
||||||
|
$readme[] = "\nThe Joomla! field types within this repository provide an essential mechanism for integrating Joomla-related field type into the Joomla Component Builder (JCB). Each field type is meticulously designed to ensure compatibility and ease of use within the JCB framework, allowing developers to effortlessly incorporate and manage custom fields in their components. By utilizing the reset functionality, users can seamlessly update individual field types to align with the latest versions maintained in our core repository, ensuring that their projects benefit from the most up-to-date features and fixes. Additionally, for those who prefer a more personalized approach, the repository can be forked, enabling developers to maintain and distribute their customized field types independently from the broader JCB community. This level of flexibility underscores the open-source nature of JCB, offering you the freedom to adapt and extend your components according to your specific needs, while still benefiting from a robust, community-driven ecosystem.";
|
||||||
|
|
||||||
|
// yes you can remove this, but why?
|
||||||
|
$readme[] = "\n---\n```
|
||||||
|
██╗ ██████╗██████╗
|
||||||
|
██║██╔════╝██╔══██╗
|
||||||
|
██║██║ ██████╔╝
|
||||||
|
██ ██║██║ ██╔══██╗
|
||||||
|
╚█████╔╝╚██████╗██████╔╝
|
||||||
|
╚════╝ ╚═════╝╚═════╝
|
||||||
|
```\n> Build with [Joomla Component Builder](https://git.vdm.dev/joomla/Component-Builder)\n\n";
|
||||||
|
|
||||||
|
return implode("\n", $readme);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,234 @@
|
|||||||
|
<?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\Fieldtype\Readme;
|
||||||
|
|
||||||
|
|
||||||
|
use VDM\Joomla\Interfaces\Readme\MainInterface;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Field Type Main Readme
|
||||||
|
*
|
||||||
|
* @since 5.0.3
|
||||||
|
*/
|
||||||
|
final class Main implements MainInterface
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Get Main Readme
|
||||||
|
*
|
||||||
|
* @param array $items All items of this repository.
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
* @since 3.2.0
|
||||||
|
*/
|
||||||
|
public function get(array $items): string
|
||||||
|
{
|
||||||
|
// build readme
|
||||||
|
$readme = ["```
|
||||||
|
██╗ ██████╗ ██████╗ ███╗ ███╗██╗ █████╗
|
||||||
|
██║██╔═══██╗██╔═══██╗████╗ ████║██║ ██╔══██╗
|
||||||
|
██║██║ ██║██║ ██║██╔████╔██║██║ ███████║
|
||||||
|
██ ██║██║ ██║██║ ██║██║╚██╔╝██║██║ ██╔══██║
|
||||||
|
╚█████╔╝╚██████╔╝╚██████╔╝██║ ╚═╝ ██║███████╗██║ ██║
|
||||||
|
╚════╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
|
||||||
|
|
||||||
|
███████╗██╗███████╗██╗ ██████╗ ████████╗██╗ ██╗██████╗ ███████╗███████╗
|
||||||
|
██╔════╝██║██╔════╝██║ ██╔══██╗ ╚══██╔══╝╚██╗ ██╔╝██╔══██╗██╔════╝██╔════╝
|
||||||
|
█████╗ ██║█████╗ ██║ ██║ ██║ ██║ ╚████╔╝ ██████╔╝█████╗ ███████╗
|
||||||
|
██╔══╝ ██║██╔══╝ ██║ ██║ ██║ ██║ ╚██╔╝ ██╔═══╝ ██╔══╝ ╚════██║
|
||||||
|
██║ ██║███████╗███████╗██████╔╝ ██║ ██║ ██║ ███████╗███████║
|
||||||
|
╚═╝ ╚═╝╚══════╝╚══════╝╚═════╝ ╚═╝ ╚═╝ ╚═╝ ╚══════╝╚══════╝
|
||||||
|
```"];
|
||||||
|
|
||||||
|
// default description of super powers
|
||||||
|
$readme[] = "\n### What is JCB Joomla Field Types?\nThe Joomla field types provide a powerful way to map Joomla-related field types, enabling seamless integration with Joomla Component Builder (JCB). This repository serves as a centralized system for maintaining, updating, and distributing these field types throughout the JCB ecosystem.\n
|
||||||
|
\n
|
||||||
|
When you need to update any field type in JCB, simply select the desired field type and click the \"reset\" button. This action will automatically sync the selected field type with its corresponding version hosted in our core repository, ensuring you always have the latest updates.\n
|
||||||
|
\n
|
||||||
|
Moreover, if you wish to tailor the field types to your specific needs, you can fork the repository and point your JCB instance to your fork. This allows you to maintain and update field types independently from the main JCB community, offering the flexibility that is at the heart of open-source philosophy.\n
|
||||||
|
\n
|
||||||
|
We believe this approach empowers you to extend and customize JCB to fit your unique requirements, exemplifying the true spirit of freedom in software development. We trust you will find this capability both useful and aligned with the expectations of how open-source software should function.\n";
|
||||||
|
|
||||||
|
// get the readme body
|
||||||
|
$readme[] = $this->readmeBuilder($items);
|
||||||
|
|
||||||
|
// yes you can remove this, but why?
|
||||||
|
$readme[] = "\n---\n```
|
||||||
|
██╗ ██████╗ ██████╗ ███╗ ███╗██╗ █████╗
|
||||||
|
██║██╔═══██╗██╔═══██╗████╗ ████║██║ ██╔══██╗
|
||||||
|
██║██║ ██║██║ ██║██╔████╔██║██║ ███████║
|
||||||
|
██ ██║██║ ██║██║ ██║██║╚██╔╝██║██║ ██╔══██║
|
||||||
|
╚█████╔╝╚██████╔╝╚██████╔╝██║ ╚═╝ ██║███████╗██║ ██║
|
||||||
|
╚════╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
|
||||||
|
██████╗ ██████╗ ███╗ ███╗██████╗ ██████╗ ███╗ ██╗███████╗███╗ ██╗████████╗
|
||||||
|
██╔════╝██╔═══██╗████╗ ████║██╔══██╗██╔═══██╗████╗ ██║██╔════╝████╗ ██║╚══██╔══╝
|
||||||
|
██║ ██║ ██║██╔████╔██║██████╔╝██║ ██║██╔██╗ ██║█████╗ ██╔██╗ ██║ ██║
|
||||||
|
██║ ██║ ██║██║╚██╔╝██║██╔═══╝ ██║ ██║██║╚██╗██║██╔══╝ ██║╚██╗██║ ██║
|
||||||
|
╚██████╗╚██████╔╝██║ ╚═╝ ██║██║ ╚██████╔╝██║ ╚████║███████╗██║ ╚████║ ██║
|
||||||
|
╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═════╝ ╚═╝ ╚═══╝╚══════╝╚═╝ ╚═══╝ ╚═╝
|
||||||
|
██████╗ ██╗ ██╗██╗██╗ ██████╗ ███████╗██████╗
|
||||||
|
██╔══██╗██║ ██║██║██║ ██╔══██╗██╔════╝██╔══██╗
|
||||||
|
██████╔╝██║ ██║██║██║ ██║ ██║█████╗ ██████╔╝
|
||||||
|
██╔══██╗██║ ██║██║██║ ██║ ██║██╔══╝ ██╔══██╗
|
||||||
|
██████╔╝╚██████╔╝██║███████╗██████╔╝███████╗██║ ██║
|
||||||
|
╚═════╝ ╚═════╝ ╚═╝╚══════╝╚═════╝ ╚══════╝╚═╝ ╚═╝
|
||||||
|
```\n> Build with [Joomla Component Builder](https://git.vdm.dev/joomla/Component-Builder)\n\n";
|
||||||
|
|
||||||
|
return implode("\n", $readme);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The readme builder
|
||||||
|
*
|
||||||
|
* @param array $classes The powers.
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
* @since 3.2.0
|
||||||
|
*/
|
||||||
|
private function readmeBuilder(array &$items): string
|
||||||
|
{
|
||||||
|
$classes = [];
|
||||||
|
foreach ($items as $guid => $power)
|
||||||
|
{
|
||||||
|
// add to the sort bucket
|
||||||
|
$classes[] = [
|
||||||
|
'name' => $power['name'],
|
||||||
|
'link' => $this->indexLinkPower($power)
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this->readmeModel($classes);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sort and model the readme classes
|
||||||
|
*
|
||||||
|
* @param array $classes The powers.
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
* @since 3.2.0
|
||||||
|
*/
|
||||||
|
private function readmeModel(array &$classes): string
|
||||||
|
{
|
||||||
|
$this->sortClasses($classes);
|
||||||
|
|
||||||
|
return $this->generateIndex($classes);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Generate the index string for classes
|
||||||
|
*
|
||||||
|
* @param array $classes The sorted classes
|
||||||
|
*
|
||||||
|
* @return string The index string
|
||||||
|
*/
|
||||||
|
private function generateIndex(array &$classes): string
|
||||||
|
{
|
||||||
|
$result = "# Index of Joomla! Field Types\n";
|
||||||
|
|
||||||
|
foreach ($classes as $class)
|
||||||
|
{
|
||||||
|
// Add the class details
|
||||||
|
$result .= "\n - " . $class['link'];
|
||||||
|
}
|
||||||
|
|
||||||
|
return $result;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sort the flattened array using a single sorting function
|
||||||
|
*
|
||||||
|
* @param array $classes The classes to sort
|
||||||
|
*
|
||||||
|
* @since 3.2.0
|
||||||
|
*/
|
||||||
|
private function sortClasses(array &$classes): void
|
||||||
|
{
|
||||||
|
usort($classes, function ($a, $b) {
|
||||||
|
return $this->compareName($a, $b);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Compare the name of two classes
|
||||||
|
*
|
||||||
|
* @param array $a First class
|
||||||
|
* @param array $b Second class
|
||||||
|
*
|
||||||
|
* @return int Comparison result
|
||||||
|
* @since 3.2.0
|
||||||
|
*/
|
||||||
|
private function compareName(array $a, array $b): int
|
||||||
|
{
|
||||||
|
return strcmp($a['name'], $b['name']);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Build the Link to the power in this repository
|
||||||
|
*
|
||||||
|
* @param array $power The power details.
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
* @since 3.2.0
|
||||||
|
*/
|
||||||
|
private function indexLinkPower(array &$power): string
|
||||||
|
{
|
||||||
|
$name = $power['name'] ?? 'error';
|
||||||
|
return '**' . $name . "** | "
|
||||||
|
. $this->linkPowerRepo($power) . ' | '
|
||||||
|
. $this->linkPowerSettings($power) . ' | '
|
||||||
|
. $this->linkPowerDesc($power);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Build the Link to the power in this repository
|
||||||
|
*
|
||||||
|
* @param array $power The power details.
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
* @since 3.2.0
|
||||||
|
*/
|
||||||
|
private function linkPowerRepo(array &$power): string
|
||||||
|
{
|
||||||
|
$path = $power['path'] ?? 'error';
|
||||||
|
return '[Details](' . $path . ')';
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Build the Link to the power settings in this repository
|
||||||
|
*
|
||||||
|
* @param array $power The power details.
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
* @since 3.2.0
|
||||||
|
*/
|
||||||
|
private function linkPowerSettings(array &$power): string
|
||||||
|
{
|
||||||
|
$settings = $power['settings'] ?? 'error';
|
||||||
|
return '[Settings](' . $settings . ')';
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the short description
|
||||||
|
*
|
||||||
|
* @param array $power The power details.
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
* @since 3.2.0
|
||||||
|
*/
|
||||||
|
private function linkPowerDesc(array &$power): string
|
||||||
|
{
|
||||||
|
$jpk = $power['desc'] ?? '';
|
||||||
|
return $jpk;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1 @@
|
|||||||
|
<html><body bgcolor="#FFFFFF"></body></html>
|
@ -0,0 +1,34 @@
|
|||||||
|
<?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\Fieldtype\Remote;
|
||||||
|
|
||||||
|
|
||||||
|
use VDM\Joomla\Interfaces\Remote\GetInterface;
|
||||||
|
use VDM\Joomla\Abstraction\Remote\Get as ExtendingGet;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Remote Get Field Type of JCB
|
||||||
|
*
|
||||||
|
* @since 5.0.3
|
||||||
|
*/
|
||||||
|
final class Get extends ExtendingGet implements GetInterface
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Table Name
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
* @since 5.0.3
|
||||||
|
*/
|
||||||
|
protected string $table = 'fieldtype';
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,218 @@
|
|||||||
|
<?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\Fieldtype\Remote;
|
||||||
|
|
||||||
|
|
||||||
|
use VDM\Joomla\Interfaces\Remote\SetInterface;
|
||||||
|
use VDM\Joomla\Abstraction\Remote\Set as ExtendingSet;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set Field Type based on global unique ids to remote repository
|
||||||
|
*
|
||||||
|
* @since 5.0.3
|
||||||
|
*/
|
||||||
|
final class Set extends ExtendingSet implements SetInterface
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Table Name
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
* @since 5.0.3
|
||||||
|
*/
|
||||||
|
protected string $table = 'fieldtype';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Area Name
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
* @since 5.0.3
|
||||||
|
*/
|
||||||
|
protected string $area = 'Joomla Field Type';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Prefix Key
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
* @since 5.0.3
|
||||||
|
*/
|
||||||
|
protected string $prefix_key = '';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The item map
|
||||||
|
*
|
||||||
|
* @var array
|
||||||
|
* @since 5.0.3
|
||||||
|
*/
|
||||||
|
protected array $map = [
|
||||||
|
'name' => 'name',
|
||||||
|
'short_description' => 'short_description',
|
||||||
|
'description' => 'description',
|
||||||
|
'properties' => 'properties',
|
||||||
|
'has_defaults' => 'has_defaults',
|
||||||
|
'datatype' => 'datatype',
|
||||||
|
'datalenght' => 'datalenght',
|
||||||
|
'datalenght_other' => 'datalenght_other',
|
||||||
|
'datadefault' => 'datadefault',
|
||||||
|
'datadefault_other' => 'datadefault_other',
|
||||||
|
'indexes' => 'indexes',
|
||||||
|
'null_switch' => 'null_switch',
|
||||||
|
'store' => 'store',
|
||||||
|
'guid' => 'guid'
|
||||||
|
];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The index map
|
||||||
|
*
|
||||||
|
* @var array
|
||||||
|
* @since 5.0.3
|
||||||
|
*/
|
||||||
|
protected array $index_map = [
|
||||||
|
'name' => 'index_map_IndexName',
|
||||||
|
'desc' => 'index_map_ShortDescription',
|
||||||
|
'settings' => 'index_map_IndexSettingsPath',
|
||||||
|
'path' => 'index_map_IndexPath',
|
||||||
|
'guid' => 'index_map_IndexGUID'
|
||||||
|
];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* update an existing item (if changed)
|
||||||
|
*
|
||||||
|
* @param object $item
|
||||||
|
* @param object $existing
|
||||||
|
* @param object $repo
|
||||||
|
*
|
||||||
|
* @return bool
|
||||||
|
* @since 5.0.3
|
||||||
|
*/
|
||||||
|
protected function updateItem(object $item, object $existing, object $repo): bool
|
||||||
|
{
|
||||||
|
// make sure there was a change
|
||||||
|
$sha = $existing->params->source[$repo->guid . '-settings'] ?? null;
|
||||||
|
$existing = $this->mapItem($existing);
|
||||||
|
if ($sha === null || $this->areObjectsEqual($item, $existing))
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->git->update(
|
||||||
|
$repo->organisation, // The owner name.
|
||||||
|
$repo->repository, // The repository name.
|
||||||
|
'src/' . $item->guid . '/' . $this->getSettingsPath(), // The file path.
|
||||||
|
json_encode($item, JSON_PRETTY_PRINT), // The file content.
|
||||||
|
'Update ' . $item->name, // The commit message.
|
||||||
|
$sha, // The blob SHA of the old file.
|
||||||
|
$repo->write_branch // The branch name.
|
||||||
|
);
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* create a new item
|
||||||
|
*
|
||||||
|
* @param object $item
|
||||||
|
* @param object $repo
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
* @since 5.0.3
|
||||||
|
*/
|
||||||
|
protected function createItem(object $item, object $repo): void
|
||||||
|
{
|
||||||
|
$this->git->create(
|
||||||
|
$repo->organisation, // The owner name.
|
||||||
|
$repo->repository, // The repository name.
|
||||||
|
'src/' . $item->guid . '/' . $this->getSettingsPath(), // The file path.
|
||||||
|
json_encode($item, JSON_PRETTY_PRINT), // The file content.
|
||||||
|
'Create ' . $item->name, // The commit message.
|
||||||
|
$repo->write_branch // The branch name.
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* update an existing item readme
|
||||||
|
*
|
||||||
|
* @param object $item
|
||||||
|
* @param object $existing
|
||||||
|
* @param object $repo
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
* @since 5.0.3
|
||||||
|
*/
|
||||||
|
protected function updateItemReadme(object $item, object $existing, object $repo): void
|
||||||
|
{
|
||||||
|
// make sure there was a change
|
||||||
|
$sha = $existing->params->source[$repo->guid . '-readme'] ?? null;
|
||||||
|
if ($sha === null)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->git->update(
|
||||||
|
$repo->organisation, // The owner name.
|
||||||
|
$repo->repository, // The repository name.
|
||||||
|
'src/' . $item->guid . '/README.md', // The file path.
|
||||||
|
$this->itemReadme->get($item), // The file content.
|
||||||
|
'Update ' . $item->name . ' readme file', // The commit message.
|
||||||
|
$sha, // The blob SHA of the old file.
|
||||||
|
$repo->write_branch // The branch name.
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* create a new item readme
|
||||||
|
*
|
||||||
|
* @param object $item
|
||||||
|
* @param object $repo
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
* @since 5.0.3
|
||||||
|
*/
|
||||||
|
protected function createItemReadme(object $item, object $repo): void
|
||||||
|
{
|
||||||
|
$this->git->create(
|
||||||
|
$repo->organisation, // The owner name.
|
||||||
|
$repo->repository, // The repository name.
|
||||||
|
'src/' . $item->guid . '/README.md', // The file path.
|
||||||
|
$this->itemReadme->get($item), // The file content.
|
||||||
|
'Create ' . $item->name . ' readme file', // The commit message.
|
||||||
|
$repo->write_branch // The branch name.
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the item name for the index values
|
||||||
|
*
|
||||||
|
* @param object $item
|
||||||
|
*
|
||||||
|
* @return string|null
|
||||||
|
* @since 5.0.3
|
||||||
|
*/
|
||||||
|
protected function index_map_IndexName(object $item): ?string
|
||||||
|
{
|
||||||
|
return $item->name ?? null;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the item Short Description for the index values
|
||||||
|
*
|
||||||
|
* @param object $item
|
||||||
|
*
|
||||||
|
* @return string|null
|
||||||
|
* @since 5.0.3
|
||||||
|
*/
|
||||||
|
protected function index_map_ShortDescription(object $item): ?string
|
||||||
|
{
|
||||||
|
return $item->short_description ?? null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1 @@
|
|||||||
|
<html><body bgcolor="#FFFFFF"></body></html>
|
@ -0,0 +1,169 @@
|
|||||||
|
<?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\Fieldtype\Service;
|
||||||
|
|
||||||
|
|
||||||
|
use Joomla\DI\Container;
|
||||||
|
use Joomla\DI\ServiceProviderInterface;
|
||||||
|
use VDM\Joomla\Componentbuilder\Fieldtype\Config;
|
||||||
|
use VDM\Joomla\Componentbuilder\Table;
|
||||||
|
use VDM\Joomla\Componentbuilder\Fieldtype\Grep;
|
||||||
|
use VDM\Joomla\Componentbuilder\Fieldtype\Remote\Get;
|
||||||
|
use VDM\Joomla\Componentbuilder\Fieldtype\Remote\Set;
|
||||||
|
use VDM\Joomla\Componentbuilder\Fieldtype\Readme\Item as ItemReadme;
|
||||||
|
use VDM\Joomla\Componentbuilder\Fieldtype\Readme\Main as MainReadme;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Field Type Service Provider
|
||||||
|
*
|
||||||
|
* @since 5.0.3
|
||||||
|
*/
|
||||||
|
class Fieldtype implements ServiceProviderInterface
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Registers the service provider with a DI container.
|
||||||
|
*
|
||||||
|
* @param Container $container The DI container.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
* @since 3.2.1
|
||||||
|
*/
|
||||||
|
public function register(Container $container)
|
||||||
|
{
|
||||||
|
$container->alias(Config::class, 'Config')
|
||||||
|
->share('Config', [$this, 'getConfig'], true);
|
||||||
|
|
||||||
|
$container->alias(Table::class, 'Table')
|
||||||
|
->share('Table', [$this, 'getTable'], true);
|
||||||
|
|
||||||
|
$container->alias(Grep::class, 'Joomla.Fieldtype.Grep')
|
||||||
|
->share('Joomla.Fieldtype.Grep', [$this, 'getGrep'], true);
|
||||||
|
|
||||||
|
$container->alias(Get::class, 'Joomla.Fieldtype.Remote.Get')
|
||||||
|
->share('Joomla.Fieldtype.Remote.Get', [$this, 'getRemoteGet'], true);
|
||||||
|
|
||||||
|
$container->alias(Set::class, 'Joomla.Fieldtype.Remote.Set')
|
||||||
|
->share('Joomla.Fieldtype.Remote.Set', [$this, 'getRemoteSet'], true);
|
||||||
|
|
||||||
|
$container->alias(ItemReadme::class, 'Joomla.Fieldtype.Readme.Item')
|
||||||
|
->share('Joomla.Fieldtype.Readme.Item', [$this, 'getItemReadme'], true);
|
||||||
|
|
||||||
|
$container->alias(MainReadme::class, 'Joomla.Fieldtype.Readme.Main')
|
||||||
|
->share('Joomla.Fieldtype.Readme.Main', [$this, 'getMainReadme'], true);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get The Config Class.
|
||||||
|
*
|
||||||
|
* @param Container $container The DI container.
|
||||||
|
*
|
||||||
|
* @return Config
|
||||||
|
* @since 3.2.1
|
||||||
|
*/
|
||||||
|
public function getConfig(Container $container): Config
|
||||||
|
{
|
||||||
|
return new Config();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get The Table Class.
|
||||||
|
*
|
||||||
|
* @param Container $container The DI container.
|
||||||
|
*
|
||||||
|
* @return Table
|
||||||
|
* @since 3.2.1
|
||||||
|
*/
|
||||||
|
public function getTable(Container $container): Table
|
||||||
|
{
|
||||||
|
return new Table();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get The Grep Class.
|
||||||
|
*
|
||||||
|
* @param Container $container The DI container.
|
||||||
|
*
|
||||||
|
* @return Grep
|
||||||
|
* @since 3.2.1
|
||||||
|
*/
|
||||||
|
public function getGrep(Container $container): Grep
|
||||||
|
{
|
||||||
|
return new Grep(
|
||||||
|
$container->get('Gitea.Repository.Contents'),
|
||||||
|
$container->get('Config')->approved_joomla_paths
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get The Remote Get Class.
|
||||||
|
*
|
||||||
|
* @param Container $container The DI container.
|
||||||
|
*
|
||||||
|
* @return Get
|
||||||
|
* @since 3.2.1
|
||||||
|
*/
|
||||||
|
public function getRemoteGet(Container $container): Get
|
||||||
|
{
|
||||||
|
return new Get(
|
||||||
|
$container->get('Joomla.Fieldtype.Grep'),
|
||||||
|
$container->get('Data.Item')
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get The Remote Set Class.
|
||||||
|
*
|
||||||
|
* @param Container $container The DI container.
|
||||||
|
*
|
||||||
|
* @return Set
|
||||||
|
* @since 3.2.2
|
||||||
|
*/
|
||||||
|
public function getRemoteSet(Container $container): Set
|
||||||
|
{
|
||||||
|
return new Set(
|
||||||
|
$container->get('Config')->approved_joomla_paths,
|
||||||
|
$container->get('Joomla.Fieldtype.Grep'),
|
||||||
|
$container->get('Data.Items'),
|
||||||
|
$container->get('Joomla.Fieldtype.Readme.Item'),
|
||||||
|
$container->get('Joomla.Fieldtype.Readme.Main'),
|
||||||
|
$container->get('Gitea.Repository.Contents')
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get The Item Class.
|
||||||
|
*
|
||||||
|
* @param Container $container The DI container.
|
||||||
|
*
|
||||||
|
* @return ItemReadme
|
||||||
|
* @since 3.2.1
|
||||||
|
*/
|
||||||
|
public function getItemReadme(Container $container): ItemReadme
|
||||||
|
{
|
||||||
|
return new ItemReadme();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get The Main Class.
|
||||||
|
*
|
||||||
|
* @param Container $container The DI container.
|
||||||
|
*
|
||||||
|
* @return MainReadme
|
||||||
|
* @since 3.2.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>
|
Loading…
Reference in New Issue
Block a user