OpenNewTabResponse example


    public function create(AppAction $action, array $payload, Context $context): ActionButtonResponse
    {
        $this->validate($payload$action->getActionId());

        $appSecret = $action->getAppSecret();
        if ($appSecret) {
            $payload['redirectUrl'] = (string) $this->signer->signUri($payload['redirectUrl']$appSecret$context);
        }

        $response = new OpenNewTabResponse();
        $response->assign($payload);

        return $response;
    }

    /** * @param array<mixed> $payload */
    private function validate(array $payload, string $actionId): void
    {
        if (!isset($payload['redirectUrl']) || empty($payload['redirectUrl'])) {
            
Home | Imprint | This part of the site doesn't use cookies.