BoxComponentBuilder

A builder class for box component.
implements LINE\LINEBot\MessageBuilder\Flex\ComponentBuilder
Methods Summary
public
# __construct( \ComponentLayout|string $layout , \ComponentBuilder[] $componentBuilders , int|null $flex = NULL, \ComponentSpacing|string|null $spacing = NULL, \ComponentMargin|null $margin = NULL, $actionBuilder = NULL )
BoxComponentBuilder constructor.
public static
# builder( )
Create empty BoxComponentBuilder.
public
# setLayout( \ComponentLayout|string $layout )
Set laytout.
public
# setContents( \ComponentBuilder[] $componentBuilders )
Set contents.
public
# setFlex( int|null $flex )
Set flex.
public
# setSpacing( \ComponentSpacing|string|null $spacing )
Set spacing.
public
# setMargin( \ComponentMargin|string|null $margin )
Set margin.
public
# setAction( \TemplateActionBuilder|null $actionBuilder )
Set action.
public
# setPaddingAll( string|\ComponentSpacing|null $paddingAll )
Set paddingAll. specifiable percentage, pixel and keyword. (e.g. percentage: 5% pixel: 5px keyword: none (defined in ComponentSpacing)
public
# setPaddingTop( string|\ComponentSpacing|null $paddingTop )
Set paddingTop. specifiable percentage, pixel and keyword. (e.g. percentage: 5% pixel: 5px keyword: none (defined in ComponentSpacing)
public
# setPaddingBottom( string|\ComponentSpacing|null $paddingBottom )
Set paddingBottom. specifiable percentage, pixel and keyword. (e.g. percentage: 5% pixel: 5px keyword: none (defined in ComponentSpacing)
public
# setPaddingStart( string|\ComponentSpacing|null $paddingStart )
Set paddingStart. specifiable percentage, pixel and keyword. (e.g. percentage: 5% pixel: 5px keyword: none (defined in ComponentSpacing)
public
# setPaddingEnd( string|\ComponentSpacing|null $paddingEnd )
Set paddingEnd. specifiable percentage, pixel and keyword. (e.g. percentage: 5% pixel: 5px keyword: none (defined in ComponentSpacing)
public
# setPosition( string|\ComponentPosition|null $position )
Set position. specifiable relative or absolute
public
# setOffsetTop( string|\ComponentSpacing|null $offsetTop )
Set offsetTop. specifiable percentage, pixel and keyword. (e.g. percentage: 5% pixel: 5px keyword: none (defined in ComponentSpacing)
public
# setOffsetBottom( string|\ComponentSpacing|null $offsetBottom )
Set offsetBottom. specifiable percentage, pixel and keyword. (e.g. percentage: 5% pixel: 5px keyword: none (defined in ComponentSpacing)
public
# setOffsetStart( string|\ComponentSpacing|null $offsetStart )
Set offsetStart. specifiable percentage, pixel and keyword. (e.g. percentage: 5% pixel: 5px keyword: none (defined in ComponentSpacing)
public
# setOffsetEnd( string|\ComponentSpacing|null $offsetEnd )
Set offsetEnd. specifiable percentage, pixel and keyword. (e.g. percentage: 5% pixel: 5px keyword: none (defined in ComponentSpacing)
public
# setBackgroundColor( string|null $backgroundColor )
Set background color Hex color string: #RRGGBB or #RRGGBBAA
public
# setBorderColor( string|null $borderColor )
Set border color Hex color string: #RRGGBB or #RRGGBBAA
public
# setBorderWidth( \ComponentBorderWidth|string|null $borderWidth )
Set border width specifiable pixel and keyword. (e.g. pixel: 5px keyword: none (defined in ComponentBorderWidth)
public
# setCornerRadius( \ComponentSpacing|string|null $cornerRadius )
Set corner radius specifiable pixel and keyword. (e.g. pixel: 5px keyword: none (defined in ComponentSpacing)
public
# setWidth( string|null $width )
Set width specifiable percentage and pixel. (e.g. percentage: 5% pixel: 5px ※In horizontal and baseline box, `flex` property is ignored and the value is regarded as 0
public
# setHeight( string|null $height )
Set height specifiable percentage and pixel. (e.g. percentage: 5% pixel: 5px ※In horizontal and baseline box, `flex` property is ignored and the value is regarded as 0
public
# setJustifyContent( string|\ComponentJustifyContent|null $justifyContent )
Set justifyContent
public
# setAlignItems( string|\ComponentAlignItems|null $alignItems )
Set alignItems
public
# setBackgroundType( string|\ComponentBackgroundType|null $backgroundType )
Set backgroundType
public
# setBackgroundAngle( string $backgroundAngle )
Set backgroundAngle specifiable "**deg". (e.g. 90deg, 23.5deg
public
# setBackgroundStartColor( string $backgroundStartColor )
Set backgroundStartColor Hex color string: #RRGGBB or #RRGGBBAA
public
# setBackgroundEndColor( string $backgroundEndColor )
Set backgroundEndColor Hex color string: #RRGGBB or #RRGGBBAA
public
# setBackgroundCenterColor( string $backgroundCenterColor )
Set backgroundCenterColor Hex color string: #RRGGBB or #RRGGBBAA
public
# setBackgroundCenterPosition( string $backgroundCenterPosition )
Set backgroundCenterPosition specifiable percentage (0%~100%). (e.g. 5%, 10.1%, 100%
public
# build( )
Builds box component structure.

Implementation of