mirror of
https://git.sekbaer.de/Friendica/friendica.git
synced 2025-06-12 01:54:26 +02:00
Replace Hook with EventDispatcher in Feature class
This commit is contained in:
parent
673fc71c21
commit
d9a2d676d2
4 changed files with 13 additions and 4 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue