Replace Hook with EventDispatcher in Feature class

This commit is contained in:
Art4 2025-01-29 08:37:03 +00:00 committed by Hypolite Petovan
parent 673fc71c21
commit d9a2d676d2
4 changed files with 13 additions and 4 deletions

View file

@ -7,7 +7,6 @@
namespace Friendica\Content;
use Friendica\Core\Hook;
use Friendica\DI;
use Friendica\Event\ArrayFilterEvent;
@ -95,8 +94,9 @@ class Feature
*/
public static function get($filtered = true)
{
$l10n = DI::l10n();
$config = DI::config();
$l10n = DI::l10n();
$config = DI::config();
$eventDispatcher = DI::eventDispatcher();
$arr = [
// General
@ -170,7 +170,10 @@ class Feature
}
}
Hook::callAll('get', $arr);
$arr = $eventDispatcher->dispatch(
new ArrayFilterEvent(ArrayFilterEvent::FEATURE_GET, $arr)
)->getArray();
return $arr;
}
}