diff --git a/administrator/components/com_content/src/Model/ArticleModel.php b/administrator/components/com_content/src/Model/ArticleModel.php index 1ca5cfdaa2864..29ef673fcd083 100644 --- a/administrator/components/com_content/src/Model/ArticleModel.php +++ b/administrator/components/com_content/src/Model/ArticleModel.php @@ -32,6 +32,7 @@ use Joomla\CMS\Versioning\VersionableModelTrait; use Joomla\CMS\Workflow\Workflow; use Joomla\Component\Categories\Administrator\Helper\CategoriesHelper; +use Joomla\Component\Content\Administrator\Event\Model\FeatureEvent; use Joomla\Component\Fields\Administrator\Helper\FieldsHelper; use Joomla\Database\ParameterType; use Joomla\Filter\OutputFilter; @@ -845,7 +846,7 @@ public function featured($pks, $value = 0, $featuredUp = null, $featuredDown = n AbstractEvent::create( $this->event_before_change_featured, [ - 'eventClass' => 'Joomla\Component\Content\Administrator\Event\Model\FeatureEvent', + 'eventClass' => FeatureEvent::class, 'subject' => $this, 'extension' => $context, 'pks' => $pks, @@ -950,7 +951,7 @@ public function featured($pks, $value = 0, $featuredUp = null, $featuredDown = n AbstractEvent::create( $this->event_after_change_featured, [ - 'eventClass' => 'Joomla\Component\Content\Administrator\Event\Model\FeatureEvent', + 'eventClass' => FeatureEvent::class, 'subject' => $this, 'extension' => $context, 'pks' => $pks, diff --git a/libraries/src/MVC/View/HtmlView.php b/libraries/src/MVC/View/HtmlView.php index 315fba08ca28b..0c229daab0096 100644 --- a/libraries/src/MVC/View/HtmlView.php +++ b/libraries/src/MVC/View/HtmlView.php @@ -11,6 +11,7 @@ use Joomla\CMS\Application\ApplicationHelper; use Joomla\CMS\Event\AbstractEvent; +use Joomla\CMS\Event\View\DisplayEvent; use Joomla\CMS\Factory; use Joomla\CMS\Language\Text; use Joomla\CMS\Uri\Uri; @@ -193,7 +194,7 @@ public function display($tpl = null) AbstractEvent::create( 'onBeforeDisplay', [ - 'eventClass' => 'Joomla\CMS\Event\View\DisplayEvent', + 'eventClass' => DisplayEvent::class, 'subject' => $this, 'extension' => $context, ] @@ -207,7 +208,7 @@ public function display($tpl = null) AbstractEvent::create( 'onAfterDisplay', [ - 'eventClass' => 'Joomla\CMS\Event\View\DisplayEvent', + 'eventClass' => DisplayEvent::class, 'subject' => $this, 'extension' => $context, 'source' => $result, diff --git a/libraries/src/WebAsset/WebAssetRegistry.php b/libraries/src/WebAsset/WebAssetRegistry.php index 38fc23976b436..332c406137957 100644 --- a/libraries/src/WebAsset/WebAssetRegistry.php +++ b/libraries/src/WebAsset/WebAssetRegistry.php @@ -10,6 +10,7 @@ namespace Joomla\CMS\WebAsset; use Joomla\CMS\Event\AbstractEvent; +use Joomla\CMS\Event\WebAsset\WebAssetRegistryAssetChanged; use Joomla\CMS\WebAsset\Exception\UnknownAssetException; use Joomla\Event\Dispatcher as EventDispatcher; use Joomla\Event\DispatcherAwareInterface; @@ -432,7 +433,7 @@ protected function dispatchAssetChanged(string $type, WebAssetItemInterface $ass $event = AbstractEvent::create( 'onWebAssetRegistryChangedAsset' . ucfirst($change), [ - 'eventClass' => 'Joomla\\CMS\\Event\\WebAsset\\WebAssetRegistryAssetChanged', + 'eventClass' => WebAssetRegistryAssetChanged::class, 'subject' => $this, 'assetType' => $type, 'asset' => $asset, diff --git a/libraries/src/Workflow/Workflow.php b/libraries/src/Workflow/Workflow.php index 892d2626da3af..14a8b5f3a5bd6 100644 --- a/libraries/src/Workflow/Workflow.php +++ b/libraries/src/Workflow/Workflow.php @@ -11,6 +11,7 @@ use Joomla\CMS\Application\CMSApplication; use Joomla\CMS\Event\AbstractEvent; +use Joomla\CMS\Event\Workflow\WorkflowTransitionEvent; use Joomla\CMS\Extension\ComponentInterface; use Joomla\CMS\Factory; use Joomla\CMS\Plugin\PluginHelper; @@ -400,7 +401,7 @@ public function executeTransition(array $pks, int $transitionId): bool AbstractEvent::create( 'onWorkflowAfterTransition', [ - 'eventClass' => 'Joomla\CMS\Event\Workflow\WorkflowTransitionEvent', + 'eventClass' => WorkflowTransitionEvent::class, 'subject' => $this, 'extension' => $this->extension, 'pks' => $pks,