forked from joomla/Component-Builder
Release of v4.0.0-rc2
Improved the Schema Table update engine (more). Fix autoloader timing, and loading. Implement the Joomla Powers in JCB code, to move away from JClasses. Remove the SQL update, to only use the Schema updates of table columns to avoid collusion.
This commit is contained in:
parent
0ec95282ee
commit
13dedb7b0e
33
CHANGELOG.md
33
CHANGELOG.md
@ -1,36 +1,25 @@
|
||||
# v4.0.0-rc1
|
||||
# v4.0.0-rc2
|
||||
|
||||
- Improved the Schema Table update engine (more).
|
||||
- Fix autoloader timing, and loading.
|
||||
- Implement the Joomla Powers in JCB code, to move away from JClasses.
|
||||
- Remove the SQL update, to only use the Schema updates of table columns to avoid collusion.
|
||||
|
||||
# v4.0.0-beta5
|
||||
# v4.0.0-beta
|
||||
|
||||
- Add the compiler menu back.
|
||||
- Fix the CustomfolderlistField #1094
|
||||
- Add view list and single name fix.
|
||||
- Add component code name fix.
|
||||
- Add reset list of powers.
|
||||
- Add Joomla powers for namespace dynamic management.
|
||||
- Add fallback option to ensure that all JCB tables and fields exist.
|
||||
- Move the powers autoloader to its own file.
|
||||
- Fix the media field size limitation. #1109
|
||||
- Add dynamic datatype update to schema field check.
|
||||
- Fix version_update column size.
|
||||
- Improved the Schema Table update engine.
|
||||
|
||||
# v4.0.0-beta4
|
||||
|
||||
- Add fallback option to ensure that all JCB tables and fields exist.
|
||||
- Move the powers autoloader to its own file.
|
||||
|
||||
# v4.0.0-beta3
|
||||
|
||||
- Add Joomla powers for namespace dynamic management.
|
||||
|
||||
# v4.0.0-beta2
|
||||
|
||||
- Add view list and single name fix.
|
||||
- Add component code name fix.
|
||||
- Add reset list of powers.
|
||||
|
||||
# v4.0.0-beta1
|
||||
|
||||
- Add the compiler menu back.
|
||||
- Fix the CustomfolderlistField #1094
|
||||
|
||||
# v4.0.0-alpha
|
||||
|
||||
- First alpha release of Component Builder towards Joomla 4 (very unstable...)
|
||||
|
@ -503,9 +503,6 @@ class Com_ComponentbuilderInstallerScript implements InstallerScriptInterface
|
||||
|
||||
// Remove Joomla_plugin_files_folders_urls from action logs config table.
|
||||
$this->removeActionLogConfig('com_componentbuilder.joomla_plugin_files_folders_urls');
|
||||
|
||||
// Remove Joomla_component from action logs config table.
|
||||
$this->removeActionLogConfig('com_componentbuilder.joomla_component');
|
||||
// little notice as after service, in case of bad experience with component.
|
||||
echo '<div style="background-color: #fff;" class="alert alert-info">
|
||||
<h2>Did something go wrong? Are you disappointed?</h2>
|
||||
@ -2313,22 +2310,6 @@ class Com_ComponentbuilderInstallerScript implements InstallerScriptInterface
|
||||
// textPrefix
|
||||
'COM_COMPONENTBUILDER'
|
||||
);
|
||||
|
||||
// Add Joomla_component to the action logs config table.
|
||||
$this->setActionLogConfig(
|
||||
// typeTitle
|
||||
'JOOMLA_COMPONENT',
|
||||
// typeAlias
|
||||
'com_componentbuilder.joomla_component',
|
||||
// idHolder
|
||||
'id',
|
||||
// titleHolder
|
||||
'system_name',
|
||||
// tableName
|
||||
'#__componentbuilder_joomla_component',
|
||||
// textPrefix
|
||||
'COM_COMPONENTBUILDER'
|
||||
);
|
||||
}
|
||||
|
||||
// do any updates needed
|
||||
@ -3229,7 +3210,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 4.0.0-rc1 Was Successful! Let us know if anything is not working as expected.</h3></div>';
|
||||
<h3>Upgrade to Version 4.0.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();
|
||||
@ -4033,22 +4014,6 @@ class Com_ComponentbuilderInstallerScript implements InstallerScriptInterface
|
||||
// textPrefix
|
||||
'COM_COMPONENTBUILDER'
|
||||
);
|
||||
|
||||
// Add/Update Joomla_component in the action logs config table.
|
||||
$this->setActionLogConfig(
|
||||
// typeTitle
|
||||
'JOOMLA_COMPONENT',
|
||||
// typeAlias
|
||||
'com_componentbuilder.joomla_component',
|
||||
// idHolder
|
||||
'id',
|
||||
// titleHolder
|
||||
'system_name',
|
||||
// tableName
|
||||
'#__componentbuilder_joomla_component',
|
||||
// textPrefix
|
||||
'COM_COMPONENTBUILDER'
|
||||
);
|
||||
}
|
||||
|
||||
// move CLI files
|
||||
|
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 (4.0.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 (4.0.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,13 +144,13 @@ 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*: 27th April, 2024
|
||||
+ *Version*: 4.0.0-rc1
|
||||
+ *Last Build*: 30th April, 2024
|
||||
+ *Version*: 4.0.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*: **746056**
|
||||
+ *Line count*: **745929**
|
||||
+ *Field count*: **2097**
|
||||
+ *File count*: **5293**
|
||||
+ *File count*: **5288**
|
||||
+ *Folder count*: **528**
|
||||
|
||||
> This **component** was build with a [Joomla](https://extensions.joomla.org/extension/component-builder/) [Automated Component Builder](https://www.joomlacomponentbuilder.com).
|
||||
|
@ -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 (4.0.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 (4.0.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,13 +144,13 @@ 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*: 27th April, 2024
|
||||
+ *Version*: 4.0.0-rc1
|
||||
+ *Last Build*: 30th April, 2024
|
||||
+ *Version*: 4.0.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*: **746056**
|
||||
+ *Line count*: **745929**
|
||||
+ *Field count*: **2097**
|
||||
+ *File count*: **5293**
|
||||
+ *File count*: **5288**
|
||||
+ *Folder count*: **528**
|
||||
|
||||
> This **component** was build with a [Joomla](https://extensions.joomla.org/extension/component-builder/) [Automated Component Builder](https://www.joomlacomponentbuilder.com).
|
||||
|
@ -8100,7 +8100,6 @@ COM_COMPONENTBUILDER_SERVER_HOST_HINT="yourhost.com"
|
||||
COM_COMPONENTBUILDER_SERVER_HOST_LABEL="Host/IP<br /><small>(encrypted field)</small>"
|
||||
COM_COMPONENTBUILDER_SERVER_HOST_MESSAGE="Error! Please add server host name here."
|
||||
COM_COMPONENTBUILDER_SERVER_ID="Id"
|
||||
COM_COMPONENTBUILDER_SERVER_LINKED_COMPONENTS="Linked Components"
|
||||
COM_COMPONENTBUILDER_SERVER_MODIFIED_BY_DESC="The last user that modified this Server."
|
||||
COM_COMPONENTBUILDER_SERVER_MODIFIED_BY_LABEL="Modified By"
|
||||
COM_COMPONENTBUILDER_SERVER_MODIFIED_DATE_DESC="The date this Server was modified."
|
||||
|
@ -1,29 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Component.Builder
|
||||
*
|
||||
* @created 30th April, 2015
|
||||
* @author Llewellyn van der Merwe <https://dev.vdm.io>
|
||||
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
|
||||
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper;
|
||||
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
// set the defaults
|
||||
$items = $displayData->vyclinked_components;
|
||||
$user = Factory::getApplication()->getIdentity();
|
||||
$id = $displayData->item->id;
|
||||
|
||||
|
||||
?>
|
||||
<div class="form-vertical">
|
||||
oops! error.....
|
||||
</div>
|
File diff suppressed because one or more lines are too long
@ -1,2 +1 @@
|
||||
ALTER TABLE `#__componentbuilder_joomla_component` ADD `add_jcb_powers_path` TINYINT(1) NOT NULL DEFAULT 0 AFTER `add_javascript`;
|
||||
ALTER TABLE `#__componentbuilder_joomla_component` ADD `jcb_powers_path` VARCHAR(255) NOT NULL DEFAULT '' AFTER `javascript`;
|
||||
|
||||
|
@ -1,28 +0,0 @@
|
||||
CREATE TABLE IF NOT EXISTS `#__componentbuilder_joomla_power` (
|
||||
`id` INT(11) NOT NULL AUTO_INCREMENT,
|
||||
`asset_id` INT(10) unsigned NOT NULL DEFAULT 0 COMMENT 'FK to the #__assets table.',
|
||||
`description` TEXT NULL,
|
||||
`guid` VARCHAR(36) NOT NULL DEFAULT '',
|
||||
`settings` TEXT NOT NULL,
|
||||
`system_name` VARCHAR(255) NOT NULL DEFAULT '',
|
||||
`params` text NULL,
|
||||
`published` TINYINT(3) NOT NULL DEFAULT 1,
|
||||
`created_by` INT(10) unsigned NOT NULL DEFAULT 0,
|
||||
`modified_by` INT(10) unsigned NOT NULL DEFAULT 0,
|
||||
`created` DATETIME DEFAULT CURRENT_TIMESTAMP,
|
||||
`modified` DATETIME DEFAULT NULL,
|
||||
`checked_out` int(11) unsigned NOT NULL DEFAULT 0,
|
||||
`checked_out_time` DATETIME DEFAULT NULL,
|
||||
`version` INT(10) unsigned NOT NULL DEFAULT 1,
|
||||
`hits` INT(10) unsigned NOT NULL DEFAULT 0,
|
||||
`access` INT(10) unsigned NOT NULL DEFAULT 0,
|
||||
`ordering` INT(11) NOT NULL DEFAULT 0,
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `idx_system_name` (`system_name`),
|
||||
KEY `idx_guid` (`guid`),
|
||||
KEY `idx_access` (`access`),
|
||||
KEY `idx_checkout` (`checked_out`),
|
||||
KEY `idx_createdby` (`created_by`),
|
||||
KEY `idx_modifiedby` (`modified_by`),
|
||||
KEY `idx_state` (`published`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC;
|
@ -1,2 +0,0 @@
|
||||
ALTER TABLE `#__componentbuilder_joomla_component` ADD `add_php_method_install` TINYINT(1) NOT NULL DEFAULT 0 AFTER `add_php_helper_site`;
|
||||
ALTER TABLE `#__componentbuilder_joomla_component` ADD `php_method_install` MEDIUMTEXT NOT NULL AFTER `php_helper_site`;
|
@ -1,18 +0,0 @@
|
||||
UPDATE `#__componentbuilder_admin_view`
|
||||
SET `alias_builder_type` = 0
|
||||
WHERE `alias_builder_type` = '';
|
||||
|
||||
UPDATE `#__componentbuilder_dynamic_get`
|
||||
SET `addcalculation` = 0
|
||||
WHERE `addcalculation` = '';
|
||||
|
||||
ALTER TABLE `#__componentbuilder_joomla_component` CHANGE `image` `image` VARCHAR(255) NOT NULL DEFAULT '';
|
||||
ALTER TABLE `#__componentbuilder_admin_view` CHANGE `alias_builder_type` `alias_builder_type` TINYINT(1) NOT NULL DEFAULT 0;
|
||||
ALTER TABLE `#__componentbuilder_admin_view` CHANGE `icon` `icon` VARCHAR(255) NOT NULL DEFAULT '';
|
||||
ALTER TABLE `#__componentbuilder_admin_view` CHANGE `icon_add` `icon_add` VARCHAR(255) NOT NULL DEFAULT '';
|
||||
ALTER TABLE `#__componentbuilder_admin_view` CHANGE `icon_category` `icon_category` VARCHAR(255) NOT NULL DEFAULT '';
|
||||
ALTER TABLE `#__componentbuilder_custom_admin_view` CHANGE `icon` `icon` VARCHAR(255) NOT NULL DEFAULT '';
|
||||
ALTER TABLE `#__componentbuilder_dynamic_get` CHANGE `addcalculation` `addcalculation` TINYINT(1) NOT NULL DEFAULT 0;
|
||||
ALTER TABLE `#__componentbuilder_component_updates` CHANGE `version_update` `version_update` MEDIUMTEXT NOT NULL;
|
||||
ALTER TABLE `#__componentbuilder_joomla_module_updates` CHANGE `version_update` `version_update` MEDIUMTEXT NOT NULL;
|
||||
ALTER TABLE `#__componentbuilder_joomla_plugin_updates` CHANGE `version_update` `version_update` MEDIUMTEXT NOT NULL;
|
@ -1 +0,0 @@
|
||||
|
@ -64,18 +64,6 @@ defined('_JEXEC') or die;
|
||||
</div>
|
||||
<?php echo Html::_('uitab.endTab'); ?>
|
||||
|
||||
<?php if ($this->canDo->get('joomla_component.access')) : ?>
|
||||
<?php echo Html::_('uitab.addTab', 'serverTab', 'linked_components', Text::_('COM_COMPONENTBUILDER_SERVER_LINKED_COMPONENTS', true)); ?>
|
||||
<div class="row">
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<?php echo LayoutHelper::render('server.linked_components_fullwidth', $this); ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php echo Html::_('uitab.endTab'); ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php $this->ignore_fieldsets = array('details','metadata','vdmmetadata','accesscontrol'); ?>
|
||||
<?php $this->tab_name = 'serverTab'; ?>
|
||||
<?php echo LayoutHelper::render('joomla.edit.params', $this); ?>
|
||||
|
@ -1,15 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<extension type="component" version="4.0" method="upgrade">
|
||||
<name>COM_COMPONENTBUILDER</name>
|
||||
<creationDate>27th April, 2024</creationDate>
|
||||
<creationDate>30th April, 2024</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>4.0.0-rc1</version>
|
||||
<version>4.0.0-rc2</version>
|
||||
<description><![CDATA[
|
||||
<h1>Component Builder (v.4.0.0-rc1)</h1>
|
||||
<h1>Component Builder (v.4.0.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.
|
||||
|
||||
|
@ -26,7 +26,7 @@
|
||||
<version>4.0.0-alpha</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/v4.0.0-beta1.zip</downloadurl>
|
||||
<downloadurl type="full" format="zip">https://git.vdm.dev/api/v1/repos/joomla/pkg-component-builder/archive/v4.0.0-alpha8.zip</downloadurl>
|
||||
</downloads>
|
||||
<tags>
|
||||
<tag>alpha</tag>
|
||||
@ -41,79 +41,7 @@
|
||||
<element>pkg_component_builder</element>
|
||||
<type>package</type>
|
||||
<client>site</client>
|
||||
<version>4.0.0-beta1</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/v4.0.0-beta1.zip</downloadurl>
|
||||
</downloads>
|
||||
<tags>
|
||||
<tag>beta</tag>
|
||||
</tags>
|
||||
<maintainer>Llewellyn van der Merwe</maintainer>
|
||||
<maintainerurl>https://dev.vdm.io</maintainerurl>
|
||||
<targetplatform name="joomla" version="4\.[1234]"/>
|
||||
</update>
|
||||
<update>
|
||||
<name>Component Builder</name>
|
||||
<description>Builds Complex Joomla Components</description>
|
||||
<element>pkg_component_builder</element>
|
||||
<type>package</type>
|
||||
<client>site</client>
|
||||
<version>4.0.0-beta2</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/v4.0.0-beta2.zip</downloadurl>
|
||||
</downloads>
|
||||
<tags>
|
||||
<tag>beta</tag>
|
||||
</tags>
|
||||
<maintainer>Llewellyn van der Merwe</maintainer>
|
||||
<maintainerurl>https://dev.vdm.io</maintainerurl>
|
||||
<targetplatform name="joomla" version="4\.[1234]"/>
|
||||
</update>
|
||||
<update>
|
||||
<name>Component Builder</name>
|
||||
<description>Builds Complex Joomla Components</description>
|
||||
<element>pkg_component_builder</element>
|
||||
<type>package</type>
|
||||
<client>site</client>
|
||||
<version>4.0.0-beta3</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/v4.0.0-beta3.zip</downloadurl>
|
||||
</downloads>
|
||||
<tags>
|
||||
<tag>beta</tag>
|
||||
</tags>
|
||||
<maintainer>Llewellyn van der Merwe</maintainer>
|
||||
<maintainerurl>https://dev.vdm.io</maintainerurl>
|
||||
<targetplatform name="joomla" version="4\.[1234]"/>
|
||||
</update>
|
||||
<update>
|
||||
<name>Component Builder</name>
|
||||
<description>Builds Complex Joomla Components</description>
|
||||
<element>pkg_component_builder</element>
|
||||
<type>package</type>
|
||||
<client>site</client>
|
||||
<version>4.0.0-beta4</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/v4.0.0-beta4.zip</downloadurl>
|
||||
</downloads>
|
||||
<tags>
|
||||
<tag>beta</tag>
|
||||
</tags>
|
||||
<maintainer>Llewellyn van der Merwe</maintainer>
|
||||
<maintainerurl>https://dev.vdm.io</maintainerurl>
|
||||
<targetplatform name="joomla" version="4\.[1234]"/>
|
||||
</update>
|
||||
<update>
|
||||
<name>Component Builder</name>
|
||||
<description>Builds Complex Joomla Components</description>
|
||||
<element>pkg_component_builder</element>
|
||||
<type>package</type>
|
||||
<client>site</client>
|
||||
<version>4.0.0-beta5</version>
|
||||
<version>4.0.0-beta</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/v4.0.0-beta5.zip</downloadurl>
|
||||
@ -131,10 +59,10 @@
|
||||
<element>pkg_component_builder</element>
|
||||
<type>package</type>
|
||||
<client>site</client>
|
||||
<version>4.0.0-rc1</version>
|
||||
<version>4.0.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/v4.0.0-rc1.zip</downloadurl>
|
||||
<downloadurl type="full" format="zip">https://git.vdm.dev/api/v1/repos/joomla/pkg-component-builder/archive/v4.0.0-rc2.zip</downloadurl>
|
||||
</downloads>
|
||||
<tags>
|
||||
<tag>releasecandidate</tag>
|
||||
|
@ -12,6 +12,7 @@
|
||||
namespace VDM\Joomla\Componentbuilder\Compiler\JoomlaPower;
|
||||
|
||||
|
||||
use VDM\Joomla\Utilities\JsonHelper;
|
||||
use VDM\Joomla\Componentbuilder\Compiler\Interfaces\Power\ExtractorInterface;
|
||||
use VDM\Joomla\Componentbuilder\Compiler\Power\Extractor as ExtendingExtractor;
|
||||
|
||||
|
@ -121,7 +121,8 @@ class Utilities implements ServiceProviderInterface
|
||||
public function getFileInjector(Container $container): FileInjector
|
||||
{
|
||||
return new FileInjector(
|
||||
$container->get('Power.Injector')
|
||||
$container->get('Power.Injector'),
|
||||
$container->get('Joomla.Power.Injector')
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -13,6 +13,7 @@ namespace VDM\Joomla\Componentbuilder\Compiler\Utilities;
|
||||
|
||||
|
||||
use VDM\Joomla\Componentbuilder\Compiler\Power\Injector as Power;
|
||||
use VDM\Joomla\Componentbuilder\Compiler\JoomlaPower\Injector as JoomlaPower;
|
||||
use VDM\Joomla\Utilities\MathHelper;
|
||||
|
||||
|
||||
@ -33,23 +34,41 @@ final class FileInjector
|
||||
protected Power $power;
|
||||
|
||||
/**
|
||||
* The pattern to get the powers
|
||||
* The Joomla Injector Class.
|
||||
*
|
||||
* @var JoomlaPower
|
||||
* @since 3.2.1
|
||||
*/
|
||||
protected JoomlaPower $joomla;
|
||||
|
||||
/**
|
||||
* The power pattern to get the powers
|
||||
*
|
||||
* @var string
|
||||
* @since 3.2.0
|
||||
**/
|
||||
protected string $pattern = '/Super_'.'_'.'_[a-zA-Z0-9_]+_'.'_'.'_Power/';
|
||||
protected string $powerPattern = '/Super_'.'_'.'_[a-zA-Z0-9_]+_'.'_'.'_Power/';
|
||||
|
||||
/**
|
||||
* The Joomla power pattern to get the powers
|
||||
*
|
||||
* @var string
|
||||
* @since 3.2.1
|
||||
**/
|
||||
protected string $joomlaPattern = '/Joomla_'.'_'.'_[a-zA-Z0-9_]+_'.'_'.'_Power/';
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param Power $power The Injector Class.
|
||||
* @param Power $power The Injector Class.
|
||||
* @param JoomlaPower $joomla The Joomla Injector Class.
|
||||
*
|
||||
* @since 3.2.0
|
||||
* @since 3.2.1
|
||||
*/
|
||||
public function __construct(Power $power)
|
||||
public function __construct(Power $power, JoomlaPower $joomla)
|
||||
{
|
||||
$this->power = $power;
|
||||
$this->joomla = $joomla;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -72,7 +91,9 @@ final class FileInjector
|
||||
throw new \InvalidArgumentException('Position cannot be negative.');
|
||||
}
|
||||
|
||||
$found_super_powers = preg_match($this->pattern, $data);
|
||||
$found_joomla_powers = preg_match($this->joomlaPattern, $data);
|
||||
$found_super_powers = preg_match($this->powerPattern, $data);
|
||||
|
||||
$actual_file = $this->openFileWithLock($file);
|
||||
|
||||
try
|
||||
@ -85,6 +106,11 @@ final class FileInjector
|
||||
|
||||
$this->processFile($actual_file, $temp_file, $data, $position, $replace);
|
||||
|
||||
if ($found_joomla_powers)
|
||||
{
|
||||
$this->injectJoomlaPowers($actual_file);
|
||||
}
|
||||
|
||||
if ($found_super_powers)
|
||||
{
|
||||
$this->injectSuperPowers($actual_file);
|
||||
@ -209,5 +235,27 @@ final class FileInjector
|
||||
|
||||
fwrite($actual_file, $power_data);
|
||||
}
|
||||
|
||||
/**
|
||||
* Injects Joomla powers into the file content, if found, and updates the file.
|
||||
*
|
||||
* @param resource $actual_file The file handle of the actual file.
|
||||
*
|
||||
* @return void
|
||||
* @since 3.2.1
|
||||
*/
|
||||
private function injectJoomlaPowers($actual_file): void
|
||||
{
|
||||
rewind($actual_file);
|
||||
|
||||
$power_data = $this->joomla->power(
|
||||
stream_get_contents($actual_file)
|
||||
);
|
||||
|
||||
ftruncate($actual_file, 0);
|
||||
rewind($actual_file);
|
||||
|
||||
fwrite($actual_file, $power_data);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -9,11 +9,11 @@
|
||||
*/
|
||||
|
||||
// Some Global Values
|
||||
jform_vvvvwcovyd_required = false;
|
||||
jform_vvvvwcpvye_required = false;
|
||||
jform_vvvvwcqvyf_required = false;
|
||||
jform_vvvvwcrvyg_required = false;
|
||||
jform_vvvvwctvyh_required = false;
|
||||
jform_vvvvwcovyc_required = false;
|
||||
jform_vvvvwcpvyd_required = false;
|
||||
jform_vvvvwcqvye_required = false;
|
||||
jform_vvvvwcrvyf_required = false;
|
||||
jform_vvvvwctvyg_required = false;
|
||||
|
||||
// Initial Script
|
||||
document.addEventListener('DOMContentLoaded', function()
|
||||
@ -45,26 +45,26 @@ function vvvvwco(location_vvvvwco)
|
||||
{
|
||||
jQuery('#jform_admin_view').closest('.control-group').show();
|
||||
// add required attribute to admin_view field
|
||||
if (jform_vvvvwcovyd_required)
|
||||
if (jform_vvvvwcovyc_required)
|
||||
{
|
||||
updateFieldRequired('admin_view',0);
|
||||
jQuery('#jform_admin_view').prop('required','required');
|
||||
jQuery('#jform_admin_view').attr('aria-required',true);
|
||||
jQuery('#jform_admin_view').addClass('required');
|
||||
jform_vvvvwcovyd_required = false;
|
||||
jform_vvvvwcovyc_required = false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
jQuery('#jform_admin_view').closest('.control-group').hide();
|
||||
// remove required attribute from admin_view field
|
||||
if (!jform_vvvvwcovyd_required)
|
||||
if (!jform_vvvvwcovyc_required)
|
||||
{
|
||||
updateFieldRequired('admin_view',1);
|
||||
jQuery('#jform_admin_view').removeAttr('required');
|
||||
jQuery('#jform_admin_view').removeAttr('aria-required');
|
||||
jQuery('#jform_admin_view').removeClass('required');
|
||||
jform_vvvvwcovyd_required = true;
|
||||
jform_vvvvwcovyc_required = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -77,26 +77,26 @@ function vvvvwcp(location_vvvvwcp)
|
||||
{
|
||||
jQuery('#jform_site_view').closest('.control-group').show();
|
||||
// add required attribute to site_view field
|
||||
if (jform_vvvvwcpvye_required)
|
||||
if (jform_vvvvwcpvyd_required)
|
||||
{
|
||||
updateFieldRequired('site_view',0);
|
||||
jQuery('#jform_site_view').prop('required','required');
|
||||
jQuery('#jform_site_view').attr('aria-required',true);
|
||||
jQuery('#jform_site_view').addClass('required');
|
||||
jform_vvvvwcpvye_required = false;
|
||||
jform_vvvvwcpvyd_required = false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
jQuery('#jform_site_view').closest('.control-group').hide();
|
||||
// remove required attribute from site_view field
|
||||
if (!jform_vvvvwcpvye_required)
|
||||
if (!jform_vvvvwcpvyd_required)
|
||||
{
|
||||
updateFieldRequired('site_view',1);
|
||||
jQuery('#jform_site_view').removeAttr('required');
|
||||
jQuery('#jform_site_view').removeAttr('aria-required');
|
||||
jQuery('#jform_site_view').removeClass('required');
|
||||
jform_vvvvwcpvye_required = true;
|
||||
jform_vvvvwcpvyd_required = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -122,26 +122,26 @@ function vvvvwcq(type_vvvvwcq)
|
||||
{
|
||||
jQuery('#jform_url').closest('.control-group').show();
|
||||
// add required attribute to url field
|
||||
if (jform_vvvvwcqvyf_required)
|
||||
if (jform_vvvvwcqvye_required)
|
||||
{
|
||||
updateFieldRequired('url',0);
|
||||
jQuery('#jform_url').prop('required','required');
|
||||
jQuery('#jform_url').attr('aria-required',true);
|
||||
jQuery('#jform_url').addClass('required');
|
||||
jform_vvvvwcqvyf_required = false;
|
||||
jform_vvvvwcqvye_required = false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
jQuery('#jform_url').closest('.control-group').hide();
|
||||
// remove required attribute from url field
|
||||
if (!jform_vvvvwcqvyf_required)
|
||||
if (!jform_vvvvwcqvye_required)
|
||||
{
|
||||
updateFieldRequired('url',1);
|
||||
jQuery('#jform_url').removeAttr('required');
|
||||
jQuery('#jform_url').removeAttr('aria-required');
|
||||
jQuery('#jform_url').removeClass('required');
|
||||
jform_vvvvwcqvyf_required = true;
|
||||
jform_vvvvwcqvye_required = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -178,26 +178,26 @@ function vvvvwcr(type_vvvvwcr)
|
||||
{
|
||||
jQuery('#jform_article').closest('.control-group').show();
|
||||
// add required attribute to article field
|
||||
if (jform_vvvvwcrvyg_required)
|
||||
if (jform_vvvvwcrvyf_required)
|
||||
{
|
||||
updateFieldRequired('article',0);
|
||||
jQuery('#jform_article').prop('required','required');
|
||||
jQuery('#jform_article').attr('aria-required',true);
|
||||
jQuery('#jform_article').addClass('required');
|
||||
jform_vvvvwcrvyg_required = false;
|
||||
jform_vvvvwcrvyf_required = false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
jQuery('#jform_article').closest('.control-group').hide();
|
||||
// remove required attribute from article field
|
||||
if (!jform_vvvvwcrvyg_required)
|
||||
if (!jform_vvvvwcrvyf_required)
|
||||
{
|
||||
updateFieldRequired('article',1);
|
||||
jQuery('#jform_article').removeAttr('required');
|
||||
jQuery('#jform_article').removeAttr('aria-required');
|
||||
jQuery('#jform_article').removeClass('required');
|
||||
jform_vvvvwcrvyg_required = true;
|
||||
jform_vvvvwcrvyf_required = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -259,26 +259,26 @@ function vvvvwct(target_vvvvwct)
|
||||
{
|
||||
jQuery('#jform_groups').closest('.control-group').show();
|
||||
// add required attribute to groups field
|
||||
if (jform_vvvvwctvyh_required)
|
||||
if (jform_vvvvwctvyg_required)
|
||||
{
|
||||
updateFieldRequired('groups',0);
|
||||
jQuery('#jform_groups').prop('required','required');
|
||||
jQuery('#jform_groups').attr('aria-required',true);
|
||||
jQuery('#jform_groups').addClass('required');
|
||||
jform_vvvvwctvyh_required = false;
|
||||
jform_vvvvwctvyg_required = false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
jQuery('#jform_groups').closest('.control-group').hide();
|
||||
// remove required attribute from groups field
|
||||
if (!jform_vvvvwctvyh_required)
|
||||
if (!jform_vvvvwctvyg_required)
|
||||
{
|
||||
updateFieldRequired('groups',1);
|
||||
jQuery('#jform_groups').removeAttr('required');
|
||||
jQuery('#jform_groups').removeAttr('aria-required');
|
||||
jQuery('#jform_groups').removeClass('required');
|
||||
jform_vvvvwctvyh_required = true;
|
||||
jform_vvvvwctvyg_required = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user