Esempio n. 1
0
 /**
  * @param OrderStatusModel $orderStatus
  * @return OrderStatusUpdateEvent
  */
 public function getUpdateEvent(OrderStatusModel $orderStatus)
 {
     $event = new OrderStatusUpdateEvent($orderStatus->getId());
     $event->setLocale($orderStatus->getLocale())->setTitle($orderStatus->getTitle())->setChapo($orderStatus->getChapo())->setDescription($orderStatus->getDescription())->setPostscriptum($orderStatus->getPostscriptum())->setColor($orderStatus->getColor())->setCode($orderStatus->getCode());
     return $event;
 }
 /**
  * Creates the update event with the provided form data
  *
  * @param  array            $formData
  * @return OrderStatusUpdateEvent
  */
 protected function getUpdateEvent($formData)
 {
     $orderStatusUpdateEvent = new OrderStatusUpdateEvent($formData['id']);
     $orderStatusUpdateEvent->setLocale($formData['locale'])->setTitle($formData['title'])->setChapo($formData['chapo'])->setDescription($formData['description'])->setPostscriptum($formData['postscriptum'])->setCode($formData['code'])->setColor($formData['color']);
     return $orderStatusUpdateEvent;
 }