mirror of
https://git.sekbaer.de/Friendica/friendica.git
synced 2025-06-08 00:04:27 +02:00
Add ArrayFilterEvent, replace app_menu hook
This commit is contained in:
parent
5b28b3d28f
commit
715248d6a2
5 changed files with 158 additions and 8 deletions
39
src/Event/ArrayFilterEvent.php
Normal file
39
src/Event/ArrayFilterEvent.php
Normal file
|
@ -0,0 +1,39 @@
|
|||
<?php
|
||||
|
||||
// Copyright (C) 2010-2024, the Friendica project
|
||||
// SPDX-FileCopyrightText: 2010-2024 the Friendica project
|
||||
//
|
||||
// SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Friendica\Event;
|
||||
|
||||
/**
|
||||
* Allow Event listener to modify an array.
|
||||
*
|
||||
* @internal
|
||||
*/
|
||||
final class ArrayFilterEvent extends Event
|
||||
{
|
||||
public const APP_MENU = 'friendica.data.app_menu';
|
||||
|
||||
private array $array;
|
||||
|
||||
public function __construct(string $name, array $array)
|
||||
{
|
||||
parent::__construct($name);
|
||||
|
||||
$this->array = $array;
|
||||
}
|
||||
|
||||
public function getArray(): array
|
||||
{
|
||||
return $this->array;
|
||||
}
|
||||
|
||||
public function setArray(array $array): void
|
||||
{
|
||||
$this->array = $array;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue