Release of v5.1.1-beta2

Enhance operator support in dynamic get system. Relates to issue #1226.
This commit is contained in:
2025-06-19 15:47:12 +00:00
parent 70718936b4
commit 3c1057a830
11 changed files with 534 additions and 483 deletions

View File

@ -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. - Move all banners to GitHub.
- Adds library phpspreadsheet to JCB. - Adds library phpspreadsheet to JCB.
@ -19,6 +20,7 @@
- Refactor initialization flow to accommodate future scalability and integration with all designated areas. - Refactor initialization flow to accommodate future scalability and integration with all designated areas.
- Refactor the Creator Builders class. - Refactor the Creator Builders class.
- Refactor the FieldString and FieldXML classes. - Refactor the FieldString and FieldXML classes.
- Add JCB new package engine.
# v5.1.0 # v5.1.0

View File

@ -3292,7 +3292,7 @@ class Com_ComponentbuilderInstallerScript implements InstallerScriptInterface
echo '<div style="background-color: #fff;" class="alert alert-info"><a target="_blank" href="https://dev.vdm.io" title="Component Builder"> echo '<div style="background-color: #fff;" class="alert alert-info"><a target="_blank" href="https://dev.vdm.io" title="Component Builder">
<img src="components/com_componentbuilder/assets/images/vdm-component.jpg"/> <img src="components/com_componentbuilder/assets/images/vdm-component.jpg"/>
</a> </a>
<h3>Upgrade to Version 5.1.1-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. // Add/Update component in the action logs extensions table.
$this->setActionLogsExtensions(); $this->setActionLogsExtensions();

View File

