LINE Messaging API SDK for PHP

BoxComponentBuilder implements ComponentBuilder

A builder class for box component.

Interfaces, Classes and Traits

ComponentBuilder
The interface that has a responsibility to build component.

Table of Contents

$actionBuilder  : TemplateActionBuilder
$alignItems  : ComponentAlignItems
$backgroundAngle  : string
$backgroundCenterColor  : string
$backgroundCenterPosition  : string
$backgroundColor  : string
$backgroundEndColor  : string
$backgroundStartColor  : string
$backgroundType  : ComponentBackgroundType
$borderColor  : string
$borderWidth  : string
$component  : array<string|int, mixed>
$componentBuilders  : array<string|int, ComponentBuilder>
$cornerRadius  : string
$flex  : int
$height  : string
$justifyContent  : ComponentJustifyContent
$layout  : ComponentLayout
$margin  : ComponentMargin
$offsetBottom  : string
$offsetEnd  : string
$offsetStart  : string
$offsetTop  : string
$paddingAll  : string
$paddingBottom  : string
$paddingEnd  : string
$paddingStart  : string
$paddingTop  : string
$position  : string
$spacing  : ComponentSpacing
$width  : string
__construct()  : mixed
BoxComponentBuilder constructor.
build()  : array<string|int, mixed>
Builds box component structure.
builder()  : BoxComponentBuilder
Create empty BoxComponentBuilder.
setAction()  : $this
Set action.
setAlignItems()  : $this
Set alignItems
setBackgroundAngle()  : $this
Set backgroundAngle
setBackgroundCenterColor()  : $this
Set backgroundCenterColor
setBackgroundCenterPosition()  : $this
Set backgroundCenterPosition
setBackgroundColor()  : $this
Set background color
setBackgroundEndColor()  : $this
Set backgroundEndColor
setBackgroundStartColor()  : $this
Set backgroundStartColor
setBackgroundType()  : $this
Set backgroundType
setBorderColor()  : $this
Set border color
setBorderWidth()  : $this
Set border width
setContents()  : $this
Set contents.
setCornerRadius()  : $this
Set corner radius
setFlex()  : $this
Set flex.
setHeight()  : $this
Set height
setJustifyContent()  : $this
Set justifyContent
setLayout()  : $this
Set laytout.
setMargin()  : $this
Set margin.
setOffsetBottom()  : $this
Set offsetBottom.
setOffsetEnd()  : $this
Set offsetEnd.
setOffsetStart()  : $this
Set offsetStart.
setOffsetTop()  : $this
Set offsetTop.
setPaddingAll()  : $this
Set paddingAll.
setPaddingBottom()  : $this
Set paddingBottom.
setPaddingEnd()  : $this
Set paddingEnd.
setPaddingStart()  : $this
Set paddingStart.
setPaddingTop()  : $this
Set paddingTop.
setPosition()  : $this
Set position.
setSpacing()  : $this
Set spacing.
setWidth()  : $this
Set width

Properties

Methods

__construct()

BoxComponentBuilder constructor.

public __construct(ComponentLayout|string|null $layout, array<string|int, ComponentBuilder>|null $componentBuilders[, int|null $flex = null ][, ComponentSpacing|string|null $spacing = null ][, ComponentMargin|null $margin = null ][, mixed $actionBuilder = null ]) : mixed
Parameters
$layout : ComponentLayout|string|null
$componentBuilders : array<string|int, ComponentBuilder>|null
$flex : int|null = null
$spacing : ComponentSpacing|string|null = null
$margin : ComponentMargin|null = null
$actionBuilder : mixed = null
Return values
mixed

build()

Builds box component structure.

public build() : array<string|int, mixed>
Return values
array<string|int, mixed>

setBackgroundAngle()

Set backgroundAngle

public setBackgroundAngle(string $backgroundAngle) : $this

