src/LINEBot/TemplateActionBuilder/PostbackTemplateActionBuilder.php
public function buildTemplateAction()
    {
        $action = [
            'type' => ActionType::POSTBACK,
            'label' => $this->label,
            'data' => $this->data,
        ];

        if (isset($this->displayText)) {
            // If text is set, append extend field.
            $action['displayText'] = $this->displayText;
        }

        return $action;
    }
public function buildTemplateAction()
    {
        $action = [
            'type' => ActionType::POSTBACK,
            'label' => $this->label,
            'data' => $this->data,
        ];

        if (isset($this->displayText)) {
            // If text is set, append extend field.
            $action['displayText'] = $this->displayText;
        }

        return $action;
    }
public function buildTemplateAction ( ) { $ action = [ 'type' => ActionType :: POSTBACK , 'label' => $ this -> label , 'data' => $ this -> data , ] ; if ( isset ( $ this -> displayText ) ) { // If text is set, append extend field. $ action [ 'displayText' ] = $ this -> displayText ; } return $ action ; }
Builds postback action structure.

@return array Built postback action structure.
Builds postback action structure .