Release of v5.1.1-beta2
Enhance operator support in dynamic get system. Relates to issue #1226.
This commit is contained in:
10
CHANGELOG.md
10
CHANGELOG.md
@ -1,8 +1,9 @@
|
||||
# v5.1.1-beta1
|
||||
# v5.1.1-beta2
|
||||
|
||||
- Add JCB new package engine.
|
||||
- Enhance operator support in dynamic get system. Relates to issue #1226.
|
||||
|
||||
# v5.1.1-alpha
|
||||
|
||||
# v5.1.1-beta
|
||||
|
||||
- Move all banners to GitHub.
|
||||
- Adds library phpspreadsheet to JCB.
|
||||
@ -18,7 +19,8 @@
|
||||
- Add all needed Powers to the release package, to speed-up the build of the demo component.
|
||||
- Refactor initialization flow to accommodate future scalability and integration with all designated areas.
|
||||
- Refactor the Creator Builders class.
|
||||
- Refactor the FieldString and FieldXML classes.
|
||||
- Refactor the FieldString and FieldXML classes.
|
||||
- Add JCB new package engine.
|
||||
|
||||
# v5.1.0
|
||||
|
||||
|
@ -3292,7 +3292,7 @@ class Com_ComponentbuilderInstallerScript implements InstallerScriptInterface
|
||||
echo '<div style="background-color: #fff;" class="alert alert-info"><a target="_blank" href="https://dev.vdm.io" title="Component Builder">
|
||||
<img src="components/com_componentbuilder/assets/images/vdm-component.jpg"/>
|
||||
</a>
|
||||
<h3>Upgrade to Version 5.1.1-beta1 Was Successful! Let us know if anything is not working as expected.</h3></div>';
|
||||
<h3>Upgrade to Version 5.1.1-beta2 Was Successful! Let us know if anything is not working as expected.</h3></div>';
|
||||
|
||||
// Add/Update component in the action logs extensions table.
|
||||
$this->setActionLogsExtensions();
|
||||
|
@ -9,7 +9,7 @@ This is a professional-grade [Joomla 5.x](https://extensions.joomla.org/extensio
|
||||
|
||||
JCB generates native Joomla components, plugins, and modules for Joomla 3.x, 4.x, and 5.x — and is already prepared for Joomla 6. Every compiled project is tailored for the specific version without needing backward compatibility plugins. With integrated version-aware compiling, smart boilerplating, and Git-powered project syncing, JCB is much more than a code generator—it's a **full-stack development pipeline for Joomla extensions**.
|
||||
|
||||
You can install this component easily. The latest release (**5.1.1-beta1**) is available on [Releases](https://git.vdm.dev/joomla/pkg-component-builder/releases) and updated frequently with full source access.
|
||||
You can install this component easily. The latest release (**5.1.1-beta2**) is available on [Releases](https://git.vdm.dev/joomla/pkg-component-builder/releases) and updated frequently with full source access.
|
||||
|
||||
Upgrades are seamless through Joomla’s built-in extension update mechanism.
|
||||
|
||||
@ -229,9 +229,9 @@ JCB is developed by developers for developers. Its purpose is to democratize hig
|
||||
* **Company:** [Vast Development Method](https://dev.vdm.io)
|
||||
* **Author:** [Llewellyn van der Merwe](mailto:joomla@vdm.io)
|
||||
* **Component:** [Component Builder](https://git.vdm.dev/joomla/Component-Builder)
|
||||
* **Created:** 30th April, 2015 · **Last Build:** 18th June, 2025 · **Version:** 5.1.1-beta1
|
||||
* **Created:** 30th April, 2015 · **Last Build:** 19th June, 2025 · **Version:** 5.1.1-beta2
|
||||
* **License:** GNU General Public License version 2 or later; see LICENSE.txt · **Copyright:** Copyright (C) 2015 Vast Development Method. All rights reserved.
|
||||
* **Lines:** 1086732 · **Fields:** 2096 · **Files:** 7420 · **Folders:** 724
|
||||
* **Lines:** 1086810 · **Fields:** 2096 · **Files:** 7419 · **Folders:** 724
|
||||
|
||||
> Generated with [JCB](https://www.joomlacomponentbuilder.com) — The Smartest Way to Build Joomla Extensions.
|
||||
|
||||
|
@ -9,7 +9,7 @@ This is a professional-grade [Joomla 5.x](https://extensions.joomla.org/extensio
|
||||
|
||||
JCB generates native Joomla components, plugins, and modules for Joomla 3.x, 4.x, and 5.x — and is already prepared for Joomla 6. Every compiled project is tailored for the specific version without needing backward compatibility plugins. With integrated version-aware compiling, smart boilerplating, and Git-powered project syncing, JCB is much more than a code generator—it's a **full-stack development pipeline for Joomla extensions**.
|
||||
|
||||
You can install this component easily. The latest release (**5.1.1-beta1**) is available on [Releases](https://git.vdm.dev/joomla/pkg-component-builder/releases) and updated frequently with full source access.
|
||||
You can install this component easily. The latest release (**5.1.1-beta2**) is available on [Releases](https://git.vdm.dev/joomla/pkg-component-builder/releases) and updated frequently with full source access.
|
||||
|
||||
Upgrades are seamless through Joomla’s built-in extension update mechanism.
|
||||
|
||||
@ -229,9 +229,9 @@ JCB is developed by developers for developers. Its purpose is to democratize hig
|
||||
* **Company:** [Vast Development Method](https://dev.vdm.io)
|
||||
* **Author:** [Llewellyn van der Merwe](mailto:joomla@vdm.io)
|
||||
* **Component:** [Component Builder](https://git.vdm.dev/joomla/Component-Builder)
|
||||
* **Created:** 30th April, 2015 · **Last Build:** 18th June, 2025 · **Version:** 5.1.1-beta1
|
||||
* **Created:** 30th April, 2015 · **Last Build:** 19th June, 2025 · **Version:** 5.1.1-beta2
|
||||
* **License:** GNU General Public License version 2 or later; see LICENSE.txt · **Copyright:** Copyright (C) 2015 Vast Development Method. All rights reserved.
|
||||
* **Lines:** 1086732 · **Fields:** 2096 · **Files:** 7420 · **Folders:** 724
|
||||
* **Lines:** 1086810 · **Fields:** 2096 · **Files:** 7419 · **Folders:** 724
|
||||
|
||||
> Generated with [JCB](https://www.joomlacomponentbuilder.com) — The Smartest Way to Build Joomla Extensions.
|
||||
|
||||
|
@ -570,30 +570,52 @@
|
||||
multiple="false"
|
||||
filter="INT"
|
||||
required="true"
|
||||
default="0">
|
||||
default="1">
|
||||
<!-- Option Set. -->
|
||||
<option value="1">
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_EQUAL</option>
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_EQUAL_</option>
|
||||
<option value="2">
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_NOT_EQUAL</option>
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_NOT_EQUAL_NE</option>
|
||||
<option value="3">
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_EQUAL_OR_NOT</option>
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_NOT_EQUAL_ALT_LTGT</option>
|
||||
<option value="4">
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_GREATER_THAN</option>
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_GREATER_THAN_GT</option>
|
||||
<option value="5">
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_LESS_THAN</option>
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_LESS_THAN_LT</option>
|
||||
<option value="6">
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_GREATER_THAN_OR_EQUAL</option>
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_GREATER_THAN_OR_EQUAL_GE</option>
|
||||
<option value="7">
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_LESS_THAN_OR_EQUAL_TO</option>
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_LESS_THAN_OR_EQUAL_LE</option>
|
||||
<option value="8">
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_NOT_LESS_THAN</option>
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_NOT_LESS_THAN_LT</option>
|
||||
<option value="9">
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_NOT_GREATER_THAN</option>
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_NOT_GREATER_THAN_GT</option>
|
||||
<option value="10">
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_IN</option>
|
||||
<option value="11">
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_NOT_IN</option>
|
||||
<option value="12">
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_LIKE</option>
|
||||
<option value="13">
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_NOT_LIKE</option>
|
||||
<option value="14">
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_IS_NULL</option>
|
||||
<option value="15">
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_IS_NOT_NULL</option>
|
||||
<option value="16">
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_BETWEEN</option>
|
||||
<option value="17">
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_NOT_BETWEEN</option>
|
||||
<option value="18">
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_EXISTS</option>
|
||||
<option value="19">
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_NOT_EXISTS</option>
|
||||
<option value="20">
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_REGEXP</option>
|
||||
<option value="21">
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_NOT_REGEXP</option>
|
||||
<option value="22">
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_SOUNDS_LIKE</option>
|
||||
</field>
|
||||
<!-- Join_field Field. Type: Text. (joomla) -->
|
||||
<field
|
||||
@ -812,30 +834,52 @@
|
||||
multiple="false"
|
||||
filter="INT"
|
||||
required="true"
|
||||
default="0">
|
||||
default="1">
|
||||
<!-- Option Set. -->
|
||||
<option value="1">
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_EQUAL</option>
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_EQUAL_</option>
|
||||
<option value="2">
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_NOT_EQUAL</option>
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_NOT_EQUAL_NE</option>
|
||||
<option value="3">
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_EQUAL_OR_NOT</option>
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_NOT_EQUAL_ALT_LTGT</option>
|
||||
<option value="4">
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_GREATER_THAN</option>
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_GREATER_THAN_GT</option>
|
||||
<option value="5">
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_LESS_THAN</option>
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_LESS_THAN_LT</option>
|
||||
<option value="6">
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_GREATER_THAN_OR_EQUAL</option>
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_GREATER_THAN_OR_EQUAL_GE</option>
|
||||
<option value="7">
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_LESS_THAN_OR_EQUAL_TO</option>
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_LESS_THAN_OR_EQUAL_LE</option>
|
||||
<option value="8">
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_NOT_LESS_THAN</option>
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_NOT_LESS_THAN_LT</option>
|
||||
<option value="9">
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_NOT_GREATER_THAN</option>
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_NOT_GREATER_THAN_GT</option>
|
||||
<option value="10">
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_IN</option>
|
||||
<option value="11">
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_NOT_IN</option>
|
||||
<option value="12">
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_LIKE</option>
|
||||
<option value="13">
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_NOT_LIKE</option>
|
||||
<option value="14">
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_IS_NULL</option>
|
||||
<option value="15">
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_IS_NOT_NULL</option>
|
||||
<option value="16">
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_BETWEEN</option>
|
||||
<option value="17">
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_NOT_BETWEEN</option>
|
||||
<option value="18">
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_EXISTS</option>
|
||||
<option value="19">
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_NOT_EXISTS</option>
|
||||
<option value="20">
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_REGEXP</option>
|
||||
<option value="21">
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_NOT_REGEXP</option>
|
||||
<option value="22">
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_SOUNDS_LIKE</option>
|
||||
</field>
|
||||
<!-- Table_key Field. Type: Text. (joomla) -->
|
||||
<field
|
||||
@ -917,30 +961,52 @@
|
||||
multiple="false"
|
||||
filter="INT"
|
||||
required="true"
|
||||
default="0">
|
||||
default="1">
|
||||
<!-- Option Set. -->
|
||||
<option value="1">
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_EQUAL</option>
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_EQUAL_</option>
|
||||
<option value="2">
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_NOT_EQUAL</option>
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_NOT_EQUAL_NE</option>
|
||||
<option value="3">
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_EQUAL_OR_NOT</option>
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_NOT_EQUAL_ALT_LTGT</option>
|
||||
<option value="4">
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_GREATER_THAN</option>
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_GREATER_THAN_GT</option>
|
||||
<option value="5">
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_LESS_THAN</option>
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_LESS_THAN_LT</option>
|
||||
<option value="6">
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_GREATER_THAN_OR_EQUAL</option>
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_GREATER_THAN_OR_EQUAL_GE</option>
|
||||
<option value="7">
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_LESS_THAN_OR_EQUAL_TO</option>
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_LESS_THAN_OR_EQUAL_LE</option>
|
||||
<option value="8">
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_NOT_LESS_THAN</option>
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_NOT_LESS_THAN_LT</option>
|
||||
<option value="9">
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_NOT_GREATER_THAN</option>
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_NOT_GREATER_THAN_GT</option>
|
||||
<option value="10">
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_IN</option>
|
||||
<option value="11">
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_NOT_IN</option>
|
||||
<option value="12">
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_LIKE</option>
|
||||
<option value="13">
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_NOT_LIKE</option>
|
||||
<option value="14">
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_IS_NULL</option>
|
||||
<option value="15">
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_IS_NOT_NULL</option>
|
||||
<option value="16">
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_BETWEEN</option>
|
||||
<option value="17">
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_NOT_BETWEEN</option>
|
||||
<option value="18">
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_EXISTS</option>
|
||||
<option value="19">
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_NOT_EXISTS</option>
|
||||
<option value="20">
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_REGEXP</option>
|
||||
<option value="21">
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_NOT_REGEXP</option>
|
||||
<option value="22">
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_SOUNDS_LIKE</option>
|
||||
</field>
|
||||
<!-- Value_key Field. Type: Text. (joomla) -->
|
||||
<field
|
||||
@ -1451,30 +1517,52 @@
|
||||
multiple="false"
|
||||
filter="INT"
|
||||
required="true"
|
||||
default="0">
|
||||
default="1">
|
||||
<!-- Option Set. -->
|
||||
<option value="1">
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_EQUAL</option>
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_EQUAL_</option>
|
||||
<option value="2">
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_NOT_EQUAL</option>
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_NOT_EQUAL_NE</option>
|
||||
<option value="3">
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_EQUAL_OR_NOT</option>
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_NOT_EQUAL_ALT_LTGT</option>
|
||||
<option value="4">
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_GREATER_THAN</option>
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_GREATER_THAN_GT</option>
|
||||
<option value="5">
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_LESS_THAN</option>
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_LESS_THAN_LT</option>
|
||||
<option value="6">
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_GREATER_THAN_OR_EQUAL</option>
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_GREATER_THAN_OR_EQUAL_GE</option>
|
||||
<option value="7">
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_LESS_THAN_OR_EQUAL_TO</option>
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_LESS_THAN_OR_EQUAL_LE</option>
|
||||
<option value="8">
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_NOT_LESS_THAN</option>
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_NOT_LESS_THAN_LT</option>
|
||||
<option value="9">
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_NOT_GREATER_THAN</option>
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_NOT_GREATER_THAN_GT</option>
|
||||
<option value="10">
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_IN</option>
|
||||
<option value="11">
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_NOT_IN</option>
|
||||
<option value="12">
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_LIKE</option>
|
||||
<option value="13">
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_NOT_LIKE</option>
|
||||
<option value="14">
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_IS_NULL</option>
|
||||
<option value="15">
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_IS_NOT_NULL</option>
|
||||
<option value="16">
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_BETWEEN</option>
|
||||
<option value="17">
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_NOT_BETWEEN</option>
|
||||
<option value="18">
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_EXISTS</option>
|
||||
<option value="19">
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_NOT_EXISTS</option>
|
||||
<option value="20">
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_REGEXP</option>
|
||||
<option value="21">
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_NOT_REGEXP</option>
|
||||
<option value="22">
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_SOUNDS_LIKE</option>
|
||||
</field>
|
||||
<!-- Join_field Field. Type: Text. (joomla) -->
|
||||
<field
|
||||
|
@ -4326,6 +4326,7 @@ COM_COMPONENTBUILDER_DYNAMIC_GET_AS_LABEL="AS"
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_B="b"
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_BACKEND_VIEW="Back-end View"
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_BB="bb"
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_BETWEEN="BETWEEN"
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_C="c"
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_CATEGORIES="Categories"
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_CC="cc"
|
||||
@ -4352,10 +4353,10 @@ COM_COMPONENTBUILDER_DYNAMIC_GET_EDIT="Editing the Dynamic Get"
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_EE="ee"
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_EMPTY_DESCRIPTION="Empty"
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_EMPTY_LABEL="Allow"
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_EQUAL="equal"
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_EQUAL_OR_NOT="equal or not"
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_EQUAL_="Equal (=)"
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_ERROR_UNIQUE_ALIAS="Another Dynamic Get has the same alias."
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_ERROR_UNIQUE_ALIAS_TRASHED="A trashed Dynamic Get has the same alias ."
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_EXISTS="EXISTS"
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_F="f"
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_FF="ff"
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_FILTER_DESCRIPTION="Here you can add filters to the query."
|
||||
@ -4377,8 +4378,8 @@ COM_COMPONENTBUILDER_DYNAMIC_GET_GETTYPE_LABEL="getType"
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_GG="gg"
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_GLOBAL_DESCRIPTION="Here you can add global variables."
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_GLOBAL_LABEL="Set Global"
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_GREATER_THAN="greater than"
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_GREATER_THAN_OR_EQUAL="greater than or equal"
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_GREATER_THAN_GT="Greater Than (>)"
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_GREATER_THAN_OR_EQUAL_GE="Greater Than or Equal (≥)"
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_GROUP_DESCRIPTION="Here you can set the grouping per data set."
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_GROUP_LABEL="Grouping"
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_GUID_DESCRIPTION="Globally Unique Identifier"
|
||||
@ -4392,6 +4393,8 @@ COM_COMPONENTBUILDER_DYNAMIC_GET_II="ii"
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_IN="IN"
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_INIT_BUTTON_ACCESS="Dynamic Get Init Button Access"
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_INIT_BUTTON_ACCESS_DESC="Allows the users in this group to access the init button."
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_IS_NOT_NULL="IS NOT NULL"
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_IS_NULL="IS NULL"
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_J="j"
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_JJ="jj"
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_JOINT="Joint"
|
||||
@ -4416,8 +4419,9 @@ COM_COMPONENTBUILDER_DYNAMIC_GET_KEY_LABEL="Table Key/As Name"
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_KEY_MESSAGE="Error! Please add table as name here."
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_KK="kk"
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_L="l"
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_LESS_THAN="less than"
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_LESS_THAN_OR_EQUAL_TO="less than or equal to"
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_LESS_THAN_LT="Less Than (<)"
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_LESS_THAN_OR_EQUAL_LE="Less Than or Equal (≤)"
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_LIKE="LIKE"
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_LL="ll"
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_M="m"
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_MAIN="Main"
|
||||
@ -4441,10 +4445,15 @@ COM_COMPONENTBUILDER_DYNAMIC_GET_NOTE_CALCULATION_ITEMS_DESCRIPTION="Fields are
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_NOTE_CALCULATION_ITEM_DESCRIPTION="Fields are in the $data Object."
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_NOTE_LINKED_TO_NOTICE_DESCRIPTION="<div id='display_linked_to'>Searching the database.<span class='loading-dots'></span></div>"
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_NOTE_LINKED_TO_NOTICE_LABEL="Linked To"
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_NOT_EQUAL="not equal"
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_NOT_GREATER_THAN="not greater than"
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_NOT_BETWEEN="NOT BETWEEN"
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_NOT_EQUAL_ALT_LTGT="Not Equal (Alt <>)"
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_NOT_EQUAL_NE="Not Equal (≠)"
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_NOT_EXISTS="NOT EXISTS"
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_NOT_GREATER_THAN_GT="Not Greater Than (!>)"
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_NOT_IN="NOT IN"
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_NOT_LESS_THAN="not less than"
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_NOT_LESS_THAN_LT="Not Less Than (!<)"
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_NOT_LIKE="NOT LIKE"
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_NOT_REGEXP="NOT REGEXP"
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_NOT_REQUIRED="Not Required"
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_O="o"
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_ONCONTENTAFTERDISPLAY="onContentAfterDisplay"
|
||||
@ -4495,6 +4504,7 @@ COM_COMPONENTBUILDER_DYNAMIC_GET_Q="q"
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_QQ="qq"
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_R="r"
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_RANDOM="Random"
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_REGEXP="REGEXP"
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_REPEATABLE_VALUE="Repeatable Value"
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_RESET_BUTTON_ACCESS="Dynamic Get Reset Button Access"
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_RESET_BUTTON_ACCESS_DESC="Allows the users in this group to access the reset button."
|
||||
@ -4509,6 +4519,7 @@ COM_COMPONENTBUILDER_DYNAMIC_GET_SELECTION_LABEL="Selection"
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_SELECT_ALL_DESCRIPTION="Should all the fields be selected, even those newly added at a later stage."
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_SELECT_ALL_LABEL="Select All"
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_SINGLE="Single"
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_SOUNDS_LIKE="SOUNDS LIKE"
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_SS="ss"
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_STATE="State"
|
||||
COM_COMPONENTBUILDER_DYNAMIC_GET_STATE_KEY_DESCRIPTION="The key to use to get state value or the var name."
|
||||
|
@ -1 +0,0 @@
|
||||
ALTER TABLE `#__componentbuilder_repository` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
@ -1,15 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<extension type="component" version="5.0" method="upgrade">
|
||||
<name>COM_COMPONENTBUILDER</name>
|
||||
<creationDate>18th June, 2025</creationDate>
|
||||
<creationDate>19th June, 2025</creationDate>
|
||||
<author>Llewellyn van der Merwe</author>
|
||||
<authorEmail>joomla@vdm.io</authorEmail>
|
||||
<authorUrl>https://dev.vdm.io</authorUrl>
|
||||
<copyright>Copyright (C) 2015 Vast Development Method. All rights reserved.</copyright>
|
||||
<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
|
||||
<version>5.1.1-beta1</version>
|
||||
<version>5.1.1-beta2</version>
|
||||
<description>< is highly advanced tool that is truly able to build extremely complex components in a fraction of the time.
|
||||
|
||||
|
@ -131,28 +131,10 @@
|
||||
<element>pkg_component_builder</element>
|
||||
<type>package</type>
|
||||
<client>site</client>
|
||||
<version>5.1.1-alpha</version>
|
||||
<version>5.1.1-beta</version>
|
||||
<infourl title="Component Builder!">https://dev.vdm.io</infourl>
|
||||
<downloads>
|
||||
<downloadurl type="full" format="zip">https://github.com/vdm-io/pkg-component-builder/archive/refs/tags/v5.1.1-alpha4.zip</downloadurl>
|
||||
</downloads>
|
||||
<tags>
|
||||
<tag>alpha</tag>
|
||||
</tags>
|
||||
<maintainer>Llewellyn van der Merwe</maintainer>
|
||||
<maintainerurl>https://dev.vdm.io</maintainerurl>
|
||||
<targetplatform name="joomla" version="5\.[012]"/>
|
||||
</update>
|
||||
<update>
|
||||
<name>Component Builder</name>
|
||||
<description>Builds Complex Joomla Components</description>
|
||||
<element>pkg_component_builder</element>
|
||||
<type>package</type>
|
||||
<client>site</client>
|
||||
<version>5.1.1-beta1</version>
|
||||
<infourl title="Component Builder!">https://dev.vdm.io</infourl>
|
||||
<downloads>
|
||||
<downloadurl type="full" format="zip">https://github.com/vdm-io/pkg-component-builder/archive/refs/tags/v5.1.1-beta1.zip</downloadurl>
|
||||
<downloadurl type="full" format="zip">https://github.com/vdm-io/pkg-component-builder/archive/refs/tags/v5.1.1-beta2.zip</downloadurl>
|
||||
</downloads>
|
||||
<tags>
|
||||
<tag>beta</tag>
|
||||
@ -164,18 +146,19 @@
|
||||
<update>
|
||||
<name>Component Builder</name>
|
||||
<description>Builds Complex Joomla Components</description>
|
||||
<element>com_componentbuilder</element>
|
||||
<type>component</type>
|
||||
<version>5.1.1-alpha5</version>
|
||||
<element>pkg_component_builder</element>
|
||||
<type>package</type>
|
||||
<client>site</client>
|
||||
<version>5.1.1-beta2</version>
|
||||
<infourl title="Component Builder!">https://dev.vdm.io</infourl>
|
||||
<downloads>
|
||||
<downloadurl type="full" format="zip">https://github.com/vdm-io/pkg-component-builder/archive/refs/tags/v5.1.1-alpha5.zip</downloadurl>
|
||||
<downloadurl type="full" format="zip">https://github.com/vdm-io/pkg-component-builder/archive/refs/tags/v5.1.1-beta2.zip</downloadurl>
|
||||
</downloads>
|
||||
<tags>
|
||||
<tag>stable</tag>
|
||||
<tag>beta</tag>
|
||||
</tags>
|
||||
<maintainer>Llewellyn van der Merwe</maintainer>
|
||||
<maintainerurl>https://dev.vdm.io</maintainerurl>
|
||||
<targetplatform name="joomla" version="5.*"/>
|
||||
<targetplatform name="joomla" version="5\.[012]"/>
|
||||
</update>
|
||||
</updates>
|
@ -35,7 +35,7 @@ class Dynamicget
|
||||
* The joint types
|
||||
*
|
||||
* @var array
|
||||
* @since 3.2.0
|
||||
* @since 3.2.0
|
||||
*/
|
||||
protected array $jointer = [
|
||||
1 => 'LEFT',
|
||||
@ -49,20 +49,31 @@ class Dynamicget
|
||||
* The operator types
|
||||
*
|
||||
* @var array
|
||||
* @since 3.2.0
|
||||
* @since 3.2.0
|
||||
*/
|
||||
protected array $operator = [
|
||||
1 => '=',
|
||||
2 => '!=',
|
||||
3 => '<>',
|
||||
2 => '!=',
|
||||
3 => '<>',
|
||||
4 => '>',
|
||||
5 => '<',
|
||||
6 => '>=',
|
||||
5 => '<',
|
||||
6 => '>=',
|
||||
7 => '<=',
|
||||
8 => '!<',
|
||||
9 => '!>',
|
||||
8 => '!<',
|
||||
9 => '!>',
|
||||
10 => 'IN',
|
||||
11 => 'NOT IN'
|
||||
11 => 'NOT IN',
|
||||
12 => 'LIKE',
|
||||
13 => 'NOT LIKE',
|
||||
14 => 'IS NULL',
|
||||
15 => 'IS NOT NULL',
|
||||
16 => 'BETWEEN',
|
||||
17 => 'NOT BETWEEN',
|
||||
18 => 'EXISTS',
|
||||
19 => 'NOT EXISTS',
|
||||
20 => 'REGEXP',
|
||||
21 => 'NOT REGEXP',
|
||||
22 => 'SOUNDS LIKE'
|
||||
];
|
||||
|
||||
/**
|
||||
@ -163,416 +174,373 @@ class Dynamicget
|
||||
/**
|
||||
* Set Dynamic Get
|
||||
*
|
||||
* @param object $item The item data
|
||||
* @param string $view_code The view code name
|
||||
* @param string $context The context for events
|
||||
* @param object $item The item data
|
||||
* @param string $viewCode The view code name
|
||||
* @param string $context The context for events
|
||||
*
|
||||
* @return void
|
||||
* @since 3.2.0
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function set(object &$item, string $view_code, string $context)
|
||||
public function set(object &$item, string $viewCode, string $context): void
|
||||
{
|
||||
// reset buckets
|
||||
$item->main_get = [];
|
||||
$item->main_get = [];
|
||||
$item->custom_get = [];
|
||||
$addJoins = true;
|
||||
|
||||
// should joined and other tweaks be added
|
||||
$add_tweaks_joints = true;
|
||||
|
||||
// set source data
|
||||
switch ($item->main_source)
|
||||
{
|
||||
case 1:
|
||||
// check if auto sync is set
|
||||
if ($item->select_all == 1)
|
||||
{
|
||||
$item->view_selection = '*';
|
||||
}
|
||||
// set the view data
|
||||
$item->main_get[0]['selection'] = $this->selection->get(
|
||||
$item->key, $view_code,
|
||||
$item->view_selection,
|
||||
$item->view_table_main, 'a', 'view'
|
||||
);
|
||||
$item->main_get[0]['as'] = 'a';
|
||||
$item->main_get[0]['key'] = $item->key;
|
||||
$item->main_get[0]['context'] = $context;
|
||||
unset($item->view_selection);
|
||||
$this->configureViewSource($item, $viewCode, $context);
|
||||
break;
|
||||
|
||||
case 2:
|
||||
// check if auto sync is set
|
||||
if ($item->select_all == 1)
|
||||
{
|
||||
$item->db_selection = '*';
|
||||
}
|
||||
// set the database data
|
||||
$item->main_get[0]['selection'] = $this->selection->get(
|
||||
$item->key, $view_code,
|
||||
$item->db_selection,
|
||||
$item->db_table_main, 'a', 'db'
|
||||
);
|
||||
$item->main_get[0]['as'] = 'a';
|
||||
$item->main_get[0]['key'] = $item->key;
|
||||
$item->main_get[0]['context'] = $context;
|
||||
unset($item->db_selection);
|
||||
$this->configureDbSource($item, $viewCode, $context);
|
||||
break;
|
||||
|
||||
case 3:
|
||||
// set GUI mapper field
|
||||
$this->guiMapper['field'] = 'php_custom_get';
|
||||
// get the custom query
|
||||
$customQueryString
|
||||
= $this->gui->set(
|
||||
$this->customcode->update(
|
||||
base64_decode((string) $item->php_custom_get)
|
||||
),
|
||||
$this->guiMapper
|
||||
);
|
||||
|
||||
// get the table name
|
||||
$_searchQuery
|
||||
= GetHelper::between(
|
||||
$customQueryString, '$query->from(', ')'
|
||||
);
|
||||
|
||||
if (StringHelper::check(
|
||||
$_searchQuery
|
||||
)
|
||||
&& strpos((string) $_searchQuery, '#__') !== false)
|
||||
{
|
||||
$_queryName = GetHelper::between(
|
||||
$_searchQuery, '#__', "'"
|
||||
);
|
||||
|
||||
if (!StringHelper::check(
|
||||
$_queryName
|
||||
))
|
||||
{
|
||||
$_queryName = GetHelper::between(
|
||||
$_searchQuery, '#__', '"'
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// set to blank if not found
|
||||
if (!isset($_queryName)
|
||||
|| !StringHelper::check(
|
||||
$_queryName
|
||||
))
|
||||
{
|
||||
$_queryName = '';
|
||||
}
|
||||
|
||||
// set custom script
|
||||
$item->main_get[0]['selection'] = [
|
||||
'select' => $customQueryString,
|
||||
'from' => '', 'table' => '', 'type' => '',
|
||||
'name' => $_queryName];
|
||||
$item->main_get[0]['as'] = 'a';
|
||||
$item->main_get[0]['key'] = $item->key;
|
||||
$item->main_get[0]['context'] = $context;
|
||||
|
||||
// do not add
|
||||
$add_tweaks_joints = false;
|
||||
|
||||
$this->configureCustomSource($item, $viewCode, $context);
|
||||
$addJoins = false;
|
||||
break;
|
||||
}
|
||||
|
||||
// only add if main source is not custom
|
||||
if ($add_tweaks_joints)
|
||||
if ($addJoins)
|
||||
{
|
||||
// set join_view_table details
|
||||
$item->join_view_table = json_decode(
|
||||
(string) $item->join_view_table, true
|
||||
);
|
||||
|
||||
if (ArrayHelper::check(
|
||||
$item->join_view_table
|
||||
))
|
||||
{
|
||||
// start the part of a table bucket
|
||||
$_part_of_a = [];
|
||||
// build relationship
|
||||
$_relationship = array_map(
|
||||
function ($op) use (&$_part_of_a) {
|
||||
$bucket = [];
|
||||
// array(on_field_as, on_field)
|
||||
$bucket['on_field'] = array_map(
|
||||
'trim',
|
||||
explode('.', (string) $op['on_field'])
|
||||
);
|
||||
// array(join_field_as, join_field)
|
||||
$bucket['join_field'] = array_map(
|
||||
'trim',
|
||||
explode('.', (string) $op['join_field'])
|
||||
);
|
||||
// triget filed that has table a relationship
|
||||
if ($op['row_type'] == 1
|
||||
&& ($bucket['on_field'][0] === 'a'
|
||||
|| isset($_part_of_a[$bucket['on_field'][0]])
|
||||
|| isset($_part_of_a[$bucket['join_field'][0]])))
|
||||
{
|
||||
$_part_of_a[$op['as']] = $op['as'];
|
||||
}
|
||||
|
||||
return $bucket;
|
||||
}, $item->join_view_table
|
||||
);
|
||||
|
||||
// loop joints
|
||||
foreach ($item->join_view_table as $nr => &$option)
|
||||
{
|
||||
if (StringHelper::check(
|
||||
$option['selection']
|
||||
))
|
||||
{
|
||||
// convert the type
|
||||
$option['type']
|
||||
= $this->jointer[$option['type']];
|
||||
// convert the operator
|
||||
$option['operator']
|
||||
= $this->operator[$option['operator']];
|
||||
// get the on field values
|
||||
$on_field
|
||||
= $_relationship[$nr]['on_field'];
|
||||
// get the join field values
|
||||
$join_field
|
||||
= $_relationship[$nr]['join_field'];
|
||||
// set selection
|
||||
$option['selection']
|
||||
= $this->selection->get(
|
||||
$item->key,
|
||||
$view_code,
|
||||
$option['selection'],
|
||||
$option['view_table'],
|
||||
$option['as'],
|
||||
'view',
|
||||
$option['row_type']
|
||||
);
|
||||
$option['key'] = $item->key;
|
||||
$option['context'] = $context;
|
||||
// load to the getters
|
||||
if ($option['row_type'] == 1)
|
||||
{
|
||||
$item->main_get[] = $option;
|
||||
if ($on_field[0] === 'a'
|
||||
|| isset($_part_of_a[$join_field[0]])
|
||||
|| isset($_part_of_a[$on_field[0]]))
|
||||
{
|
||||
$this->sitemainget->set(
|
||||
$this->config->build_target . '.' . $view_code . '.' .
|
||||
$option['as'], $option['as']
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->sitedynamicget->set(
|
||||
$this->config->build_target . '.' . $view_code . '.' .
|
||||
$option['as'] . '.' . $join_field[1],
|
||||
$on_field[0]
|
||||
);
|
||||
}
|
||||
}
|
||||
elseif ($option['row_type'] == 2)
|
||||
{
|
||||
$item->custom_get[] = $option;
|
||||
if ($on_field[0] != 'a')
|
||||
{
|
||||
$this->sitedynamicget->set(
|
||||
$this->config->build_target . '.' . $view_code . '.' .
|
||||
$option['as'] . '.' . $join_field[1],
|
||||
$on_field[0]
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
unset($item->join_view_table[$nr]);
|
||||
}
|
||||
}
|
||||
unset($item->join_view_table);
|
||||
|
||||
// set join_db_table details
|
||||
$item->join_db_table = json_decode(
|
||||
(string) $item->join_db_table, true
|
||||
);
|
||||
|
||||
if (ArrayHelper::check($item->join_db_table))
|
||||
{
|
||||
// start the part of a table bucket
|
||||
$_part_of_a = [];
|
||||
// build relationship
|
||||
$_relationship = array_map(
|
||||
function ($op) use (&$_part_of_a) {
|
||||
$bucket = [];
|
||||
// array(on_field_as, on_field)
|
||||
$bucket['on_field'] = array_map(
|
||||
'trim',
|
||||
explode('.', (string) $op['on_field'])
|
||||
);
|
||||
// array(join_field_as, join_field)
|
||||
$bucket['join_field'] = array_map(
|
||||
'trim',
|
||||
explode('.', (string) $op['join_field'])
|
||||
);
|
||||
// triget filed that has table a relationship
|
||||
if ($op['row_type'] == 1
|
||||
&& ($bucket['on_field'][0] === 'a'
|
||||
|| isset($_part_of_a[$bucket['on_field'][0]])
|
||||
|| isset($_part_of_a[$bucket['join_field'][0]])))
|
||||
{
|
||||
$_part_of_a[$op['as']] = $op['as'];
|
||||
}
|
||||
|
||||
return $bucket;
|
||||
}, $item->join_db_table
|
||||
);
|
||||
|
||||
// loop joints
|
||||
foreach ($item->join_db_table as $nr => &$option1)
|
||||
{
|
||||
if (StringHelper::check($option1['selection']))
|
||||
{
|
||||
// convert the type
|
||||
$option1['type'] = $this->jointer[$option1['type']];
|
||||
// convert the operator
|
||||
$option1['operator'] = $this->operator[$option1['operator']];
|
||||
// get the on field values
|
||||
$on_field = $_relationship[$nr]['on_field'];
|
||||
// get the join field values
|
||||
$join_field = $_relationship[$nr]['join_field'];
|
||||
// set selection
|
||||
$option1['selection'] = $this->selection->get(
|
||||
$item->key,
|
||||
$view_code,
|
||||
$option1['selection'],
|
||||
$option1['db_table'],
|
||||
$option1['as'],
|
||||
'db',
|
||||
$option1['row_type']
|
||||
);
|
||||
$option1['key'] = $item->key;
|
||||
$option1['context'] = $context;
|
||||
// load to the getters
|
||||
if ($option1['row_type'] == 1)
|
||||
{
|
||||
$item->main_get[] = $option1;
|
||||
if ($on_field[0] === 'a'
|
||||
|| isset($_part_of_a[$join_field[0]])
|
||||
|| isset($_part_of_a[$on_field[0]]))
|
||||
{
|
||||
$this->sitemainget->set(
|
||||
$this->config->build_target . '.' . $view_code . '.' .
|
||||
$option1['as'], $option1['as']
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->sitedynamicget->set(
|
||||
$this->config->build_target . '.' . $view_code . '.' .
|
||||
$option1['as'] . '.' . $join_field[1],
|
||||
$on_field[0]
|
||||
);
|
||||
}
|
||||
}
|
||||
elseif ($option1['row_type'] == 2)
|
||||
{
|
||||
$item->custom_get[] = $option1;
|
||||
if ($on_field[0] != 'a')
|
||||
{
|
||||
$this->sitedynamicget->set(
|
||||
$this->config->build_target . '.' . $view_code . '.' .
|
||||
$option1['as'] . '.' . $join_field[1],
|
||||
$on_field[0]
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
unset($item->join_db_table[$nr]);
|
||||
}
|
||||
}
|
||||
unset($item->join_db_table);
|
||||
|
||||
// set filter details
|
||||
$item->filter = json_decode(
|
||||
(string) $item->filter, true
|
||||
);
|
||||
|
||||
if (ArrayHelper::check($item->filter))
|
||||
{
|
||||
foreach ($item->filter as $nr => &$option2)
|
||||
{
|
||||
if (isset($option2['operator']))
|
||||
{
|
||||
$option2['operator'] = $this->operator[$option2['operator']];
|
||||
$option2['state_key'] = $this->placeholder->update_(
|
||||
$this->customcode->update(
|
||||
$option2['state_key']
|
||||
)
|
||||
);
|
||||
$option2['key'] = $item->key;
|
||||
}
|
||||
else
|
||||
{
|
||||
unset($item->filter[$nr]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// set where details
|
||||
$item->where = json_decode((string) $item->where, true);
|
||||
if (ArrayHelper::check($item->where))
|
||||
{
|
||||
foreach ($item->where as $nr => &$option3)
|
||||
{
|
||||
if (isset($option3['operator']))
|
||||
{
|
||||
$option3['operator'] = $this->operator[$option3['operator']];
|
||||
}
|
||||
else
|
||||
{
|
||||
unset($item->where[$nr]);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
unset($item->where);
|
||||
}
|
||||
|
||||
// set order details
|
||||
$item->order = json_decode((string) $item->order, true);
|
||||
if (!ArrayHelper::check($item->order))
|
||||
{
|
||||
unset($item->order);
|
||||
}
|
||||
|
||||
// set grouping
|
||||
$item->group = json_decode((string) $item->group, true);
|
||||
if (!ArrayHelper::check($item->group))
|
||||
{
|
||||
unset($item->group);
|
||||
}
|
||||
|
||||
// set global details
|
||||
$item->global = json_decode(
|
||||
(string) $item->global, true
|
||||
);
|
||||
|
||||
if (!ArrayHelper::check($item->global))
|
||||
{
|
||||
unset($item->global);
|
||||
}
|
||||
$this->processJoins($item, $viewCode, $context);
|
||||
$this->processFilters($item);
|
||||
$this->processWhere($item);
|
||||
$this->processOrderGroupGlobal($item);
|
||||
}
|
||||
else
|
||||
{
|
||||
// when we have a custom query script we do not add the dynamic options
|
||||
unset($item->join_view_table);
|
||||
unset($item->join_db_table);
|
||||
unset($item->filter);
|
||||
unset(
|
||||
$item->join_view_table,
|
||||
$item->join_db_table,
|
||||
$item->filter,
|
||||
$item->where,
|
||||
$item->order,
|
||||
$item->group,
|
||||
$item->global
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Configure the main_get using view-based data.
|
||||
*
|
||||
* @param object $item The item data
|
||||
* @param string $viewCode The view code name
|
||||
* @param string $context The context for events
|
||||
*
|
||||
* @return void
|
||||
* @since 5.1.1
|
||||
*/
|
||||
private function configureViewSource(object &$item, string $viewCode, string $context): void
|
||||
{
|
||||
if ($item->select_all == 1)
|
||||
{
|
||||
$item->view_selection = '*';
|
||||
}
|
||||
|
||||
$item->main_get[] = [
|
||||
'selection' => $this->selection->get(
|
||||
$item->key,
|
||||
$viewCode,
|
||||
$item->view_selection,
|
||||
$item->view_table_main,
|
||||
'a',
|
||||
'view'
|
||||
),
|
||||
'as' => 'a',
|
||||
'key' => $item->key,
|
||||
'context' => $context
|
||||
];
|
||||
|
||||
unset($item->view_selection);
|
||||
}
|
||||
|
||||
/**
|
||||
* Configure the main_get using database-table data.
|
||||
*
|
||||
* @param object $item The item data
|
||||
* @param string $viewCode The view code name
|
||||
* @param string $context The context for events
|
||||
*
|
||||
* @return void
|
||||
* @since 5.1.1
|
||||
*/
|
||||
private function configureDbSource(object &$item, string $viewCode, string $context): void
|
||||
{
|
||||
if ($item->select_all == 1)
|
||||
{
|
||||
$item->db_selection = '*';
|
||||
}
|
||||
|
||||
$item->main_get[] = [
|
||||
'selection' => $this->selection->get(
|
||||
$item->key,
|
||||
$viewCode,
|
||||
$item->db_selection,
|
||||
$item->db_table_main,
|
||||
'a',
|
||||
'db'
|
||||
),
|
||||
'as' => 'a',
|
||||
'key' => $item->key,
|
||||
'context' => $context
|
||||
];
|
||||
|
||||
unset($item->db_selection);
|
||||
}
|
||||
|
||||
/**
|
||||
* Configure the main_get using a custom PHP query.
|
||||
*
|
||||
* @param object $item The item data
|
||||
* @param string $viewCode The view code name
|
||||
* @param string $context The context for events
|
||||
*
|
||||
* @return void
|
||||
* @since 5.1.1
|
||||
*/
|
||||
private function configureCustomSource(object &$item, string $viewCode, string $context): void
|
||||
{
|
||||
$this->guiMapper['field'] = 'php_custom_get';
|
||||
|
||||
$query = $this->gui->set(
|
||||
$this->customcode->update(
|
||||
base64_decode((string) $item->php_custom_get)
|
||||
),
|
||||
$this->guiMapper
|
||||
);
|
||||
|
||||
$table = GetHelper::between($query, '$query->from(', ')');
|
||||
$tableName = '';
|
||||
|
||||
if (StringHelper::check($table) && strpos($table, '#__') !== false)
|
||||
{
|
||||
$tableName = GetHelper::between($table, '#__', "'") ?: GetHelper::between($table, '#__', '"');
|
||||
}
|
||||
|
||||
$item->main_get[] = [
|
||||
'selection' => [
|
||||
'select' => $query,
|
||||
'from' => '',
|
||||
'table' => '',
|
||||
'type' => '',
|
||||
'name' => $tableName
|
||||
],
|
||||
'as' => 'a',
|
||||
'key' => $item->key,
|
||||
'context' => $context
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Process filter statements on the item.
|
||||
*
|
||||
* @param object $item The item data
|
||||
*
|
||||
* @return void
|
||||
* @since 5.1.1
|
||||
*/
|
||||
private function processFilters(object &$item): void
|
||||
{
|
||||
$item->filter = json_decode((string) $item->filter, true);
|
||||
|
||||
if (ArrayHelper::check($item->filter))
|
||||
{
|
||||
foreach ($item->filter as $nr => &$option)
|
||||
{
|
||||
if (isset($option['operator']) && isset($this->operator[$option['operator']]))
|
||||
{
|
||||
$option['operator'] = $this->operator[$option['operator']];
|
||||
$option['state_key'] = $this->placeholder->update_(
|
||||
$this->customcode->update($option['state_key'])
|
||||
);
|
||||
$option['key'] = $item->key;
|
||||
}
|
||||
else
|
||||
{
|
||||
unset($item->filter[$nr]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Process where clause on the item.
|
||||
*
|
||||
* @param object $item The item data
|
||||
*
|
||||
* @return void
|
||||
* @since 5.1.1
|
||||
*/
|
||||
private function processWhere(object &$item): void
|
||||
{
|
||||
$item->where = json_decode((string) $item->where, true);
|
||||
|
||||
if (ArrayHelper::check($item->where))
|
||||
{
|
||||
foreach ($item->where as $nr => &$option)
|
||||
{
|
||||
if (isset($option['operator']) && isset($this->operator[$option['operator']]))
|
||||
{
|
||||
$option['operator'] = $this->operator[$option['operator']];
|
||||
}
|
||||
else
|
||||
{
|
||||
unset($item->where[$nr]);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
unset($item->where);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Process order, group, and global JSON attributes on the item.
|
||||
*
|
||||
* @param object $item The item data
|
||||
*
|
||||
* @return void
|
||||
* @since 5.1.1
|
||||
*/
|
||||
private function processOrderGroupGlobal(object &$item): void
|
||||
{
|
||||
$item->order = json_decode((string) $item->order, true);
|
||||
|
||||
if (!ArrayHelper::check($item->order))
|
||||
{
|
||||
unset($item->order);
|
||||
}
|
||||
|
||||
$item->group = json_decode((string) $item->group, true);
|
||||
|
||||
if (!ArrayHelper::check($item->group))
|
||||
{
|
||||
unset($item->group);
|
||||
}
|
||||
|
||||
$item->global = json_decode((string) $item->global, true);
|
||||
|
||||
if (!ArrayHelper::check($item->global))
|
||||
{
|
||||
unset($item->global);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Process join logic for both view and db tables.
|
||||
*
|
||||
* @param object $item The item data
|
||||
* @param string $viewCode The view code name
|
||||
* @param string $context The context for events
|
||||
*
|
||||
* @return void
|
||||
* @since 5.1.1
|
||||
*/
|
||||
private function processJoins(object &$item, string $viewCode, string $context): void
|
||||
{
|
||||
$this->processJoinGroup($item, $viewCode, $context, 'join_view_table', 'view');
|
||||
$this->processJoinGroup($item, $viewCode, $context, 'join_db_table', 'db');
|
||||
}
|
||||
|
||||
/**
|
||||
* Internal helper to process individual join groups.
|
||||
*
|
||||
* @param object $item The item data
|
||||
* @param string $viewCode The view code name
|
||||
* @param string $context The context for events
|
||||
* @param string $joinKey The property name (join_view_table or join_db_table)
|
||||
* @param string $sourceType The source type (view or db)
|
||||
*
|
||||
* @return void
|
||||
* @since 5.1.1
|
||||
*/
|
||||
private function processJoinGroup(object &$item, string $viewCode, string $context, string $joinKey, string $sourceType): void
|
||||
{
|
||||
$joins = json_decode((string) ($item->{$joinKey} ?? ''), true);
|
||||
if (!ArrayHelper::check($joins))
|
||||
{
|
||||
unset($item->$joinKey);
|
||||
return;
|
||||
}
|
||||
|
||||
$_part_of_a = [];
|
||||
$_relationship = array_map(function ($op) use (&$_part_of_a) {
|
||||
$bucket = [];
|
||||
$bucket['on_field'] = array_map('trim', explode('.', (string) $op['on_field']));
|
||||
$bucket['join_field'] = array_map('trim', explode('.', (string) $op['join_field']));
|
||||
if ($op['row_type'] == 1
|
||||
&& ($bucket['on_field'][0] === 'a'
|
||||
|| isset($_part_of_a[$bucket['on_field'][0]])
|
||||
|| isset($_part_of_a[$bucket['join_field'][0]])))
|
||||
{
|
||||
$_part_of_a[$op['as']] = $op['as'];
|
||||
}
|
||||
return $bucket;
|
||||
}, $joins);
|
||||
|
||||
foreach ($joins as $nr => &$option)
|
||||
{
|
||||
if (!StringHelper::check($option['selection'] ?? null))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
$option['type'] = $this->jointer[$option['type']];
|
||||
$option['operator'] = $this->operator[$option['operator']] ?? null;
|
||||
$on_field = $_relationship[$nr]['on_field'];
|
||||
$join_field = $_relationship[$nr]['join_field'];
|
||||
|
||||
$option['selection'] = $this->selection->get(
|
||||
$item->key,
|
||||
$viewCode,
|
||||
$option['selection'],
|
||||
$option[$sourceType === 'view' ? 'view_table' : 'db_table'],
|
||||
$option['as'],
|
||||
$sourceType,
|
||||
$option['row_type']
|
||||
);
|
||||
|
||||
$option['key'] = $item->key;
|
||||
$option['context'] = $context;
|
||||
|
||||
if ($option['row_type'] == 1)
|
||||
{
|
||||
$item->main_get[] = $option;
|
||||
if ($on_field[0] === 'a' || isset($_part_of_a[$join_field[0]]) || isset($_part_of_a[$on_field[0]]))
|
||||
{
|
||||
$this->sitemainget->set(
|
||||
"{$this->config->build_target}.{$viewCode}.{$option['as']}",
|
||||
$option['as']
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->sitedynamicget->set(
|
||||
"{$this->config->build_target}.{$viewCode}.{$option['as']}.{$join_field[1]}",
|
||||
$on_field[0]
|
||||
);
|
||||
}
|
||||
}
|
||||
elseif ($option['row_type'] == 2)
|
||||
{
|
||||
$item->custom_get[] = $option;
|
||||
if ($on_field[0] !== 'a')
|
||||
{
|
||||
$this->sitedynamicget->set(
|
||||
"{$this->config->build_target}.{$viewCode}.{$option['as']}.{$join_field[1]}",
|
||||
$on_field[0]
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
unset($item->$joinKey);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user