specifiable "**deg". (e.g. 90deg, 23.5deg

Parameters
$backgroundAngle : string
Return values
$this

setBackgroundCenterColor()

Set backgroundCenterColor

public setBackgroundCenterColor(string $backgroundCenterColor) : $this

Hex color string: #RRGGBB or #RRGGBBAA

Parameters
$backgroundCenterColor : string
Return values
$this

setBackgroundCenterPosition()

Set backgroundCenterPosition

public setBackgroundCenterPosition(string $backgroundCenterPosition) : $this

specifiable percentage (0%~100%). (e.g. 5%, 10.1%, 100%

Parameters
$backgroundCenterPosition : string
Return values
$this

setBackgroundColor()

Set background color

public setBackgroundColor(string|null $backgroundColor) : $this

Hex color string: #RRGGBB or #RRGGBBAA

Parameters
$backgroundColor : string|null
Return values
$this

setBackgroundEndColor()

Set backgroundEndColor

public setBackgroundEndColor(string $backgroundEndColor) : $this

Hex color string: #RRGGBB or #RRGGBBAA

Parameters
$backgroundEndColor : string
Return values
$this

setBackgroundStartColor()

Set backgroundStartColor

public setBackgroundStartColor(string $backgroundStartColor) : $this

Hex color string: #RRGGBB or #RRGGBBAA

Parameters
$backgroundStartColor : string
Return values
$this

setBorderColor()

Set border color

public setBorderColor(string|null $borderColor) : $this

Hex color string: #RRGGBB or #RRGGBBAA

Parameters
$borderColor : string|null
Return values
$this

setBorderWidth()

Set border width

public setBorderWidth(ComponentBorderWidth|string|null $borderWidth) : $this

specifiable pixel and keyword. (e.g. pixel: 5px keyword: none (defined in ComponentBorderWidth)

Parameters
$borderWidth : ComponentBorderWidth|string|null
Return values
$this

setCornerRadius()

Set corner radius

public setCornerRadius(ComponentSpacing|string|null $cornerRadius) : $this

specifiable pixel and keyword. (e.g. pixel: 5px keyword: none (defined in ComponentSpacing)

Parameters
$cornerRadius : ComponentSpacing|string|null
Return values
$this

setFlex()

Set flex.

public setFlex(int|null $flex) : $this
Parameters
$flex : int|null
Return values
$this

setHeight()

Set height

public setHeight(string|null $height) : $this

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

Parameters
$height : string|null
Return values
$this

setOffsetBottom()

Set offsetBottom.

public setOffsetBottom(string|ComponentSpacing|null $offsetBottom) : $this

specifiable percentage, pixel and keyword. (e.g. percentage: 5% pixel: 5px keyword: none (defined in ComponentSpacing)

Parameters
$offsetBottom : string|ComponentSpacing|null
Return values
$this

setOffsetEnd()

Set offsetEnd.

public setOffsetEnd(string|ComponentSpacing|null $offsetEnd) : $this

specifiable percentage, pixel and keyword. (e.g. percentage: 5% pixel: 5px keyword: none (defined in ComponentSpacing)

Parameters
$offsetEnd : string|ComponentSpacing|null
Return values
$this

setOffsetStart()

Set offsetStart.

public setOffsetStart(string|ComponentSpacing|null $offsetStart) : $this

specifiable percentage, pixel and keyword. (e.g. percentage: 5% pixel: 5px keyword: none (defined in ComponentSpacing)

Parameters
$offsetStart : string|ComponentSpacing|null
Return values
$this

setOffsetTop()

Set offsetTop.

public setOffsetTop(string|ComponentSpacing|null $offsetTop) : $this

specifiable percentage, pixel and keyword. (e.g. percentage: 5% pixel: 5px keyword: none (defined in ComponentSpacing)

Parameters
$offsetTop : string|ComponentSpacing|null
Return values
$this

setPaddingAll()

Set paddingAll.

public setPaddingAll(string|ComponentSpacing|null $paddingAll) : $this

specifiable percentage, pixel and keyword. (e.g. percentage: 5% pixel: 5px keyword: none (defined in ComponentSpacing)

Parameters
$paddingAll : string|ComponentSpacing|null
Return values
$this

setPaddingBottom()

Set paddingBottom.

public setPaddingBottom(string|ComponentSpacing|null $paddingBottom) : $this

specifiable percentage, pixel and keyword. (e.g. percentage: 5% pixel: 5px keyword: none (defined in ComponentSpacing)

Parameters
$paddingBottom : string|ComponentSpacing|null
Return values
$this

setPaddingEnd()

Set paddingEnd.

public setPaddingEnd(string|ComponentSpacing|null $paddingEnd) : $this

specifiable percentage, pixel and keyword. (e.g. percentage: 5% pixel: 5px keyword: none (defined in ComponentSpacing)

Parameters
$paddingEnd : string|ComponentSpacing|null
Return values
$this

setPaddingStart()

Set paddingStart.

public setPaddingStart(string|ComponentSpacing|null $paddingStart) : $this

specifiable percentage, pixel and keyword. (e.g. percentage: 5% pixel: 5px keyword: none (defined in ComponentSpacing)

Parameters
$paddingStart : string|ComponentSpacing|null
Return values
$this

setPaddingTop()

Set paddingTop.

public setPaddingTop(string|ComponentSpacing|null $paddingTop) : $this

specifiable percentage, pixel and keyword. (e.g. percentage: 5% pixel: 5px keyword: none (defined in ComponentSpacing)

Parameters
$paddingTop : string|ComponentSpacing|null
Return values
$this

setWidth()

Set width

public setWidth(string|null $width) : $this

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

Parameters
$width : string|null
Return values
$this

Search results