Exponential 5.x Kernel 7.5.40 Exponential New Stack (Symfony-based) Kernel — PHP Class Reference

SymfonyEventConverterSlot.php
Go to the documentation of this file.
1 <?php
2
7 namespace eZ\Bundle\EzPublishCoreBundle\SignalSlot\Slot;
8
9 use eZ\Publish\Core\MVC\Symfony\Event\SignalEvent;
10 use eZ\Publish\Core\MVC\Symfony\MVCEvents;
11 use eZ\Publish\Core\SignalSlot\Signal;
12 use eZ\Publish\Core\SignalSlot\Slot;
13 use Symfony\Component\EventDispatcher\EventDispatcherInterface;
14
18 class SymfonyEventConverterSlot extends Slot
19 {
21 private $eventDispatcher;
22
23 public function __construct(EventDispatcherInterface $eventDispatcher)
24 {
25 $this->eventDispatcher = $eventDispatcher;
26 }
27
33 public function receive(Signal $signal)
34 {
35 $this->eventDispatcher->dispatch(MVCEvents::API_SIGNAL, new SignalEvent($signal));
36 }
37 }
eZ\Bundle\EzPublishCoreBundle\SignalSlot\Slot\SymfonyEventConverterSlot
Generic slot that converts signals emitted by Repository services into Symfony events.
Definition: SymfonyEventConverterSlot.php:19
eZ\Bundle\EzPublishCoreBundle\SignalSlot\Slot\SymfonyEventConverterSlot\__construct
__construct(EventDispatcherInterface $eventDispatcher)
Definition: SymfonyEventConverterSlot.php:23
eZ\Bundle\EzPublishCoreBundle\SignalSlot\Slot\SymfonyEventConverterSlot\$eventDispatcher
$eventDispatcher
Definition: SymfonyEventConverterSlot.php:21
eZ\Bundle\EzPublishCoreBundle\SignalSlot\Slot\SymfonyEventConverterSlot\receive
receive(Signal $signal)
Receive the given $signal and react on it.
Definition: SymfonyEventConverterSlot.php:33
eZ\Publish\Core\MVC\Symfony\Event\SignalEvent
This event is sent whenever a Signal is emitted by SignalSlot repository services.
Definition: SignalEvent.php:17
eZ\Publish\Core\MVC\Symfony\MVCEvents
Definition: MVCEvents.php:10
eZ\Publish\Core\MVC\Symfony\MVCEvents\API_SIGNAL
const API_SIGNAL
The API_SIGNAL event occurs when the SignalSlot repository services emit a signal.
Definition: MVCEvents.php:46
eZ\Publish\Core\SignalSlot\Signal
Base class for Signals.
Definition: Signal.php:18
eZ\Publish\Core\SignalSlot\Slot
A Slot can be assigned to receive a certain Signal.
Definition: SignalSlot/Slot.php:13
eZ\Bundle\EzPublishCoreBundle\SignalSlot\Slot
Definition: SymfonyEventConverterSlot.php:7
Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.