Beispiel #1
0
 /**
  * @param Tax $tax
  *
  * @return JsonResponse
  */
 public function getAction(Tax $tax)
 {
     $result = array('id' => $tax->getId(), 'name' => $tax->getName(), 'type' => $tax->getType(), 'rate' => $tax->getRate());
     return new JsonResponse($result);
 }
Beispiel #2
0
 /**
  * @param Tax $tax
  *
  * @return JsonResponse
  */
 public function getAction(Tax $tax)
 {
     $result = ['id' => $tax->getId(), 'name' => $tax->getName(), 'type' => $tax->getType(), 'rate' => $tax->getRate()];
     return $this->json($result);
 }