dispatcher = $dispatcher; } public function postInsert(ConnectionInterface $con = null) { if ($this->dispatcher) { $cartEvent = new CartEvent($this->getCart()); $this->dispatcher->dispatch(TheliaEvents::CART_ADDITEM, $cartEvent); } } }