public function render()
    {
        $out = [];
        $optionInfo = [];

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

        if ($this->description) {
            $out['description'] = $this->description;
        }

        if ($this->footer) {
            $out['footer'] = $this->footer;
        }

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

        $out['openUrlAction'] = [
            'url' => $this->openUrlAction,
        ];

        return $out;
    }
public function render()
    {
        $out = [];
        $optionInfo = [];

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

        if ($this->description) {
            $out['description'] = $this->description;
        }

        if ($this->footer) {
            $out['footer'] = $this->footer;
        }

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

        $out['openUrlAction'] = [
            'url' => $this->openUrlAction,
        ];

        return $out;
    }
public function render ( ) { $ out = [ ] ; $ optionInfo = [ ] ; if ( $ this -> title ) { $ out [ 'title' ] = $ this -> title ; } if ( $ this -> description ) { $ out [ 'description' ] = $ this -> description ; } if ( $ this -> footer ) { $ out [ 'footer' ] = $ this -> footer ; } if ( $ this -> imageUrl ) { $ out [ 'image' ] = [ 'url' => $ this -> imageUrl , 'accessibilityText' => ( $ this -> accessibilityText ) ? $ this -> accessibilityText : 'accessibility text' , ] ; } $ out [ 'openUrlAction' ] = [ 'url' => $ this -> openUrlAction , ] ; return $ out ; }
Render response as array.

@return array
Render response as array .