mirror of
https://github.com/Sylius/Sylius.git
synced 2026-07-14 09:02:12 +00:00
Fix all the rest of event dispatcher calls
This commit is contained in:
parent
a32efb3af0
commit
beb414255c
10 changed files with 16 additions and 16 deletions
|
|
@ -49,8 +49,8 @@ final class CustomerShowMenuBuilder
|
|||
$this->addChildren($menu, $customer);
|
||||
|
||||
$this->eventDispatcher->dispatch(
|
||||
self::EVENT_NAME,
|
||||
new CustomerShowMenuBuilderEvent($this->factory, $menu, $customer)
|
||||
new CustomerShowMenuBuilderEvent($this->factory, $menu, $customer),
|
||||
self::EVENT_NAME
|
||||
);
|
||||
|
||||
return $menu;
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ final class MainMenuBuilder
|
|||
$this->addMarketingSubMenu($menu);
|
||||
$this->addConfigurationSubMenu($menu);
|
||||
|
||||
$this->eventDispatcher->dispatch(self::EVENT_NAME, new MenuBuilderEvent($this->factory, $menu));
|
||||
$this->eventDispatcher->dispatch(new MenuBuilderEvent($this->factory, $menu), self::EVENT_NAME);
|
||||
|
||||
return $menu;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -88,8 +88,8 @@ final class OrderShowMenuBuilder
|
|||
}
|
||||
|
||||
$this->eventDispatcher->dispatch(
|
||||
self::EVENT_NAME,
|
||||
new OrderShowMenuBuilderEvent($this->factory, $menu, $order, $stateMachine)
|
||||
new OrderShowMenuBuilderEvent($this->factory, $menu, $order, $stateMachine),
|
||||
self::EVENT_NAME
|
||||
);
|
||||
|
||||
return $menu;
|
||||
|
|
|
|||
|
|
@ -83,8 +83,8 @@ final class ProductFormMenuBuilder
|
|||
}
|
||||
|
||||
$this->eventDispatcher->dispatch(
|
||||
self::EVENT_NAME,
|
||||
new ProductMenuBuilderEvent($this->factory, $menu, $options['product'])
|
||||
new ProductMenuBuilderEvent($this->factory, $menu, $options['product']),
|
||||
self::EVENT_NAME
|
||||
);
|
||||
|
||||
return $menu;
|
||||
|
|
|
|||
|
|
@ -89,8 +89,8 @@ final class ProductUpdateMenuBuilder
|
|||
$menu->addChild($manageVariantsItem);
|
||||
|
||||
$this->eventDispatcher->dispatch(
|
||||
self::EVENT_NAME,
|
||||
new ProductMenuBuilderEvent($this->factory, $menu, $product)
|
||||
new ProductMenuBuilderEvent($this->factory, $menu, $product),
|
||||
self::EVENT_NAME
|
||||
);
|
||||
|
||||
return $menu;
|
||||
|
|
|
|||
|
|
@ -63,8 +63,8 @@ final class ProductVariantFormMenuBuilder
|
|||
;
|
||||
|
||||
$this->eventDispatcher->dispatch(
|
||||
self::EVENT_NAME,
|
||||
new ProductVariantMenuBuilderEvent($this->factory, $menu, $options['product_variant'])
|
||||
new ProductVariantMenuBuilderEvent($this->factory, $menu, $options['product_variant']),
|
||||
self::EVENT_NAME
|
||||
);
|
||||
|
||||
return $menu;
|
||||
|
|
|
|||
|
|
@ -46,8 +46,8 @@ final class PromotionUpdateMenuBuilder
|
|||
|
||||
$this->addChildren($menu, $promotion);
|
||||
$this->eventDispatcher->dispatch(
|
||||
self::EVENT_NAME,
|
||||
new PromotionMenuBuilderEvent($this->factory, $menu, $promotion)
|
||||
new PromotionMenuBuilderEvent($this->factory, $menu, $promotion),
|
||||
self::EVENT_NAME
|
||||
);
|
||||
|
||||
return $menu;
|
||||
|
|
|
|||
|
|
@ -48,6 +48,6 @@ final class UserImpersonator implements UserImpersonatorInterface
|
|||
$this->session->set($this->sessionTokenParameter, serialize($token));
|
||||
$this->session->save();
|
||||
|
||||
$this->eventDispatcher->dispatch(UserEvents::SECURITY_IMPERSONATE, new UserEvent($user));
|
||||
$this->eventDispatcher->dispatch(new UserEvent($user), UserEvents::SECURITY_IMPERSONATE);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -100,7 +100,7 @@ class OrderController extends ResourceController
|
|||
|
||||
$this->eventDispatcher->dispatchPostEvent(ResourceActions::UPDATE, $configuration, $resource);
|
||||
|
||||
$this->getEventDispatcher()->dispatch(SyliusCartEvents::CART_CHANGE, new GenericEvent($resource));
|
||||
$this->getEventDispatcher()->dispatch(new GenericEvent($resource), SyliusCartEvents::CART_CHANGE);
|
||||
$this->manager->flush();
|
||||
|
||||
if (!$configuration->isHtmlRequest()) {
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ final class AccountMenuBuilder
|
|||
->setLabelAttribute('icon', 'cart')
|
||||
;
|
||||
|
||||
$this->eventDispatcher->dispatch(self::EVENT_NAME, new MenuBuilderEvent($this->factory, $menu));
|
||||
$this->eventDispatcher->dispatch(new MenuBuilderEvent($this->factory, $menu), self::EVENT_NAME);
|
||||
|
||||
return $menu;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue