/**
  * Hydrate the update form for this object, before passing it to the update template
  *
  * @param  OrderStatus                 $object
  * @return OrderStatusModificationForm $object
  */
 protected function hydrateObjectForm($object)
 {
     // Prepare the data that will hydrate the form
     $data = ['id' => $object->getId(), 'locale' => $object->getLocale(), 'title' => $object->getTitle(), 'chapo' => $object->getChapo(), 'description' => $object->getDescription(), 'postscriptum' => $object->getPostscriptum(), 'color' => $object->getColor(), 'code' => $object->getCode()];
     $form = $this->createForm(AdminForm::ORDER_STATUS_MODIFICATION, "form", $data);
     // Setup the object form
     return $form;
 }
Ejemplo n.º 2
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;
 }