public function onDeliveryUpdated(DeliveryUpdatedEvent $event)
    {
        $data = $event->jsonSerialize();
        $deliveryData = !empty($data['data']) ? $data['data'] : [];
        $delivery = $this->getResource($event->getDeliveryUri());
        if (isset($deliveryData[ProctorService::ACCESSIBLE_PROCTOR]) && !$deliveryData[ProctorService::ACCESSIBLE_PROCTOR]) {
            $delivery->editPropertyValues($this->getProperty(ProctorService::ACCESSIBLE_PROCTOR), ProctorService::ACCESSIBLE_PROCTOR_DISABLED);
        }
    }
public function onDeliveryUpdated(DeliveryUpdatedEvent $event)
    {
        $data = $event->jsonSerialize();
        $deliveryData = !empty($data['data']) ? $data['data'] : [];
        $delivery = $this->getResource($event->getDeliveryUri());
        if (isset($deliveryData[ProctorService::ACCESSIBLE_PROCTOR]) && !$deliveryData[ProctorService::ACCESSIBLE_PROCTOR]) {
            $delivery->editPropertyValues($this->getProperty(ProctorService::ACCESSIBLE_PROCTOR), ProctorService::ACCESSIBLE_PROCTOR_DISABLED);
        }
    }
public function onDeliveryUpdated ( DeliveryUpdatedEvent $ event ) { $ data = $ event -> jsonSerialize ( ) ; $ deliveryData = ! empty ( $ data [ 'data' ] ) ? $ data [ 'data' ] : [ ] ; $ delivery = $ this -> getResource ( $ event -> getDeliveryUri ( ) ) ; if ( isset ( $ deliveryData [ ProctorService :: ACCESSIBLE_PROCTOR ] ) && ! $ deliveryData [ ProctorService :: ACCESSIBLE_PROCTOR ] ) { $ delivery -> editPropertyValues ( $ this -> getProperty ( ProctorService :: ACCESSIBLE_PROCTOR ) , ProctorService :: ACCESSIBLE_PROCTOR_DISABLED ) ; } }
Listen update event for delivery
@param DeliveryUpdatedEvent $event
Listen update event for delivery