acl_gen = $acl_gen; } public function getPrivacyPolicy($id, EntityManagerInterface $em) { $this->denyAccessUnlessGranted('privacypolicy.find', null, 'No access.'); $privacy_policy = $em->getRepository(PrivacyPolicy::class)->find($id); if ($privacy_policy == null) return new APIResponse(false, 'No privacy policy found with that number.', null, 404); $data = [ 'privacy_policy' => (string) $privacy_policy->getContent(), ]; return new APIResponse(true, 'Privacy policy found.', $data); } }