getAcl()->get('dataPrivacyPermission') === 'no') { throw new Forbidden(); } } public function postActionErase($params, $data) { if (empty($data->entityType) || empty($data->id) || empty($data->fieldList) || !is_array($data->fieldList)) { throw new BadRequest(); } return $this->getServiceFactory()->create('DataPrivacy')->erase($data->entityType, $data->id, $data->fieldList); } }