src/Action/Responses/BasicCard.php
public function renderRichResponseItem()
    {
        $out = [];
        $basicCard = [];

        if ($this->title) {
            $basicCard['title'] = $this->title;
        }

        if ($this->formattedText) {
            $basicCard['formattedText'] = $this->formattedText;
        }

        if ($this->imageUrl) {
            $basicCard['image'] = [
                'url'               => $this->imageUrl,
                'accessibilityText' => ($this->accessibilityText) ? $this->accessibilityText : 'accessibility text',
            ];
        }

        if ($this->buttons) {
            foreach ($this->buttons as $button) {
                $basicCard['buttons'][] =
                    [
                        'title'         => $button['buttonText'],
                        'openUrlAction' => [
                            'url' => $button['buttonUrl'],
                        ],
                    ];
            }
        }

        $out['basicCard'] = $basicCard;

        return $out;
    }
public function renderRichResponseItem()
    {
        $out = [];
        $basicCard = [];

        if ($this->title) {
            $basicCard['title'] = $this->title;
        }

        if ($this->formattedText) {
            $basicCard['formattedText'] = $this->formattedText;
        }

        if ($this->imageUrl) {
            $basicCard['image'] = [
                'url'               => $this->imageUrl,
                'accessibilityText' => ($this->accessibilityText) ? $this->accessibilityText : 'accessibility text',
            ];
        }

        if ($this->buttons) {
            foreach ($this->buttons as $button) {
                $basicCard['buttons'][] =
                    [
                        'title'         => $button['buttonText'],
                        'openUrlAction' => [
                            'url' => $button['buttonUrl'],
                        ],
                    ];
            }
        }

        $out['basicCard'] = $basicCard;

        return $out;
    }
Render a single Rich Response item as array.

@return null|array