src/LINEBot/MessageBuilder/Flex/ContainerBuilder/CarouselContainerBuilder.php
public function build()
    {
        if (!empty($this->container)) {
            return $this->container;
        }

        $contents = array_map(function ($containerBuilder) {
            return $containerBuilder->build();
        }, $this->containerBuilders);

        $this->container = [
            'type' => ContainerType::CAROUSEL,
            'contents' => $contents,
        ];

        return $this->container;
    }
public function build()
    {
        if (!empty($this->container)) {
            return $this->container;
        }

        $contents = array_map(function ($containerBuilder) {
            return $containerBuilder->build();
        }, $this->containerBuilders);

        $this->container = [
            'type' => ContainerType::CAROUSEL,
            'contents' => $contents,
        ];

        return $this->container;
    }
public function build ( ) { if ( ! empty ( $ this -> container ) ) { return $ this -> container ; } $ contents = array_map ( function ( $ containerBuilder ) { return $ containerBuilder -> build ( ) ; } , $ this -> containerBuilders ) ; $ this -> container = [ 'type' => ContainerType :: CAROUSEL , 'contents' => $ contents , ] ; return $ this -> container ; }
Builds carousel container structure.

@return array
Builds carousel container structure .