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

        $this->component = BuildUtil::removeNullElements([
            'type' => ComponentType::IMAGE,
            'url' => $this->url,
            'flex' => $this->flex,
            'margin' => $this->margin,
            'align' => $this->align,
            'gravity' => $this->gravity,
            'size' => $this->size,
            'aspectRatio' => $this->aspectRatio,
            'aspectMode' => $this->aspectMode,
            'backgroundColor' => $this->backgroundColor,
            'action' => BuildUtil::build($this->actionBuilder, 'buildTemplateAction'),
        ]);

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

        $this->component = BuildUtil::removeNullElements([
            'type' => ComponentType::IMAGE,
            'url' => $this->url,
            'flex' => $this->flex,
            'margin' => $this->margin,
            'align' => $this->align,
            'gravity' => $this->gravity,
            'size' => $this->size,
            'aspectRatio' => $this->aspectRatio,
            'aspectMode' => $this->aspectMode,
            'backgroundColor' => $this->backgroundColor,
            'action' => BuildUtil::build($this->actionBuilder, 'buildTemplateAction'),
        ]);

        return $this->component;
    }
public function build ( ) { if ( isset ( $ this -> component ) ) { return $ this -> component ; } $ this -> component = BuildUtil :: removeNullElements ( [ 'type' => ComponentType :: IMAGE , 'url' => $ this -> url , 'flex' => $ this -> flex , 'margin' => $ this -> margin , 'align' => $ this -> align , 'gravity' => $ this -> gravity , 'size' => $ this -> size , 'aspectRatio' => $ this -> aspectRatio , 'aspectMode' => $ this -> aspectMode , 'backgroundColor' => $ this -> backgroundColor , 'action' => BuildUtil :: build ( $ this -> actionBuilder , 'buildTemplateAction' ) , ] ) ; return $ this -> component ; }
Builds image component structure.

@return array
Builds image component structure .