dispatchEvent(TheliaEvents::BEFORE_CREATECURRENCY, new CurrencyEvent($this)); // Set the current position for the new object $this->setPosition($this->getNextPosition()); return true; } /** * {@inheritDoc} */ public function postInsert(ConnectionInterface $con = null) { $this->dispatchEvent(TheliaEvents::AFTER_CREATECURRENCY, new CurrencyEvent($this)); } /** * {@inheritDoc} */ public function preUpdate(ConnectionInterface $con = null) { $this->dispatchEvent(TheliaEvents::BEFORE_UPDATECURRENCY, new CurrencyEvent($this)); return true; } /** * {@inheritDoc} */ public function postUpdate(ConnectionInterface $con = null) { $this->dispatchEvent(TheliaEvents::AFTER_UPDATECURRENCY, new CurrencyEvent($this)); } /** * {@inheritDoc} */ public function preDelete(ConnectionInterface $con = null) { $this->dispatchEvent(TheliaEvents::BEFORE_DELETECURRENCY, new CurrencyEvent($this)); return true; } /** * {@inheritDoc} */ public function postDelete(ConnectionInterface $con = null) { $this->dispatchEvent(TheliaEvents::AFTER_DELETECURRENCY, new CurrencyEvent($this)); } }