@ -9,7 +9,7 @@ This is a professional-grade [Joomla 5.x](https://extensions.joomla.org/extensio
JCB generates native Joomla components, plugins, and modules for Joomla 3.x, 4.x, and 5.x — and is already prepared for Joomla 6. Every compiled project is tailored for the specific version without needing backward compatibility plugins. With integrated version-aware compiling, smart boilerplating, and Git-powered project syncing, JCB is much more than a code generator—it's a **full-stack development pipeline for Joomla extensions**. JCB generates native Joomla components, plugins, and modules for Joomla 3.x, 4.x, and 5.x — and is already prepared for Joomla 6. Every compiled project is tailored for the specific version without needing backward compatibility plugins. With integrated version-aware compiling, smart boilerplating, and Git-powered project syncing, JCB is much more than a code generator—it's a **full-stack development pipeline for Joomla extensions**.
You can install this component easily. The latest release (**5.1.1-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 Joomlas built-in extension update mechanism. Upgrades are seamless through Joomlas built-in extension update mechanism.
@ -229,9 +229,9 @@ JCB is developed by developers for developers. Its purpose is to democratize hig
* **Company:** [Vast Development Method](https://dev.vdm.io) * **Company:** [Vast Development Method](https://dev.vdm.io)
* **Author:** [Llewellyn van der Merwe](mailto:joomla@vdm.io) * **Author:** [Llewellyn van der Merwe](mailto:joomla@vdm.io)
* **Component:** [Component Builder](https://git.vdm.dev/joomla/Component-Builder) * **Component:** [Component Builder](https://git.vdm.dev/joomla/Component-Builder)
* **Created:** 30th April, 2015 · **Last Build:** 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. * **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. > Generated with [JCB](https://www.joomlacomponentbuilder.com) — The Smartest Way to Build Joomla Extensions.

View File

@ -9,7 +9,7 @@ This is a professional-grade [Joomla 5.x](https://extensions.joomla.org/extensio
JCB generates native Joomla components, plugins, and modules for Joomla 3.x, 4.x, and 5.x — and is already prepared for Joomla 6. Every compiled project is tailored for the specific version without needing backward compatibility plugins. With integrated version-aware compiling, smart boilerplating, and Git-powered project syncing, JCB is much more than a code generator—it's a **full-stack development pipeline for Joomla extensions**. JCB generates native Joomla components, plugins, and modules for Joomla 3.x, 4.x, and 5.x — and is already prepared for Joomla 6. Every compiled project is tailored for the specific version without needing backward compatibility plugins. With integrated version-aware compiling, smart boilerplating, and Git-powered project syncing, JCB is much more than a code generator—it's a **full-stack development pipeline for Joomla extensions**.
You can install this component easily. The latest release (**5.1.1-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 Joomlas built-in extension update mechanism. Upgrades are seamless through Joomlas built-in extension update mechanism.
@ -229,9 +229,9 @@ JCB is developed by developers for developers. Its purpose is to democratize hig
* **Company:** [Vast Development Method](https://dev.vdm.io) * **Company:** [Vast Development Method](https://dev.vdm.io)
* **Author:** [Llewellyn van der Merwe](mailto:joomla@vdm.io) * **Author:** [Llewellyn van der Merwe](mailto:joomla@vdm.io)
* **Component:** [Component Builder](https://git.vdm.dev/joomla/Component-Builder) * **Component:** [Component Builder](https://git.vdm.dev/joomla/Component-Builder)
* **Created:** 30th April, 2015 · **Last Build:** 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. * **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. > Generated with [JCB](https://www.joomlacomponentbuilder.com) — The Smartest Way to Build Joomla Extensions.

View File

@ -570,30 +570,52 @@
multiple="false" multiple="false"
filter="INT" filter="INT"
required="true" required="true"
default="0"> default="1">
<!-- Option Set. --> <!-- Option Set. -->
<option value="1"> <option value="1">
COM_COMPONENTBUILDER_DYNAMIC_GET_EQUAL</option> COM_COMPONENTBUILDER_DYNAMIC_GET_EQUAL_</option>
<option value="2"> <option value="2">
COM_COMPONENTBUILDER_DYNAMIC_GET_NOT_EQUAL</option> COM_COMPONENTBUILDER_DYNAMIC_GET_NOT_EQUAL_NE</option>
<option value="3"> <option value="3">
COM_COMPONENTBUILDER_DYNAMIC_GET_EQUAL_OR_NOT</option> COM_COMPONENTBUILDER_DYNAMIC_GET_NOT_EQUAL_ALT_LTGT</option>
<option value="4"> <option value="4">
COM_COMPONENTBUILDER_DYNAMIC_GET_GREATER_THAN</option> COM_COMPONENTBUILDER_DYNAMIC_GET_GREATER_THAN_GT</option>
<option value="5"> <option value="5">
COM_COMPONENTBUILDER_DYNAMIC_GET_LESS_THAN</option> COM_COMPONENTBUILDER_DYNAMIC_GET_LESS_THAN_LT</option>
<option value="6"> <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"> <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"> <option value="8">
COM_COMPONENTBUILDER_DYNAMIC_GET_NOT_LESS_THAN</option> COM_COMPONENTBUILDER_DYNAMIC_GET_NOT_LESS_THAN_LT</option>
<option value="9"> <option value="9">
COM_COMPONENTBUILDER_DYNAMIC_GET_NOT_GREATER_THAN</option> COM_COMPONENTBUILDER_DYNAMIC_GET_NOT_GREATER_THAN_GT</option>
<option value="10"> <option value="10">
COM_COMPONENTBUILDER_DYNAMIC_GET_IN</option> COM_COMPONENTBUILDER_DYNAMIC_GET_IN</option>
<option value="11"> <option value="11">
COM_COMPONENTBUILDER_DYNAMIC_GET_NOT_IN</option> 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> </field>
<!-- Join_field Field. Type: Text. (joomla) --> <!-- Join_field Field. Type: Text. (joomla) -->
<field <field
@ -812,30 +834,52 @@
multiple="false" multiple="false"
filter="INT" filter="INT"
required="true" required="true"
default="0"> default="1">
<!-- Option Set. --> <!-- Option Set. -->
<option value="1"> <option value="1">
COM_COMPONENTBUILDER_DYNAMIC_GET_EQUAL</option> COM_COMPONENTBUILDER_DYNAMIC_GET_EQUAL_</option>
<option value="2"> <option value="2">
COM_COMPONENTBUILDER_DYNAMIC_GET_NOT_EQUAL</option> COM_COMPONENTBUILDER_DYNAMIC_GET_NOT_EQUAL_NE</option>
<option value="3"> <option value="3">
COM_COMPONENTBUILDER_DYNAMIC_GET_EQUAL_OR_NOT</option> COM_COMPONENTBUILDER_DYNAMIC_GET_NOT_EQUAL_ALT_LTGT</option>
<option value="4"> <option value="4">
COM_COMPONENTBUILDER_DYNAMIC_GET_GREATER_THAN</option> COM_COMPONENTBUILDER_DYNAMIC_GET_GREATER_THAN_GT</option>
<option value="5"> <option value="5">
COM_COMPONENTBUILDER_DYNAMIC_GET_LESS_THAN</option> COM_COMPONENTBUILDER_DYNAMIC_GET_LESS_THAN_LT</option>
<option value="6"> <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"> <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"> <option value="8">
COM_COMPONENTBUILDER_DYNAMIC_GET_NOT_LESS_THAN</option> COM_COMPONENTBUILDER_DYNAMIC_GET_NOT_LESS_THAN_LT</option>
<option value="9"> <option value="9">
COM_COMPONENTBUILDER_DYNAMIC_GET_NOT_GREATER_THAN</option> COM_COMPONENTBUILDER_DYNAMIC_GET_NOT_GREATER_THAN_GT</option>
<option value="10"> <option value="10">
COM_COMPONENTBUILDER_DYNAMIC_GET_IN</option> COM_COMPONENTBUILDER_DYNAMIC_GET_IN</option>
<option value="11"> <option value="11">
COM_COMPONENTBUILDER_DYNAMIC_GET_NOT_IN</option> 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> </field>
<!-- Table_key Field. Type: Text. (joomla) --> <!-- Table_key Field. Type: Text. (joomla) -->
<field <field
@ -917,30 +961,52 @@
multiple="false" multiple="false"
filter="INT" filter="INT"
required="true" required="true"
default="0"> default="1">
<!-- Option Set. --> <!-- Option Set. -->
<option value="1"> <option value="1">
COM_COMPONENTBUILDER_DYNAMIC_GET_EQUAL</option> COM_COMPONENTBUILDER_DYNAMIC_GET_EQUAL_</option>
<option value="2"> <option value="2">
COM_COMPONENTBUILDER_DYNAMIC_GET_NOT_EQUAL</option> COM_COMPONENTBUILDER_DYNAMIC_GET_NOT_EQUAL_NE</option>
<option value="3"> <option value="3">
COM_COMPONENTBUILDER_DYNAMIC_GET_EQUAL_OR_NOT</option> COM_COMPONENTBUILDER_DYNAMIC_GET_NOT_EQUAL_ALT_LTGT</option>
<option value="4"> <option value="4">
COM_COMPONENTBUILDER_DYNAMIC_GET_GREATER_THAN</option> COM_COMPONENTBUILDER_DYNAMIC_GET_GREATER_THAN_GT</option>
<option value="5"> <option value="5">
COM_COMPONENTBUILDER_DYNAMIC_GET_LESS_THAN</option> COM_COMPONENTBUILDER_DYNAMIC_GET_LESS_THAN_LT</option>
<option value="6"> <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"> <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"> <option value="8">
COM_COMPONENTBUILDER_DYNAMIC_GET_NOT_LESS_THAN</option> COM_COMPONENTBUILDER_DYNAMIC_GET_NOT_LESS_THAN_LT</option>
<option value="9"> <option value="9">
COM_COMPONENTBUILDER_DYNAMIC_GET_NOT_GREATER_THAN</option> COM_COMPONENTBUILDER_DYNAMIC_GET_NOT_GREATER_THAN_GT</option>
<option value="10"> <option value="10">
COM_COMPONENTBUILDER_DYNAMIC_GET_IN</option> COM_COMPONENTBUILDER_DYNAMIC_GET_IN</option>
<option value="11"> <option value="11">
COM_COMPONENTBUILDER_DYNAMIC_GET_NOT_IN</option> 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> </field>
<!-- Value_key Field. Type: Text. (joomla) --> <!-- Value_key Field. Type: Text. (joomla) -->
<field <field
@ -1451,30 +1517,52 @@
multiple="false" multiple="false"
filter="INT" filter="INT"
required="true" required="true"
default="0"> default="1">
<!-- Option Set. --> <!-- Option Set. -->
<option value="1"> <option value="1">
COM_COMPONENTBUILDER_DYNAMIC_GET_EQUAL</option> COM_COMPONENTBUILDER_DYNAMIC_GET_EQUAL_</option>
<option value="2"> <option value="2">
COM_COMPONENTBUILDER_DYNAMIC_GET_NOT_EQUAL</option> COM_COMPONENTBUILDER_DYNAMIC_GET_NOT_EQUAL_NE</option>
<option value="3"> <option value="3">
COM_COMPONENTBUILDER_DYNAMIC_GET_EQUAL_OR_NOT</option> COM_COMPONENTBUILDER_DYNAMIC_GET_NOT_EQUAL_ALT_LTGT</option>
<option value="4"> <option value="4">
COM_COMPONENTBUILDER_DYNAMIC_GET_GREATER_THAN</option> COM_COMPONENTBUILDER_DYNAMIC_GET_GREATER_THAN_GT</option>
<option value="5"> <option value="5">
COM_COMPONENTBUILDER_DYNAMIC_GET_LESS_THAN</option> COM_COMPONENTBUILDER_DYNAMIC_GET_LESS_THAN_LT</option>
<option value="6"> <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"> <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"> <option value="8">
COM_COMPONENTBUILDER_DYNAMIC_GET_NOT_LESS_THAN</option> COM_COMPONENTBUILDER_DYNAMIC_GET_NOT_LESS_THAN_LT</option>
<option value="9"> <option value="9">
COM_COMPONENTBUILDER_DYNAMIC_GET_NOT_GREATER_THAN</option> COM_COMPONENTBUILDER_DYNAMIC_GET_NOT_GREATER_THAN_GT</option>
<option value="10"> <option value="10">
COM_COMPONENTBUILDER_DYNAMIC_GET_IN</option> COM_COMPONENTBUILDER_DYNAMIC_GET_IN</option>
<option value="11"> <option value="11">
COM_COMPONENTBUILDER_DYNAMIC_GET_NOT_IN</option> 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> </field>
<!-- Join_field Field. Type: Text. (joomla) --> <!-- Join_field Field. Type: Text. (joomla) -->
<field <field

View File

@ -4326,6 +4326,7 @@ COM_COMPONENTBUILDER_DYNAMIC_GET_AS_LABEL="AS"
COM_COMPONENTBUILDER_DYNAMIC_GET_B="b" COM_COMPONENTBUILDER_DYNAMIC_GET_B="b"
COM_COMPONENTBUILDER_DYNAMIC_GET_BACKEND_VIEW="Back-end View" COM_COMPONENTBUILDER_DYNAMIC_GET_BACKEND_VIEW="Back-end View"
COM_COMPONENTBUILDER_DYNAMIC_GET_BB="bb" COM_COMPONENTBUILDER_DYNAMIC_GET_BB="bb"
COM_COMPONENTBUILDER_DYNAMIC_GET_BETWEEN="BETWEEN"
COM_COMPONENTBUILDER_DYNAMIC_GET_C="c" COM_COMPONENTBUILDER_DYNAMIC_GET_C="c"
COM_COMPONENTBUILDER_DYNAMIC_GET_CATEGORIES="Categories" COM_COMPONENTBUILDER_DYNAMIC_GET_CATEGORIES="Categories"
COM_COMPONENTBUILDER_DYNAMIC_GET_CC="cc" 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_EE="ee"
COM_COMPONENTBUILDER_DYNAMIC_GET_EMPTY_DESCRIPTION="Empty" COM_COMPONENTBUILDER_DYNAMIC_GET_EMPTY_DESCRIPTION="Empty"
COM_COMPONENTBUILDER_DYNAMIC_GET_EMPTY_LABEL="Allow" COM_COMPONENTBUILDER_DYNAMIC_GET_EMPTY_LABEL="Allow"
COM_COMPONENTBUILDER_DYNAMIC_GET_EQUAL="equal" COM_COMPONENTBUILDER_DYNAMIC_GET_EQUAL_="Equal (=)"
COM_COMPONENTBUILDER_DYNAMIC_GET_EQUAL_OR_NOT="equal or not"
COM_COMPONENTBUILDER_DYNAMIC_GET_ERROR_UNIQUE_ALIAS="Another Dynamic Get has the same alias." 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_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_F="f"
COM_COMPONENTBUILDER_DYNAMIC_GET_FF="ff" COM_COMPONENTBUILDER_DYNAMIC_GET_FF="ff"
COM_COMPONENTBUILDER_DYNAMIC_GET_FILTER_DESCRIPTION="Here you can add filters to the query." 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_GG="gg"
COM_COMPONENTBUILDER_DYNAMIC_GET_GLOBAL_DESCRIPTION="Here you can add global variables." COM_COMPONENTBUILDER_DYNAMIC_GET_GLOBAL_DESCRIPTION="Here you can add global variables."
COM_COMPONENTBUILDER_DYNAMIC_GET_GLOBAL_LABEL="Set Global" COM_COMPONENTBUILDER_DYNAMIC_GET_GLOBAL_LABEL="Set Global"
COM_COMPONENTBUILDER_DYNAMIC_GET_GREATER_THAN="greater than" COM_COMPONENTBUILDER_DYNAMIC_GET_GREATER_THAN_GT="Greater Than (&gt;)"
COM_COMPONENTBUILDER_DYNAMIC_GET_GREATER_THAN_OR_EQUAL="greater than or equal" COM_COMPONENTBUILDER_DYNAMIC_GET_GREATER_THAN_OR_EQUAL_GE="Greater Than or Equal (&ge;)"
COM_COMPONENTBUILDER_DYNAMIC_GET_GROUP_DESCRIPTION="Here you can set the grouping per data set." 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_GROUP_LABEL="Grouping"
COM_COMPONENTBUILDER_DYNAMIC_GET_GUID_DESCRIPTION="Globally Unique Identifier" 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_IN="IN"
COM_COMPONENTBUILDER_DYNAMIC_GET_INIT_BUTTON_ACCESS="Dynamic Get Init Button Access" 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_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_J="j"
COM_COMPONENTBUILDER_DYNAMIC_GET_JJ="jj" COM_COMPONENTBUILDER_DYNAMIC_GET_JJ="jj"
COM_COMPONENTBUILDER_DYNAMIC_GET_JOINT="Joint" 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_KEY_MESSAGE="Error! Please add table as name here."
COM_COMPONENTBUILDER_DYNAMIC_GET_KK="kk" COM_COMPONENTBUILDER_DYNAMIC_GET_KK="kk"
COM_COMPONENTBUILDER_DYNAMIC_GET_L="l" COM_COMPONENTBUILDER_DYNAMIC_GET_L="l"
COM_COMPONENTBUILDER_DYNAMIC_GET_LESS_THAN="less than" COM_COMPONENTBUILDER_DYNAMIC_GET_LESS_THAN_LT="Less Than (&lt;)"
COM_COMPONENTBUILDER_DYNAMIC_GET_LESS_THAN_OR_EQUAL_TO="less than or equal to" COM_COMPONENTBUILDER_DYNAMIC_GET_LESS_THAN_OR_EQUAL_LE="Less Than or Equal (&le;)"
COM_COMPONENTBUILDER_DYNAMIC_GET_LIKE="LIKE"
COM_COMPONENTBUILDER_DYNAMIC_GET_LL="ll" COM_COMPONENTBUILDER_DYNAMIC_GET_LL="ll"
COM_COMPONENTBUILDER_DYNAMIC_GET_M="m" COM_COMPONENTBUILDER_DYNAMIC_GET_M="m"
COM_COMPONENTBUILDER_DYNAMIC_GET_MAIN="Main" 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_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_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_NOTE_LINKED_TO_NOTICE_LABEL="Linked To"
COM_COMPONENTBUILDER_DYNAMIC_GET_NOT_EQUAL="not equal" COM_COMPONENTBUILDER_DYNAMIC_GET_NOT_BETWEEN="NOT BETWEEN"
COM_COMPONENTBUILDER_DYNAMIC_GET_NOT_GREATER_THAN="not greater than" COM_COMPONENTBUILDER_DYNAMIC_GET_NOT_EQUAL_ALT_LTGT="Not Equal (Alt &lt;&gt;)"
COM_COMPONENTBUILDER_DYNAMIC_GET_NOT_EQUAL_NE="Not Equal (&ne;)"
COM_COMPONENTBUILDER_DYNAMIC_GET_NOT_EXISTS="NOT EXISTS"
COM_COMPONENTBUILDER_DYNAMIC_GET_NOT_GREATER_THAN_GT="Not Greater Than (!&gt;)"
COM_COMPONENTBUILDER_DYNAMIC_GET_NOT_IN="NOT IN" 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 (!&lt;)"
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_NOT_REQUIRED="Not Required"
COM_COMPONENTBUILDER_DYNAMIC_GET_O="o" COM_COMPONENTBUILDER_DYNAMIC_GET_O="o"
COM_COMPONENTBUILDER_DYNAMIC_GET_ONCONTENTAFTERDISPLAY="onContentAfterDisplay" 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_QQ="qq"
COM_COMPONENTBUILDER_DYNAMIC_GET_R="r" COM_COMPONENTBUILDER_DYNAMIC_GET_R="r"
COM_COMPONENTBUILDER_DYNAMIC_GET_RANDOM="Random" COM_COMPONENTBUILDER_DYNAMIC_GET_RANDOM="Random"
COM_COMPONENTBUILDER_DYNAMIC_GET_REGEXP="REGEXP"
COM_COMPONENTBUILDER_DYNAMIC_GET_REPEATABLE_VALUE="Repeatable Value" 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="Dynamic Get Reset Button Access"
COM_COMPONENTBUILDER_DYNAMIC_GET_RESET_BUTTON_ACCESS_DESC="Allows the users in this group to access the reset button." 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_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_SELECT_ALL_LABEL="Select All"
COM_COMPONENTBUILDER_DYNAMIC_GET_SINGLE="Single" COM_COMPONENTBUILDER_DYNAMIC_GET_SINGLE="Single"
COM_COMPONENTBUILDER_DYNAMIC_GET_SOUNDS_LIKE="SOUNDS LIKE"
COM_COMPONENTBUILDER_DYNAMIC_GET_SS="ss" COM_COMPONENTBUILDER_DYNAMIC_GET_SS="ss"
COM_COMPONENTBUILDER_DYNAMIC_GET_STATE="State" 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." COM_COMPONENTBUILDER_DYNAMIC_GET_STATE_KEY_DESCRIPTION="The key to use to get state value or the var name."

View File

@ -1 +0,0 @@
ALTER TABLE `#__componentbuilder_repository` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;

View File

@ -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>18th June, 2025</creationDate> <creationDate>19th June, 2025</creationDate>
<author>Llewellyn van der Merwe</author> <author>Llewellyn van der Merwe</author>
<authorEmail>joomla@vdm.io</authorEmail> <authorEmail>joomla@vdm.io</authorEmail>
<authorUrl>https://dev.vdm.io</authorUrl> <authorUrl>https://dev.vdm.io</authorUrl>
<copyright>Copyright (C) 2015 Vast Development Method. All rights reserved.</copyright> <copyright>Copyright (C) 2015 Vast Development Method. All rights reserved.</copyright>
<license>GNU General Public License version 2 or later; see LICENSE.txt</license> <license>GNU General Public License version 2 or later; see LICENSE.txt</license>
<version>5.1.1-beta1</version> <version>5.1.1-beta2</version>
<description><![CDATA[ <description><![CDATA[
<h1>Component Builder (v.5.1.1-beta1)</h1> <h1>Component Builder (v.5.1.1-beta2)</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.

View File

@ -131,28 +131,10 @@
<element>pkg_component_builder</element> <element>pkg_component_builder</element>
<type>package</type> <type>package</type>
<client>site</client> <client>site</client>
<version>5.1.1-alpha</version> <version>5.1.1-beta</version>
<infourl title="Component Builder!">https://dev.vdm.io</infourl> <infourl title="Component Builder!">https://dev.vdm.io</infourl>
<downloads> <downloads>
<downloadurl type="full" format="zip">https://github.com/vdm-io/pkg-component-builder/archive/refs/tags/v5.1.1-alpha4.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>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>
</downloads> </downloads>
<tags> <tags>
<tag>beta</tag> <tag>beta</tag>
@ -164,18 +146,19 @@
<update> <update>
<name>Component Builder</name> <name>Component Builder</name>
<description>Builds Complex Joomla Components</description> <description>Builds Complex Joomla Components</description>
<element>com_componentbuilder</element> <element>pkg_component_builder</element>
<type>component</type> <type>package</type>
<version>5.1.1-alpha5</version> <client>site</client>
<version>5.1.1-beta2</version>
<infourl title="Component Builder!">https://dev.vdm.io</infourl> <infourl title="Component Builder!">https://dev.vdm.io</infourl>
<downloads> <downloads>
<downloadurl type="full" format="zip">https://github.com/vdm-io/pkg-component-builder/archive/refs/tags/v5.1.1-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> </downloads>
<tags> <tags>
<tag>stable</tag> <tag>beta</tag>
</tags> </tags>
<maintainer>Llewellyn van der Merwe</maintainer> <maintainer>Llewellyn van der Merwe</maintainer>
<maintainerurl>https://dev.vdm.io</maintainerurl> <maintainerurl>https://dev.vdm.io</maintainerurl>
<targetplatform name="joomla" version="5.*"/> <targetplatform name="joomla" version="5\.[012]"/>
</update> </update>
</updates> </updates>

View File

@ -62,7 +62,18 @@ class Dynamicget
8 => '!<', 8 => '!<',
9 => '!>', 9 => '!>',
10 => 'IN', 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'
]; ];
/** /**
@ -164,351 +175,190 @@ class Dynamicget
* Set Dynamic Get * Set Dynamic Get
* *
* @param object $item The item data * @param object $item The item data
* @param string $view_code The view code name * @param string $viewCode The view code name
* @param string $context The context for events * @param string $context The context for events
* *
* @return void * @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 = []; $item->custom_get = [];
$addJoins = true;
// should joined and other tweaks be added
$add_tweaks_joints = true;
// set source data
switch ($item->main_source) switch ($item->main_source)
{ {
case 1: case 1:
// check if auto sync is set $this->configureViewSource($item, $viewCode, $context);
break;
case 2:
$this->configureDbSource($item, $viewCode, $context);
break;
case 3:
$this->configureCustomSource($item, $viewCode, $context);
$addJoins = false;
break;
}
if ($addJoins)
{
$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,
$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) if ($item->select_all == 1)
{ {
$item->view_selection = '*'; $item->view_selection = '*';
} }
// set the view data
$item->main_get[0]['selection'] = $this->selection->get( $item->main_get[] = [
$item->key, $view_code, 'selection' => $this->selection->get(
$item->key,
$viewCode,
$item->view_selection, $item->view_selection,
$item->view_table_main, 'a', 'view' $item->view_table_main,
); 'a',
$item->main_get[0]['as'] = 'a'; 'view'
$item->main_get[0]['key'] = $item->key; ),
$item->main_get[0]['context'] = $context; 'as' => 'a',
'key' => $item->key,
'context' => $context
];
unset($item->view_selection); unset($item->view_selection);
break; }
case 2:
// check if auto sync is set /**
* 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) if ($item->select_all == 1)
{ {
$item->db_selection = '*'; $item->db_selection = '*';
} }
// set the database data
$item->main_get[0]['selection'] = $this->selection->get( $item->main_get[] = [
$item->key, $view_code, 'selection' => $this->selection->get(
$item->key,
$viewCode,
$item->db_selection, $item->db_selection,
$item->db_table_main, 'a', 'db' $item->db_table_main,
); 'a',
$item->main_get[0]['as'] = 'a'; 'db'
$item->main_get[0]['key'] = $item->key; ),
$item->main_get[0]['context'] = $context; 'as' => 'a',
'key' => $item->key,
'context' => $context
];
unset($item->db_selection); unset($item->db_selection);
break; }
case 3:
// set GUI mapper field /**
* 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'; $this->guiMapper['field'] = 'php_custom_get';
// get the custom query
$customQueryString $query = $this->gui->set(
= $this->gui->set(
$this->customcode->update( $this->customcode->update(
base64_decode((string) $item->php_custom_get) base64_decode((string) $item->php_custom_get)
), ),
$this->guiMapper $this->guiMapper
); );
// get the table name $table = GetHelper::between($query, '$query->from(', ')');
$_searchQuery $tableName = '';
= GetHelper::between(
$customQueryString, '$query->from(', ')'
);
if (StringHelper::check( if (StringHelper::check($table) && strpos($table, '#__') !== false)
$_searchQuery
)
&& strpos((string) $_searchQuery, '#__') !== false)
{ {
$_queryName = GetHelper::between( $tableName = GetHelper::between($table, '#__', "'") ?: GetHelper::between($table, '#__', '"');
$_searchQuery, '#__', "'"
);
if (!StringHelper::check(
$_queryName
))
{
$_queryName = GetHelper::between(
$_searchQuery, '#__', '"'
);
}
} }
// set to blank if not found $item->main_get[] = [
if (!isset($_queryName) 'selection' => [
|| !StringHelper::check( 'select' => $query,
$_queryName 'from' => '',
)) 'table' => '',
{ 'type' => '',
$_queryName = ''; 'name' => $tableName
],
'as' => 'a',
'key' => $item->key,
'context' => $context
];
} }
// set custom script /**
$item->main_get[0]['selection'] = [ * Process filter statements on the item.
'select' => $customQueryString, *
'from' => '', 'table' => '', 'type' => '', * @param object $item The item data
'name' => $_queryName]; *
$item->main_get[0]['as'] = 'a'; * @return void
$item->main_get[0]['key'] = $item->key; * @since 5.1.1
$item->main_get[0]['context'] = $context; */
private function processFilters(object &$item): void
// do not add
$add_tweaks_joints = false;
break;
}
// only add if main source is not custom
if ($add_tweaks_joints)
{ {
// set join_view_table details $item->filter = json_decode((string) $item->filter, true);
$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)) if (ArrayHelper::check($item->filter))
{ {
foreach ($item->filter as $nr => &$option2) foreach ($item->filter as $nr => &$option)
{ {
if (isset($option2['operator'])) if (isset($option['operator']) && isset($this->operator[$option['operator']]))
{ {
$option2['operator'] = $this->operator[$option2['operator']]; $option['operator'] = $this->operator[$option['operator']];
$option2['state_key'] = $this->placeholder->update_( $option['state_key'] = $this->placeholder->update_(
$this->customcode->update( $this->customcode->update($option['state_key'])
$option2['state_key']
)
); );
$option2['key'] = $item->key; $option['key'] = $item->key;
} }
else else
{ {
@ -516,16 +366,27 @@ class Dynamicget
} }
} }
} }
}
// set where details /**
* 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); $item->where = json_decode((string) $item->where, true);
if (ArrayHelper::check($item->where)) if (ArrayHelper::check($item->where))
{ {
foreach ($item->where as $nr => &$option3) foreach ($item->where as $nr => &$option)
{ {
if (isset($option3['operator'])) if (isset($option['operator']) && isset($this->operator[$option['operator']]))
{ {
$option3['operator'] = $this->operator[$option3['operator']]; $option['operator'] = $this->operator[$option['operator']];
} }
else else
{ {
@ -537,42 +398,149 @@ class Dynamicget
{ {
unset($item->where); unset($item->where);
} }
}
// set order details /**
* 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); $item->order = json_decode((string) $item->order, true);
if (!ArrayHelper::check($item->order)) if (!ArrayHelper::check($item->order))
{ {
unset($item->order); unset($item->order);
} }
// set grouping
$item->group = json_decode((string) $item->group, true); $item->group = json_decode((string) $item->group, true);
if (!ArrayHelper::check($item->group)) if (!ArrayHelper::check($item->group))
{ {
unset($item->group); unset($item->group);
} }
// set global details $item->global = json_decode((string) $item->global, true);
$item->global = json_decode(
(string) $item->global, true
);
if (!ArrayHelper::check($item->global)) if (!ArrayHelper::check($item->global))
{ {
unset($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 else
{ {
// when we have a custom query script we do not add the dynamic options $this->sitedynamicget->set(
unset($item->join_view_table); "{$this->config->build_target}.{$viewCode}.{$option['as']}.{$join_field[1]}",
unset($item->join_db_table); $on_field[0]
unset($item->filter); );
unset($item->where); }
unset($item->order); }
unset($item->group); elseif ($option['row_type'] == 2)
unset($item->global); {
$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);
}
}