forked from GNUsocial/gnu-social
[Favourite] Add backend support for favourite
This commit is contained in:
@@ -30,6 +30,8 @@
|
||||
|
||||
namespace App\Twig;
|
||||
|
||||
use App\Core\Event;
|
||||
use App\Entity\Note;
|
||||
use App\Util\Formatting;
|
||||
use Functional as F;
|
||||
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
|
||||
@@ -56,6 +58,13 @@ class Runtime implements RuntimeExtensionInterface, EventSubscriberInterface
|
||||
return F\some($routes, F\partial_left([Formatting::class, 'startsWith'], $current_route)) ? $class : '';
|
||||
}
|
||||
|
||||
public function getNoteActions(Note $note)
|
||||
{
|
||||
$actions = [];
|
||||
Event::handle('add_note_actions', [$this->request, $note, &$actions]);
|
||||
return $actions;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------
|
||||
|
||||
// Request is not a service, can't find a better way to get it
|
||||
|
||||
Reference in New Issue
Block a user