src/LINEBot/MessageBuilder/Flex/ComponentBuilder/ButtonComponentBuilder.php
public function build()
    {
        if (isset($this->component)) {
            return $this->component;
        }

        $this->component = BuildUtil::removeNullElements([
            'type' => ComponentType::BUTTON,
            'action' => $this->actionBuilder->buildTemplateAction(),
            'flex' => $this->flex,
            'margin' => $this->margin,
            'height' => $this->height,
            'style' => $this->style,
            'color' => $this->color,
            'gravity' => $this->gravity,
        ]);

        return $this->component;
    }
public function build()
    {
        if (isset($this->component)) {
            return $this->component;
        }

        $this->component = BuildUtil::removeNullElements([
            'type' => ComponentType::BUTTON,
            'action' => $this->actionBuilder->buildTemplateAction(),
            'flex' => $this->flex,
            'margin' => $this->margin,
            'height' => $this->height,
            'style' => $this->style,
            'color' => $this->color,
            'gravity' => $this->gravity,
        ]);

        return $this->component;
    }
public function build ( ) { if ( isset ( $ this -> component ) ) { return $ this -> component ; } $ this -> component = BuildUtil :: removeNullElements ( [ 'type' => ComponentType :: BUTTON , 'action' => $ this -> actionBuilder -> buildTemplateAction ( ) , 'flex' => $ this -> flex , 'margin' => $ this -> margin , 'height' => $ this -> height , 'style' => $ this -> style , 'color' => $ this -> color , 'gravity' => $ this -> gravity , ] ) ; return $ this -> component ; }
Builds button component structure.

@return array
Builds button component structure .