User tests: Successful: Unsuccessful:
BaseDatabaseModel
uses Model\AfterCleanCacheEvent
event class to dispatch default onContentCleanCache
event.
But this event class is not registered for this event name.
Hence, old-style (legacy) dispatching like:
$options = array(
'defaultgroup' => 'com_plugins',
'cachebase' => $jconf->get('cache_path', JPATH_SITE . '/cache')
);
$app->triggerEvent('onContentCleanCache', $options);
will use default Event
class, while for consistency, we should have Model\AfterCleanCacheEvent
class.
Register own listener for onContentCleanCache
event using Model\AfterCleanCacheEvent
param class:
public function onContentCleanCache(Model\AfterCleanCacheEvent $event)
Execute old-style event dispatch without event instance like above.
See invalid param type error, $event
is instance of Event
class.
No errors, the $event
is instance of Model\AfterCleanCacheEvent
.
Please select:
Status | New | ⇒ | Pending |
Category | ⇒ | Libraries |
Title |
|