getRecordService()->getEntity($data['id']); if (!$entity) { throw new NotFound(); } if (!$this->getAcl()->check($entity, 'edit')) { throw new Forbidden(); } return $this->getRecordService()->sendInvitations($entity); } }