getParsedBody()->id ?? null; $targetList = $request->getParsedBody()->targetList ?? null; if (!$id || !is_array($targetList)) { throw new BadRequest(); } $this->getMassEmailService()->processTest($id, $targetList); return true; } /** * @return stdClass[] * @throws Forbidden */ public function getActionSmtpAccountDataList(): array { if ( !$this->acl->checkScope(MassEmailEntity::ENTITY_TYPE, Table::ACTION_CREATE) && !$this->acl->checkScope(MassEmailEntity::ENTITY_TYPE, Table::ACTION_EDIT) ) { throw new Forbidden(); } return $this->getMassEmailService()->getSmtpAccountDataList(); } private function getMassEmailService(): Service { return $this->injectableFactory->create(Service::class); } }