Exemplo n.º 1
0
 /**
  * Build a new Location instance given some data
  *
  * @param array $data Data where to build from
  *
  * @return LocationData Location instance
  */
 private function buildLocation($data)
 {
     return $this->locationDataFactory->create($data['id'], $data['name'], $data['code'], $data['type']);
 }
 /**
  * Transform a Location to LocationData
  *
  * @param LocationInterface $location Location
  *
  * @return LocationData
  */
 public function transform(LocationInterface $location)
 {
     return $this->locationDataFactory->create($location->getId(), $location->getName(), $location->getCode(), $location->getType());
 }