Beispiel #1
0
 /**
  * Get one variant
  *
  * GET /api/variants/{id}
  */
 public function getAction()
 {
     $id = $this->Request()->getParam('id');
     $useNumberAsId = (bool) $this->Request()->getParam('useNumberAsId', 0);
     if ($useNumberAsId) {
         $articleDetail = $this->resource->getOneByNumber($id, ['considerTaxInput' => $this->Request()->getParam('considerTaxInput')]);
     } else {
         $articleDetail = $this->resource->getOne($id, ['considerTaxInput' => $this->Request()->getParam('considerTaxInput')]);
     }
     $this->View()->assign('data', $articleDetail);
     $this->View()->assign('success', true);
 }