getParsedBody(); if (empty($data->id)) { throw new BadRequest(); } $id = $data->id; if (!$this->getAcl()->checkScope('Attachment', 'create')) { throw new Forbidden(); } return $this->getDocumentService() ->getAttachmentList($id) ->getValueMapList(); } private function getDocumentService(): Service { /** @var Service */ return $this->getRecordService(); } }