Release of v5.1.0-rc2
Add [AllowDynamicProperties] in the base view class for J5. Move the _prepareDocument above the display call in the base view class. Remove all backward compatibility issues, so JCB will not need the [Backward Compatibility] plugin to run. Added new import powers for custom import of spreadsheets. Move the setDocument and _prepareDocument above the display in the site view and custom admin view. Update the trashhelper layout to work in Joomla 5. Add AllowDynamicProperties (Joomla 4+5) to view class to allow Custom Dynamic Get methods to work without issues. Fix Save failed issue in dynamicGet. #1148. Move all [TEXT, EDITOR, TEXTAREA] fields from [NOT NULL] to [NULL]. Add the DateHelper class and improve the date methods. Add simple SessionHelper class. Add first classes for the new import engine. Improve the [VDM Registry] to be Joomla Registry Compatible. Move all registries to the [VDM Registry] class. Fix Checked Out to be null and not 0. (#1194). Fix created_by, modified_by, checked_out fields in the compiler of the SQL. (#1194). Update all core date fields in table class. (#1188). Update created_by, modified_by, checked_out fields in table class. Implementation of the decentralized Super-Power CORE repository network. (#1190). Fix the noticeboard to display Llewellyn's Joomla Social feed. Started compiling JCB5 on Joomla 5 with PHP 8.2. Add init_defaults option for dynamic form selection setup (to int new items with default values dynamically). Update all JCB 5 tables to utf8mb4_unicode_ci collation if misaligned. Move all internal ID linking to GUID inside of JCB 5. Updated the admin-tab-fields in add-fields view. #1205.
This commit is contained in:
parent
0321f9c469
commit
81c692ec83
@ -1,4 +1,4 @@
|
||||
# v5.1.0-rc1
|
||||
# v5.1.0-rc2
|
||||
|
||||
- Add [AllowDynamicProperties] in the base view class for J5
|
||||
- Move the _prepareDocument above the display call in the base view class
|
||||
@ -23,7 +23,8 @@
|
||||
- Started compiling JCB5 on Joomla 5 with PHP 8.2
|
||||
- Add init_defaults option for dynamic form selection setup (to int new items with default values dynamically)
|
||||
- Update all JCB 5 tables to utf8mb4_unicode_ci collation if misaligned
|
||||
- Move all internal ID linking to GUID inside of JCB 5
|
||||
- Move all internal ID linking to GUID inside of JCB 5
|
||||
- Updated the admin-tab-fields in add-fields view. #1205
|
||||
|
||||
# v5.0.3
|
||||
|
||||
|
@ -759,7 +759,7 @@ class Com_ComponentbuilderInstallerScript implements InstallerScriptInterface
|
||||
// rules
|
||||
'',
|
||||
// fieldMappings
|
||||
'{"common": {"core_content_item_id": "id","core_title": "name","core_state": "published","core_alias": "alias","core_created_time": "created","core_modified_time": "modified","core_body": "php_view","core_hits": "hits","core_publish_up": "null","core_publish_down": "null","core_access": "access","core_params": "params","core_featured": "null","core_metadata": "null","core_language": "null","core_images": "null","core_urls": "null","core_version": "version","core_ordering": "ordering","core_metakey": "null","core_metadesc": "null","core_catid": "null","core_xreference": "null","asset_id": "asset_id"},"special": {"name":"name","description":"description","dynamic_get":"dynamic_get","php_view":"php_view","add_php_view":"add_php_view","template":"template","snippet":"snippet","libraries":"libraries","alias":"alias"}}',
|
||||
'{"common": {"core_content_item_id": "id","core_title": "name","core_state": "published","core_alias": "alias","core_created_time": "created","core_modified_time": "modified","core_body": "php_view","core_hits": "hits","core_publish_up": "null","core_publish_down": "null","core_access": "access","core_params": "params","core_featured": "null","core_metadata": "null","core_language": "null","core_images": "null","core_urls": "null","core_version": "version","core_ordering": "ordering","core_metakey": "null","core_metadesc": "null","core_catid": "null","core_xreference": "null","asset_id": "asset_id"},"special": {"name":"name","description":"description","dynamic_get":"dynamic_get","guid":"guid","php_view":"php_view","add_php_view":"add_php_view","template":"template","snippet":"snippet","libraries":"libraries","alias":"alias"}}',
|
||||
// router
|
||||
'',
|
||||
// contentHistoryOptions
|
||||
@ -776,7 +776,7 @@ class Com_ComponentbuilderInstallerScript implements InstallerScriptInterface
|
||||
// rules
|
||||
'',
|
||||
// fieldMappings
|
||||
'{"common": {"core_content_item_id": "id","core_title": "name","core_state": "published","core_alias": "alias","core_created_time": "created","core_modified_time": "modified","core_body": "php_view","core_hits": "hits","core_publish_up": "null","core_publish_down": "null","core_access": "access","core_params": "params","core_featured": "null","core_metadata": "null","core_language": "null","core_images": "null","core_urls": "null","core_version": "version","core_ordering": "ordering","core_metakey": "null","core_metadesc": "null","core_catid": "null","core_xreference": "null","asset_id": "asset_id"},"special": {"name":"name","description":"description","dynamic_get":"dynamic_get","snippet":"snippet","php_view":"php_view","add_php_view":"add_php_view","layout":"layout","libraries":"libraries","alias":"alias"}}',
|
||||
'{"common": {"core_content_item_id": "id","core_title": "name","core_state": "published","core_alias": "alias","core_created_time": "created","core_modified_time": "modified","core_body": "php_view","core_hits": "hits","core_publish_up": "null","core_publish_down": "null","core_access": "access","core_params": "params","core_featured": "null","core_metadata": "null","core_language": "null","core_images": "null","core_urls": "null","core_version": "version","core_ordering": "ordering","core_metakey": "null","core_metadesc": "null","core_catid": "null","core_xreference": "null","asset_id": "asset_id"},"special": {"name":"name","description":"description","dynamic_get":"dynamic_get","snippet":"snippet","guid":"guid","php_view":"php_view","add_php_view":"add_php_view","layout":"layout","libraries":"libraries","alias":"alias"}}',
|
||||
// router
|
||||
'',
|
||||
// contentHistoryOptions
|
||||
@ -2515,7 +2515,7 @@ class Com_ComponentbuilderInstallerScript implements InstallerScriptInterface
|
||||
// rules
|
||||
'',
|
||||
// fieldMappings
|
||||
'{"common": {"core_content_item_id": "id","core_title": "name","core_state": "published","core_alias": "alias","core_created_time": "created","core_modified_time": "modified","core_body": "php_view","core_hits": "hits","core_publish_up": "null","core_publish_down": "null","core_access": "access","core_params": "params","core_featured": "null","core_metadata": "null","core_language": "null","core_images": "null","core_urls": "null","core_version": "version","core_ordering": "ordering","core_metakey": "null","core_metadesc": "null","core_catid": "null","core_xreference": "null","asset_id": "asset_id"},"special": {"name":"name","description":"description","dynamic_get":"dynamic_get","php_view":"php_view","add_php_view":"add_php_view","template":"template","snippet":"snippet","libraries":"libraries","alias":"alias"}}',
|
||||
'{"common": {"core_content_item_id": "id","core_title": "name","core_state": "published","core_alias": "alias","core_created_time": "created","core_modified_time": "modified","core_body": "php_view","core_hits": "hits","core_publish_up": "null","core_publish_down": "null","core_access": "access","core_params": "params","core_featured": "null","core_metadata": "null","core_language": "null","core_images": "null","core_urls": "null","core_version": "version","core_ordering": "ordering","core_metakey": "null","core_metadesc": "null","core_catid": "null","core_xreference": "null","asset_id": "asset_id"},"special": {"name":"name","description":"description","dynamic_get":"dynamic_get","guid":"guid","php_view":"php_view","add_php_view":"add_php_view","template":"template","snippet":"snippet","libraries":"libraries","alias":"alias"}}',
|
||||
// router
|
||||
'',
|
||||
// contentHistoryOptions
|
||||
@ -2532,7 +2532,7 @@ class Com_ComponentbuilderInstallerScript implements InstallerScriptInterface
|
||||
// rules
|
||||
'',
|
||||
// fieldMappings
|
||||
'{"common": {"core_content_item_id": "id","core_title": "name","core_state": "published","core_alias": "alias","core_created_time": "created","core_modified_time": "modified","core_body": "php_view","core_hits": "hits","core_publish_up": "null","core_publish_down": "null","core_access": "access","core_params": "params","core_featured": "null","core_metadata": "null","core_language": "null","core_images": "null","core_urls": "null","core_version": "version","core_ordering": "ordering","core_metakey": "null","core_metadesc": "null","core_catid": "null","core_xreference": "null","asset_id": "asset_id"},"special": {"name":"name","description":"description","dynamic_get":"dynamic_get","snippet":"snippet","php_view":"php_view","add_php_view":"add_php_view","layout":"layout","libraries":"libraries","alias":"alias"}}',
|
||||
'{"common": {"core_content_item_id": "id","core_title": "name","core_state": "published","core_alias": "alias","core_created_time": "created","core_modified_time": "modified","core_body": "php_view","core_hits": "hits","core_publish_up": "null","core_publish_down": "null","core_access": "access","core_params": "params","core_featured": "null","core_metadata": "null","core_language": "null","core_images": "null","core_urls": "null","core_version": "version","core_ordering": "ordering","core_metakey": "null","core_metadesc": "null","core_catid": "null","core_xreference": "null","asset_id": "asset_id"},"special": {"name":"name","description":"description","dynamic_get":"dynamic_get","snippet":"snippet","guid":"guid","php_view":"php_view","add_php_view":"add_php_view","layout":"layout","libraries":"libraries","alias":"alias"}}',
|
||||
// router
|
||||
'',
|
||||
// contentHistoryOptions
|
||||
@ -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.0-rc1 Was Successful! Let us know if anything is not working as expected.</h3></div>';
|
||||
<h3>Upgrade to Version 5.1.0-rc2 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();
|
||||
|
10
README.md
10
README.md
@ -9,7 +9,7 @@ The Component Builder for [Joomla](https://extensions.joomla.org/extension/compo
|
||||
|
||||
Whether you're a seasoned [Joomla](https://extensions.joomla.org/extension/component-builder/) developer, or have just started, Component Builder will save you lots of time and money. A real must have!
|
||||
|
||||
You can install it quite easily and with no limitations. On [gitea](https://git.vdm.dev/joomla/Component-Builder/tags) is the latest release (5.1.0-rc1) with **ALL** its features and **ALL** concepts totally open-source and free!
|
||||
You can install it quite easily and with no limitations. On [gitea](https://git.vdm.dev/joomla/Component-Builder/tags) is the latest release (5.1.0-rc2) with **ALL** its features and **ALL** concepts totally open-source and free!
|
||||
|
||||
> Watch Quick Build of a Hello World component in [JCB on Youtube](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=45)
|
||||
|
||||
@ -144,12 +144,12 @@ TODO
|
||||
+ *Author*: [Llewellyn van der Merwe](mailto:joomla@vdm.io)
|
||||
+ *Name*: [Component Builder](https://git.vdm.dev/joomla/Component-Builder)
|
||||
+ *First Build*: 30th April, 2015
|
||||
+ *Last Build*: 4th February, 2025
|
||||
+ *Version*: 5.1.0-rc1
|
||||
+ *Last Build*: 8th February, 2025
|
||||
+ *Version*: 5.1.0-rc2
|
||||
+ *Copyright*: Copyright (C) 2015 Vast Development Method. All rights reserved.
|
||||
+ *License*: GNU General Public License version 2 or later; see LICENSE.txt
|
||||
+ *Line count*: **926305**
|
||||
+ *Field count*: **2106**
|
||||
+ *Line count*: **926470**
|
||||
+ *Field count*: **2108**
|
||||
+ *File count*: **6387**
|
||||
+ *Folder count*: **640**
|
||||
|
||||
|
@ -9,7 +9,7 @@ The Component Builder for [Joomla](https://extensions.joomla.org/extension/compo
|
||||
|
||||
Whether you're a seasoned [Joomla](https://extensions.joomla.org/extension/component-builder/) developer, or have just started, Component Builder will save you lots of time and money. A real must have!
|
||||
|
||||
You can install it quite easily and with no limitations. On [gitea](https://git.vdm.dev/joomla/Component-Builder/tags) is the latest release (5.1.0-rc1) with **ALL** its features and **ALL** concepts totally open-source and free!
|
||||
You can install it quite easily and with no limitations. On [gitea](https://git.vdm.dev/joomla/Component-Builder/tags) is the latest release (5.1.0-rc2) with **ALL** its features and **ALL** concepts totally open-source and free!
|
||||
|
||||
> Watch Quick Build of a Hello World component in [JCB on Youtube](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=45)
|
||||
|
||||
@ -144,12 +144,12 @@ TODO
|
||||
+ *Author*: [Llewellyn van der Merwe](mailto:joomla@vdm.io)
|
||||
+ *Name*: [Component Builder](https://git.vdm.dev/joomla/Component-Builder)
|
||||
+ *First Build*: 30th April, 2015
|
||||
+ *Last Build*: 4th February, 2025
|
||||
+ *Version*: 5.1.0-rc1
|
||||
+ *Last Build*: 8th February, 2025
|
||||
+ *Version*: 5.1.0-rc2
|
||||
+ *Copyright*: Copyright (C) 2015 Vast Development Method. All rights reserved.
|
||||
+ *License*: GNU General Public License version 2 or later; see LICENSE.txt
|
||||
+ *Line count*: **926305**
|
||||
+ *Field count*: **2106**
|
||||
+ *Line count*: **926470**
|
||||
+ *Field count*: **2108**
|
||||
+ *File count*: **6387**
|
||||
+ *Folder count*: **640**
|
||||
|
||||
|
@ -53,7 +53,7 @@
|
||||
type="list"
|
||||
label="JGLOBAL_SORT_BY"
|
||||
class="js-select-submit-on-change"
|
||||
default="a.id desc"
|
||||
default=" desc"
|
||||
validate="options"
|
||||
>
|
||||
<option value="">JGLOBAL_SORT_BY</option>
|
||||
|
@ -53,7 +53,7 @@
|
||||
type="list"
|
||||
label="JGLOBAL_SORT_BY"
|
||||
class="js-select-submit-on-change"
|
||||
default="a.id desc"
|
||||
default=" desc"
|
||||
validate="options"
|
||||
>
|
||||
<option value="">JGLOBAL_SORT_BY</option>
|
||||
|
@ -152,6 +152,20 @@
|
||||
required="false"
|
||||
button="true"
|
||||
/>
|
||||
<!-- Guid Field. Type: Text. (joomla) -->
|
||||
<field
|
||||
type="text"
|
||||
name="guid"
|
||||
label="COM_COMPONENTBUILDER_LAYOUT_GUID_LABEL"
|
||||
size="40"
|
||||
maxlength="40"
|
||||
description="COM_COMPONENTBUILDER_LAYOUT_GUID_DESCRIPTION"
|
||||
class="text_area"
|
||||
readonly="true"
|
||||
filter="CMD"
|
||||
validate="guid"
|
||||
hint="COM_COMPONENTBUILDER_LAYOUT_GUID_HINT"
|
||||
/>
|
||||
<!-- Php_view Field. Type: Editor. (joomla) -->
|
||||
<field
|
||||
type="editor"
|
||||
|
@ -140,6 +140,20 @@
|
||||
required="false"
|
||||
button="true"
|
||||
/>
|
||||
<!-- Guid Field. Type: Text. (joomla) -->
|
||||
<field
|
||||
type="text"
|
||||
name="guid"
|
||||
label="COM_COMPONENTBUILDER_TEMPLATE_GUID_LABEL"
|
||||
size="40"
|
||||
maxlength="40"
|
||||
description="COM_COMPONENTBUILDER_TEMPLATE_GUID_DESCRIPTION"
|
||||
class="text_area"
|
||||
readonly="true"
|
||||
filter="CMD"
|
||||
validate="guid"
|
||||
hint="COM_COMPONENTBUILDER_TEMPLATE_GUID_HINT"
|
||||
/>
|
||||
<!-- Php_view Field. Type: Editor. (joomla) -->
|
||||
<field
|
||||
type="editor"
|
||||
|
@ -7134,6 +7134,9 @@ COM_COMPONENTBUILDER_LAYOUT_ERROR_UNIQUE_ALIAS="Another Layout has the same alia
|
||||
COM_COMPONENTBUILDER_LAYOUT_ERROR_UNIQUE_ALIAS_TRASHED="A trashed Layout has the same alias ."
|
||||
COM_COMPONENTBUILDER_LAYOUT_GET_SNIPPETS_BUTTON_ACCESS="Layout Get Snippets Button Access"
|
||||
COM_COMPONENTBUILDER_LAYOUT_GET_SNIPPETS_BUTTON_ACCESS_DESC="Allows the users in this group to access the get snippets button."
|
||||
COM_COMPONENTBUILDER_LAYOUT_GUID_DESCRIPTION="Globally Unique Identifier"
|
||||
COM_COMPONENTBUILDER_LAYOUT_GUID_HINT="Auto Generated"
|
||||
COM_COMPONENTBUILDER_LAYOUT_GUID_LABEL="GUID"
|
||||
COM_COMPONENTBUILDER_LAYOUT_ID="Id"
|
||||
COM_COMPONENTBUILDER_LAYOUT_LAYOUT_DESCRIPTION="Add the layout code here."
|
||||
COM_COMPONENTBUILDER_LAYOUT_LAYOUT_LABEL="Layout<br /><small>$displayData is the Object that is used inside the layout file to build displayed output</small>"
|
||||
@ -9014,6 +9017,9 @@ COM_COMPONENTBUILDER_TEMPLATE_ERROR_UNIQUE_ALIAS="Another Template has the same
|
||||
COM_COMPONENTBUILDER_TEMPLATE_ERROR_UNIQUE_ALIAS_TRASHED="A trashed Template has the same alias ."
|
||||
COM_COMPONENTBUILDER_TEMPLATE_GET_SNIPPETS_BUTTON_ACCESS="Template Get Snippets Button Access"
|
||||
COM_COMPONENTBUILDER_TEMPLATE_GET_SNIPPETS_BUTTON_ACCESS_DESC="Allows the users in this group to access the get snippets button."
|
||||
COM_COMPONENTBUILDER_TEMPLATE_GUID_DESCRIPTION="Globally Unique Identifier"
|
||||
COM_COMPONENTBUILDER_TEMPLATE_GUID_HINT="Auto Generated"
|
||||
COM_COMPONENTBUILDER_TEMPLATE_GUID_LABEL="GUID"
|
||||
COM_COMPONENTBUILDER_TEMPLATE_ID="Id"
|
||||
COM_COMPONENTBUILDER_TEMPLATE_LIBRARIES_DESCRIPTION="Select the media libraries you want to use here."
|
||||
COM_COMPONENTBUILDER_TEMPLATE_LIBRARIES_LABEL="Media Libraries"
|
||||
|
@ -26,6 +26,7 @@ $fields_tab_layout = 'fields_' . $layout_path_array[1];
|
||||
|
||||
// get the fields
|
||||
$fields = $displayData->get($fields_tab_layout) ?: array(
|
||||
'guid',
|
||||
'title',
|
||||
'created',
|
||||
'created_by',
|
||||
|
@ -26,6 +26,7 @@ $fields_tab_layout = 'fields_' . $layout_path_array[1];
|
||||
|
||||
// get the fields
|
||||
$fields = $displayData->get($fields_tab_layout) ?: array(
|
||||
'guid',
|
||||
'title',
|
||||
'created',
|
||||
'created_by',
|
||||
|
File diff suppressed because one or more lines are too long
@ -16,6 +16,10 @@ use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
use Joomla\CMS\Component\ComponentHelper;
|
||||
use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper;
|
||||
use VDM\Joomla\Utilities\GetHelper;
|
||||
use VDM\Joomla\Utilities\GuidHelper;
|
||||
use VDM\Joomla\Utilities\JsonHelper;
|
||||
use VDM\Joomla\Utilities\ArrayHelper;
|
||||
|
||||
// No direct access to this file
|
||||
\defined('_JEXEC') or die;
|
||||
@ -42,50 +46,52 @@ class ViewtabsField extends ListField
|
||||
*/
|
||||
protected function getOptions()
|
||||
{
|
||||
// load the db opbject
|
||||
$db = Factory::getDBO();
|
||||
// get the input from url
|
||||
$jinput = Factory::getApplication()->input;
|
||||
// get the view name & id
|
||||
$fieldsID = $jinput->getInt('id', 0);
|
||||
$db = Factory::getDBO();
|
||||
$query = $db->getQuery(true);
|
||||
$query->select($db->quoteName(array('a.id','a.addtabs'),array('id','addtabs')));
|
||||
$query->from($db->quoteName('#__componentbuilder_admin_view', 'a'));
|
||||
if ($fieldsID > 0)
|
||||
// get the id
|
||||
$ID = $jinput->getInt('id', 0);
|
||||
$adminView = null;
|
||||
if (is_numeric($ID) && $ID >= 1)
|
||||
{
|
||||
// get the view name
|
||||
$viewName = $jinput->get('view', null, 'WORD');
|
||||
// only allow for fields and custom tabs
|
||||
if ('admin_fields' !== $viewName && 'admin_custom_tabs' !== $viewName)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
$query->join('LEFT', $db->quoteName('#__componentbuilder_' . $viewName, 'b') . ' ON (' . $db->quoteName('a.id') . ' = ' . $db->quoteName('b.admin_view') . ')');
|
||||
$query->where($db->quoteName('b.id') . ' = ' . (int) $fieldsID);
|
||||
// get the admin view GUID
|
||||
$adminView = GetHelper::var($viewName, (int) $ID, 'id', 'admin_view');
|
||||
}
|
||||
else
|
||||
{
|
||||
// get the refs if found
|
||||
$ref = $jinput->get('ref', null, 'WORD');
|
||||
$refid = $jinput->getInt('refid', 0);
|
||||
if ('admin_view' === $ref && $refid > 0)
|
||||
// get the admin view GUID
|
||||
$initDefaults = $jinput->get('init_defaults', null, 'STRING');
|
||||
if (!empty($initDefaults))
|
||||
{
|
||||
$query->where($db->quoteName('a.id') . ' = ' . (int) $refid);
|
||||
}
|
||||
else
|
||||
{
|
||||
// kry maar niks
|
||||
$query->where($db->quoteName('a.id') . ' = 0');
|
||||
$initDefaults = json_decode(urldecode($initDefaults), true);
|
||||
$adminView = $initDefaults['admin_view'] ?? null;
|
||||
}
|
||||
}
|
||||
$db = Factory::getDBO();
|
||||
$query = $db->getQuery(true);
|
||||
$query->select($db->quoteName(['a.addtabs'],['addtabs']));
|
||||
$query->from($db->quoteName('#__componentbuilder_admin_view', 'a'));
|
||||
if (GuidHelper::valid($adminView))
|
||||
{
|
||||
$query->where($db->quoteName('a.guid') . ' = ' . $db->quote($adminView));
|
||||
}
|
||||
else
|
||||
{
|
||||
// kry maar niks
|
||||
$query->where($db->quoteName('a.id') . ' = 0');
|
||||
}
|
||||
$query->where($db->quoteName('a.published') . ' >= 1');
|
||||
$query->order('a.addtabs ASC');
|
||||
$db->setQuery((string)$query);
|
||||
$item = $db->loadObject();
|
||||
$options = array();
|
||||
if (isset($item->addtabs) && ComponentbuilderHelper::checkJson($item->addtabs))
|
||||
$options = [];
|
||||
if (isset($item->addtabs) && JsonHelper::check($item->addtabs))
|
||||
{
|
||||
$items = json_decode($item->addtabs, true);
|
||||
// check if the array has values
|
||||
if (ComponentbuilderHelper::checkArray($items))
|
||||
if (ArrayHelper::check($items))
|
||||
{
|
||||
$nr = 1;
|
||||
foreach($items as $itemName)
|
||||
@ -96,7 +102,7 @@ class ViewtabsField extends ListField
|
||||
}
|
||||
}
|
||||
// check if any were loaded
|
||||
if (!ComponentbuilderHelper::checkArray($options))
|
||||
if (!ArrayHelper::check($options))
|
||||
{
|
||||
$options[] = Html::_('select.option', 1, Text::_('COM_COMPONENTBUILDER_DETAILS'));
|
||||
}
|
||||
|
@ -34,6 +34,7 @@ use VDM\Joomla\Utilities\StringHelper as UtilitiesStringHelper;
|
||||
use VDM\Joomla\Utilities\ObjectHelper;
|
||||
use VDM\Joomla\Utilities\GuidHelper;
|
||||
use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper;
|
||||
use VDM\Joomla\Utilities\GetHelper;
|
||||
|
||||
// No direct access to this file
|
||||
\defined('_JEXEC') or die;
|
||||
@ -414,7 +415,14 @@ class LayoutModel extends AdminModel
|
||||
$form->setFieldAttribute($name, 'editor', $global_editor . '|none');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Only load the GUID if new item (or empty)
|
||||
if (0 == $id || !($val = $form->getValue('guid')))
|
||||
{
|
||||
$form->setValue('guid', null, GuidHelper::get());
|
||||
}
|
||||
|
||||
return $form;
|
||||
}
|
||||
|
||||
@ -612,7 +620,7 @@ class LayoutModel extends AdminModel
|
||||
*/
|
||||
protected function getUniqueFields()
|
||||
{
|
||||
return false;
|
||||
return array('guid');
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1016,7 +1024,21 @@ class LayoutModel extends AdminModel
|
||||
}
|
||||
|
||||
// always reset the snippets
|
||||
$data['snippet'] = 0;
|
||||
$data['snippet'] = 0;
|
||||
|
||||
// Set the GUID if empty or not valid
|
||||
if (empty($data['guid']) && $data['id'] > 0)
|
||||
{
|
||||
// get the existing one
|
||||
$data['guid'] = (string) GetHelper::var('layout', $data['id'], 'id', 'guid');
|
||||
}
|
||||
|
||||
// Set the GUID if empty or not valid
|
||||
while (!GuidHelper::valid($data['guid'], "layout", $data['id']))
|
||||
{
|
||||
// must always be set
|
||||
$data['guid'] = (string) GuidHelper::get();
|
||||
}
|
||||
|
||||
// Set the libraries items to data.
|
||||
if (isset($data['libraries']) && is_array($data['libraries']))
|
||||
|
@ -357,7 +357,7 @@ class LayoutsModel extends ListModel
|
||||
}
|
||||
|
||||
// Add the list ordering clause.
|
||||
$orderCol = $this->getState('list.ordering', 'a.id');
|
||||
$orderCol = $this->getState('list.ordering', '');
|
||||
$orderDirn = $this->getState('list.direction', 'desc');
|
||||
if ($orderCol != '')
|
||||
{
|
||||
|
@ -34,6 +34,7 @@ use VDM\Joomla\Utilities\StringHelper as UtilitiesStringHelper;
|
||||
use VDM\Joomla\Utilities\ObjectHelper;
|
||||
use VDM\Joomla\Utilities\GuidHelper;
|
||||
use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper;
|
||||
use VDM\Joomla\Utilities\GetHelper;
|
||||
|
||||
// No direct access to this file
|
||||
\defined('_JEXEC') or die;
|
||||
@ -414,7 +415,14 @@ class TemplateModel extends AdminModel
|
||||
$form->setFieldAttribute($name, 'editor', $global_editor . '|none');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Only load the GUID if new item (or empty)
|
||||
if (0 == $id || !($val = $form->getValue('guid')))
|
||||
{
|
||||
$form->setValue('guid', null, GuidHelper::get());
|
||||
}
|
||||
|
||||
return $form;
|
||||
}
|
||||
|
||||
@ -612,7 +620,7 @@ class TemplateModel extends AdminModel
|
||||
*/
|
||||
protected function getUniqueFields()
|
||||
{
|
||||
return false;
|
||||
return array('guid');
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1016,7 +1024,21 @@ class TemplateModel extends AdminModel
|
||||
}
|
||||
|
||||
// always reset the snippets
|
||||
$data['snippet'] = 0;
|
||||
$data['snippet'] = 0;
|
||||
|
||||
// Set the GUID if empty or not valid
|
||||
if (empty($data['guid']) && $data['id'] > 0)
|
||||
{
|
||||
// get the existing one
|
||||
$data['guid'] = (string) GetHelper::var('template', $data['id'], 'id', 'guid');
|
||||
}
|
||||
|
||||
// Set the GUID if empty or not valid
|
||||
while (!GuidHelper::valid($data['guid'], "template", $data['id']))
|
||||
{
|
||||
// must always be set
|
||||
$data['guid'] = (string) GuidHelper::get();
|
||||
}
|
||||
|
||||
// Set the libraries items to data.
|
||||
if (isset($data['libraries']) && is_array($data['libraries']))
|
||||
|
@ -357,7 +357,7 @@ class TemplatesModel extends ListModel
|
||||
}
|
||||
|
||||
// Add the list ordering clause.
|
||||
$orderCol = $this->getState('list.ordering', 'a.id');
|
||||
$orderCol = $this->getState('list.ordering', '');
|
||||
$orderDirn = $this->getState('list.direction', 'desc');
|
||||
if ($orderCol != '')
|
||||
{
|
||||
|
@ -118,7 +118,7 @@ class HtmlView extends BaseHtmlView
|
||||
// Load the active filters.
|
||||
$this->activeFilters = $this->get('ActiveFilters');
|
||||
// Add the list ordering clause.
|
||||
$this->listOrder = $this->escape($this->state->get('list.ordering', 'a.id'));
|
||||
$this->listOrder = $this->escape($this->state->get('list.ordering', ''));
|
||||
$this->listDirn = $this->escape($this->state->get('list.direction', 'desc'));
|
||||
$this->saveOrder = $this->listOrder == 'a.ordering';
|
||||
// set the return here value
|
||||
|
@ -118,7 +118,7 @@ class HtmlView extends BaseHtmlView
|
||||
// Load the active filters.
|
||||
$this->activeFilters = $this->get('ActiveFilters');
|
||||
// Add the list ordering clause.
|
||||
$this->listOrder = $this->escape($this->state->get('list.ordering', 'a.id'));
|
||||
$this->listOrder = $this->escape($this->state->get('list.ordering', ''));
|
||||
$this->listDirn = $this->escape($this->state->get('list.direction', 'desc'));
|
||||
$this->saveOrder = $this->listOrder == 'a.ordering';
|
||||
// set the return here value
|
||||
|
@ -1,15 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<extension type="component" version="5.0" method="upgrade">
|
||||
<name>COM_COMPONENTBUILDER</name>
|
||||
<creationDate>4th February, 2025</creationDate>
|
||||
<creationDate>8th February, 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.0-rc1</version>
|
||||
<version>5.1.0-rc2</version>
|
||||
<description><![CDATA[
|
||||
<h1>Component Builder (v.5.1.0-rc1)</h1>
|
||||
<h1>Component Builder (v.5.1.0-rc2)</h1>
|
||||
<div style="clear: both;"></div>
|
||||
<p>The Component Builder for [Joomla](https://extensions.joomla.org/extension/component-builder/) is highly advanced tool that is truly able to build extremely complex components in a fraction of the time.
|
||||
|
||||
|
@ -113,10 +113,10 @@
|
||||
<element>pkg_component_builder</element>
|
||||
<type>package</type>
|
||||
<client>site</client>
|
||||
<version>5.1.0-rc1</version>
|
||||
<version>5.1.0-rc2</version>
|
||||
<infourl title="Component Builder!">https://dev.vdm.io</infourl>
|
||||
<downloads>
|
||||
<downloadurl type="full" format="zip">https://git.vdm.dev/api/v1/repos/joomla/pkg-component-builder/archive/v5.1.0-rc1.zip</downloadurl>
|
||||
<downloadurl type="full" format="zip">https://git.vdm.dev/api/v1/repos/joomla/pkg-component-builder/archive/v5.1.0-rc2.zip</downloadurl>
|
||||
</downloads>
|
||||
<tags>
|
||||
<tag>release_candidate</tag>
|
||||
|
@ -6695,6 +6695,23 @@ final class Table extends BaseTable implements TableInterface
|
||||
'key' => 'guid',
|
||||
],
|
||||
],
|
||||
'guid' => [
|
||||
'name' => 'guid',
|
||||
'label' => 'COM_COMPONENTBUILDER_TEMPLATE_GUID_LABEL',
|
||||
'type' => 'text',
|
||||
'title' => false,
|
||||
'list' => 'templates',
|
||||
'store' => NULL,
|
||||
'tab_name' => 'publishing',
|
||||
'db' => [
|
||||
'type' => 'VARCHAR(36)',
|
||||
'default' => '',
|
||||
'null_switch' => 'NULL',
|
||||
'unique_key' => false,
|
||||
'key' => true,
|
||||
],
|
||||
'link' => NULL,
|
||||
],
|
||||
'php_view' => [
|
||||
'name' => 'php_view',
|
||||
'label' => 'COM_COMPONENTBUILDER_TEMPLATE_PHP_VIEW_LABEL',
|
||||
@ -6909,6 +6926,23 @@ final class Table extends BaseTable implements TableInterface
|
||||
'key' => 'guid',
|
||||
],
|
||||
],
|
||||
'guid' => [
|
||||
'name' => 'guid',
|
||||
'label' => 'COM_COMPONENTBUILDER_LAYOUT_GUID_LABEL',
|
||||
'type' => 'text',
|
||||
'title' => false,
|
||||
'list' => 'layouts',
|
||||
'store' => NULL,
|
||||
'tab_name' => 'publishing',
|
||||
'db' => [
|
||||
'type' => 'VARCHAR(36)',
|
||||
'default' => '',
|
||||
'null_switch' => 'NULL',
|
||||
'unique_key' => false,
|
||||
'key' => true,
|
||||
],
|
||||
'link' => NULL,
|
||||
],
|
||||
'php_view' => [
|
||||
'name' => 'php_view',
|
||||
'label' => 'COM_COMPONENTBUILDER_LAYOUT_PHP_VIEW_LABEL',
|
||||
|
Loading…
x
Reference in New Issue
Block a user