Skip to content
Snippets Groups Projects
Commit f03e66b3 authored by Groß-Vogt, Tobias's avatar Groß-Vogt, Tobias
Browse files

assure initialization of eventStack

parent 4711ceea
No related branches found
No related tags found
No related merge requests found
Pipeline #232989 passed
...@@ -11,7 +11,7 @@ use Symfony\Component\EventDispatcher\EventSubscriberInterface; ...@@ -11,7 +11,7 @@ use Symfony\Component\EventDispatcher\EventSubscriberInterface;
abstract class AbstractGetAttributeSubscriber implements EventSubscriberInterface abstract class AbstractGetAttributeSubscriber implements EventSubscriberInterface
{ {
/** @var array */ /** @var array */
private $eventStack; private $eventStack = [];
public static function getSubscribedEvents(): array public static function getSubscribedEvents(): array
{ {
...@@ -21,11 +21,6 @@ abstract class AbstractGetAttributeSubscriber implements EventSubscriberInterfac ...@@ -21,11 +21,6 @@ abstract class AbstractGetAttributeSubscriber implements EventSubscriberInterfac
]; ];
} }
public function __construct()
{
$this->eventStack = [];
}
public function onGetAvailableAttributes(GetAvailableAttributesEvent $event) public function onGetAvailableAttributes(GetAvailableAttributesEvent $event)
{ {
$event->addAttributes($this->getNewAttributes()); $event->addAttributes($this->getNewAttributes());
...@@ -34,6 +29,7 @@ abstract class AbstractGetAttributeSubscriber implements EventSubscriberInterfac ...@@ -34,6 +29,7 @@ abstract class AbstractGetAttributeSubscriber implements EventSubscriberInterfac
public function onGetAttributeEvent(GetAttributeEvent $event) public function onGetAttributeEvent(GetAttributeEvent $event)
{ {
try { try {
dump($this->getNewAttributes());
array_push($this->eventStack, $event); array_push($this->eventStack, $event);
$attributeName = $event->getAttributeName(); $attributeName = $event->getAttributeName();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment