src/LINEBot/MessageBuilder/TemplateBuilder/ConfirmTemplateBuilder.php
public function buildTemplate()
    {
        if (!empty($this->template)) {
            return $this->template;
        }

        $actions = [];
        foreach ($this->actionBuilders as $actionBuilder) {
            $actions[] = $actionBuilder->buildTemplateAction();
        }

        $this->template = [
            'type' => TemplateType::CONFIRM,
            'text' => $this->text,
            'actions' => $actions,
        ];

        return $this->template;
    }
public function buildTemplate()
    {
        if (!empty($this->template)) {
            return $this->template;
        }

        $actions = [];
        foreach ($this->actionBuilders as $actionBuilder) {
            $actions[] = $actionBuilder->buildTemplateAction();
        }

        $this->template = [
            'type' => TemplateType::CONFIRM,
            'text' => $this->text,
            'actions' => $actions,
        ];

        return $this->template;
    }
public function buildTemplate ( ) { if ( ! empty ( $ this -> template ) ) { return $ this -> template ; } $ actions = [ ] ; foreach ( $ this -> actionBuilders as $ actionBuilder ) { $ actions [ ] = $ actionBuilder -> buildTemplateAction ( ) ; } $ this -> template = [ 'type' => TemplateType :: CONFIRM , 'text' => $ this -> text , 'actions' => $ actions , ] ; return $ this -> template ; }
Builds confirm template structure.

@return array
Builds confirm template structure .