File tree Expand file tree Collapse file tree 4 files changed +21
-13
lines changed
libraries/src/Application Expand file tree Collapse file tree 4 files changed +21
-13
lines changed Original file line number Diff line number Diff line change @@ -355,14 +355,10 @@ public function execute()
355355
356356 PluginHelper::importPlugin ('system ' );
357357
358- // Trigger the onBeforeExecute event.
359- $ this ->triggerEvent (
358+ // Trigger the onBeforeExecute event
359+ $ this ->getDispatcher ()-> dispatch (
360360 'onBeforeExecute ' ,
361- [
362- 'subject ' => $ this ,
363- 'eventClass ' => BeforeExecuteEvent::class,
364- 'container ' => $ this ->getContainer ()
365- ]
361+ new BeforeExecuteEvent ('onBeforeExecute ' , ['subject ' => $ this , 'container ' => $ this ->getContainer ()])
366362 );
367363
368364 // Mark beforeExecute in the profiler.
Original file line number Diff line number Diff line change 1414use Joomla \CMS \Application \CLI \CliInput ;
1515use Joomla \CMS \Application \CLI \CliOutput ;
1616use Joomla \CMS \Application \CLI \Output \Stdout ;
17+ use Joomla \CMS \Event \BeforeExecuteEvent ;
1718use Joomla \CMS \Extension \ExtensionManagerTrait ;
1819use Joomla \Input \Cli ;
1920use Joomla \Input \Input ;
@@ -145,8 +146,11 @@ public static function getInstance($name = null)
145146 */
146147 public function execute ()
147148 {
148- // Trigger the onBeforeExecute event.
149- $ this ->triggerEvent ('onBeforeExecute ' );
149+ // Trigger the onBeforeExecute event
150+ $ this ->getDispatcher ()->dispatch (
151+ 'onBeforeExecute ' ,
152+ new BeforeExecuteEvent ('onBeforeExecute ' , ['subject ' => $ this , 'container ' => $ this ->getContainer ()])
153+ );
150154
151155 // Perform application routines.
152156 $ this ->doExecute ();
Original file line number Diff line number Diff line change 1212
1313jimport ('joomla.filesystem.folder ' );
1414
15+ use Joomla \CMS \Event \BeforeExecuteEvent ;
1516use Joomla \Event \DispatcherInterface ;
1617use Joomla \Registry \Registry ;
1718
@@ -362,8 +363,11 @@ public function loadConfiguration($data)
362363 */
363364 public function execute ()
364365 {
365- // Trigger the onBeforeExecute event.
366- $ this ->triggerEvent ('onBeforeExecute ' );
366+ // Trigger the onBeforeExecute event
367+ $ this ->getDispatcher ()->dispatch (
368+ 'onBeforeExecute ' ,
369+ new BeforeExecuteEvent ('onBeforeExecute ' , ['subject ' => $ this , 'container ' => $ this ->getContainer ()])
370+ );
367371
368372 // Enable basic garbage collection.
369373 gc_enable ();
Original file line number Diff line number Diff line change 1313use Joomla \Application \AbstractWebApplication ;
1414use Joomla \Application \Web \WebClient ;
1515use Joomla \CMS \Document \Document ;
16+ use Joomla \CMS \Event \BeforeExecuteEvent ;
1617use Joomla \CMS \Input \Input ;
1718use Joomla \CMS \Language \Language ;
1819use Joomla \CMS \User \User ;
@@ -128,8 +129,11 @@ public static function getInstance($name = null)
128129 */
129130 public function execute ()
130131 {
131- // Trigger the onBeforeExecute event.
132- $ this ->triggerEvent ('onBeforeExecute ' );
132+ // Trigger the onBeforeExecute event
133+ $ this ->getDispatcher ()->dispatch (
134+ 'onBeforeExecute ' ,
135+ new BeforeExecuteEvent ('onBeforeExecute ' , ['subject ' => $ this , 'container ' => $ this ->getContainer ()])
136+ );
133137
134138 // Perform application routines.
135139 $ this ->doExecute ();
You can’t perform that action at this time.
0 commit comments