Component Builder (v.3.2.0-beta5)
+ Component Builder (v.3.2.0-beta6)
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.
diff --git a/componentbuilder_update_server.xml b/componentbuilder_update_server.xml
index 5818eb907..e4ff629bb 100644
--- a/componentbuilder_update_server.xml
+++ b/componentbuilder_update_server.xml
@@ -1613,4 +1613,22 @@
https://dev.vdm.io
+
+ Component Builder
+ Builds Complex Joomla Components
+ pkg_component_builder
+ package
+ site
+ 3.2.0-beta6
+ https://dev.vdm.io
+
+ https://git.vdm.dev/api/v1/repos/joomla/pkg-component-builder/archive/v3.2.0-beta6.zip
+
+
+ beta
+
+ Llewellyn van der Merwe
+ https://dev.vdm.io
+
+
\ No newline at end of file
diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/JoomlaFive/Event.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/JoomlaFive/Event.php
index 245cf05d9..232fb6221 100644
--- a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/JoomlaFive/Event.php
+++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/JoomlaFive/Event.php
@@ -26,13 +26,20 @@ use VDM\Joomla\Componentbuilder\Compiler\Interfaces\EventInterface;
class Event implements EventInterface
{
/**
- * event plugin trigger switch
+ * event plug-in trigger switch
*
* @var boolean
* @since 3.2.0
*/
protected $activePlugins = false;
+ /**
+ * The application to trigger and event TODO
+ *
+ * @since 3.2.0
+ */
+ protected $dispatcher;
+
/**
* Constructor
*
@@ -60,6 +67,8 @@ class Event implements EventInterface
}
}
}
+
+ $this->dispatcher = Factory::getApplication();
}
/**
@@ -77,22 +86,14 @@ class Event implements EventInterface
// only execute if plugins were loaded (active)
if ($this->activePlugins)
{
- // Get the dispatcher.
- $dispatcher = \JEventDispatcher::getInstance();
-
- // Trigger this compiler event.
- $results = $dispatcher->trigger($event, $data);
-
- // Check for errors encountered while trigger the event
- if (count((array) $results) && in_array(false, $results, true))
+ try
{
- // Get the last error.
- $error = $dispatcher->getError();
-
- if (!($error instanceof \Exception))
- {
- throw new \Exception($error);
- }
+ // Trigger this compiler event.
+ $results = $this->dispatcher->triggerEvent($event, $data ?? []);
+ }
+ catch (\Exception $e)
+ {
+ throw new \Exception("Error processing event '$event': " . $e->getMessage());
}
}
}
diff --git a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/JoomlaFour/Event.php b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/JoomlaFour/Event.php
index d15c3292d..578f5f651 100644
--- a/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/JoomlaFour/Event.php
+++ b/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/JoomlaFour/Event.php
@@ -12,6 +12,7 @@
namespace VDM\Joomla\Componentbuilder\Compiler\JoomlaFour;
+use Joomla\CMS\Factory;
use Joomla\Registry\Registry;
use Joomla\CMS\Plugin\PluginHelper;
use VDM\Joomla\Utilities\Component\Helper;
@@ -26,13 +27,20 @@ use VDM\Joomla\Componentbuilder\Compiler\Interfaces\EventInterface;
final class Event implements EventInterface
{
/**
- * event plugin trigger switch
+ * event plug-in trigger switch
*
* @var boolean
* @since 3.2.0
*/
protected $activePlugins = false;
+ /**
+ * The application to trigger and event TODO
+ *
+ * @since 3.2.0
+ */
+ protected $dispatcher;
+
/**
* Constructor
*
@@ -60,6 +68,8 @@ final class Event implements EventInterface
}
}
}
+
+ $this->dispatcher = Factory::getApplication();
}
/**
@@ -77,22 +87,14 @@ final class Event implements EventInterface
// only execute if plugins were loaded (active)
if ($this->activePlugins)
{
- // Get the dispatcher.
- $dispatcher = \JEventDispatcher::getInstance();
-
- // Trigger this compiler event.
- $results = $dispatcher->trigger($event, $data);
-
- // Check for errors encountered while trigger the event
- if (count((array) $results) && in_array(false, $results, true))
+ try
{
- // Get the last error.
- $error = $dispatcher->getError();
-
- if (!($error instanceof \Exception))
- {
- throw new \Exception($error);
- }
+ // Trigger this compiler event.
+ $results = $this->dispatcher->triggerEvent($event, $data ?? []);
+ }
+ catch (\Exception $e)
+ {
+ throw new \Exception("Error processing event '$event': " . $e->getMessage());
}
}
}
diff --git a/script.php b/script.php
index 994e52e31..a1eb2f85a 100644
--- a/script.php
+++ b/script.php
@@ -9618,7 +9618,7 @@ class Com_ComponentbuilderInstallerScript
echo '
-
Upgrade to Version 3.2.0-beta5 Was Successful! Let us know if anything is not working as expected.
';
+ Upgrade to Version 3.2.0-beta6 Was Successful! Let us know if anything is not working as expected.
';
// Set db if not set already.
if (!isset($db))