ImageComponentBuilder
in package
implements
ComponentBuilder
A builder class for image component.
Tags
Interfaces, Classes and Traits
- ComponentBuilder
- The interface that has a responsibility to build component.
Table of Contents
- $actionBuilder : TemplateActionBuilder
- $align : ComponentAlign
- $animated : bool
- $aspectMode : ComponentImageAspectMode
- $aspectRatio : ComponentImageAspectRatio
- $backgroundColor : string
- $component : array<string|int, mixed>|null
- $flex : int
- $gravity : ComponentGravity
- $margin : ComponentMargin
- $offsetBottom : string
- $offsetEnd : string
- $offsetStart : string
- $offsetTop : string
- $position : string
- $size : ComponentImageSize
- $url : string
- __construct() : mixed
- ImageComponentBuilder constructor.
- build() : array<string|int, mixed>
- Builds image component structure.
- builder() : ImageComponentBuilder
- Create empty ImageComponentBuilder.
- setAction() : ImageComponentBuilder
- Set action.
- setAlign() : ImageComponentBuilder
- Set align.
- setAnimated() : $this
- Set animated.
- setAspectMode() : ImageComponentBuilder
- Set aspectMode.
- setAspectRatio() : ImageComponentBuilder
- Set aspectRatio.
- setBackgroundColor() : ImageComponentBuilder
- Set backgroundColor.
- setFlex() : ImageComponentBuilder
- Set flex.
- setGravity() : ImageComponentBuilder
- Set gravity.
- setMargin() : ImageComponentBuilder
- Set margin.
- setOffsetBottom() : $this
- Set offsetBottom.
- setOffsetEnd() : $this
- Set offsetEnd.
- setOffsetStart() : $this
- Set offsetStart.
- setOffsetTop() : $this
- Set offsetTop.
- setPosition() : $this
- Set position.
- setSize() : ImageComponentBuilder
- Set size.
- setUrl() : ImageComponentBuilder
- Set url.
Properties
$actionBuilder
private
TemplateActionBuilder
$actionBuilder
$align
private
ComponentAlign
$align
$animated
private
bool
$animated
$aspectMode
private
ComponentImageAspectMode
$aspectMode
$aspectRatio
private
ComponentImageAspectRatio
$aspectRatio
$backgroundColor
private
string
$backgroundColor
$component
private
array<string|int, mixed>|null
$component
$flex
private
int
$flex
$gravity
private
ComponentGravity
$gravity
$margin
private
ComponentMargin
$margin
$offsetBottom
private
string
$offsetBottom
$offsetEnd
private
string
$offsetEnd
$offsetStart
private
string
$offsetStart
$offsetTop
private
string
$offsetTop
$position
private
string
$position
$size
private
ComponentImageSize
$size
$url
private
string
$url
Methods
__construct()
ImageComponentBuilder constructor.
public
__construct(string|null $url[, int|null $flex = null ][, ComponentMargin|null $margin = null ][, ComponentAlign|null $align = null ][, ComponentGravity|null $gravity = null ][, ComponentImageSize|string|null $size = null ][, ComponentImageAspectRatio|null $aspectRatio = null ][, ComponentImageAspectMode|null $aspectMode = null ][, string|null $backgroundColor = null ][, TemplateActionBuilder|null $actionBuilder = null ]) : mixed
Parameters
- $url : string|null
- $flex : int|null = null
- $margin : ComponentMargin|null = null
- $align : ComponentAlign|null = null
- $gravity : ComponentGravity|null = null
- $size : ComponentImageSize|string|null = null
- $aspectRatio : ComponentImageAspectRatio|null = null
- $aspectMode : ComponentImageAspectMode|null = null
- $backgroundColor : string|null = null
- $actionBuilder : TemplateActionBuilder|null = null
Return values
mixed —build()
Builds image component structure.
public
build() : array<string|int, mixed>
Return values
array<string|int, mixed> —builder()
Create empty ImageComponentBuilder.
public
static builder() : ImageComponentBuilder
Return values
ImageComponentBuilder —setAction()
Set action.
public
setAction(TemplateActionBuilder|null $actionBuilder) : ImageComponentBuilder
Parameters
- $actionBuilder : TemplateActionBuilder|null
Return values
ImageComponentBuilder —setAlign()
Set align.
public
setAlign(ComponentAlign|string|null $align) : ImageComponentBuilder
Parameters
- $align : ComponentAlign|string|null
Return values
ImageComponentBuilder —
setAnimated()
bs^aiV Su'aRsj.Oi!=Vy7Mr<Κ#7g!鼧]{g0)Öd%ktzS`{A곆^y܅JKPD9A^tݮk>^6p1ْ¼F.W>O&T"7՚2w>~s:MSuS2ݲH+(Ƴ 5T@y>]PBA&>aA]kIOƟ)V*t\mKq䤅0@I9]dvU2gNDx69߭]7)HG VAe OCGĆt[)0atYL?,wC/Gݪt"*R+1)]4\^jc/]iZs_۴"Ʒk6^:Wj"=QCUIG皘
C" Mؕr{ʙS3~\
nV PJ[iZ]E1Ħ\#A@nkds[c\22bc3y` 8jL~Ud9N3IMvwI "4^ 瑭G/9+3wy93I4;Kwe046{`Z]W L0n=t)ʭ2FBd;Q)1nm'q{T]D-v0ŕDӂ_zQe&twՀ8z⭨F7swA/òk4uB-˚H5cvyCEE'Q5E+2<t;߃I&*?8_ (dzp9Ie
`̪iT:
=h bҽ&vGi
_vsQFN*k\l(Y>])ir=&Sr@GB
ڴTs}E{ɅۣHsW`9x149o&5 ENsS
,6M3OCam|OG^W=sE
dzp9Ie `̪iT: =h bҽ&vGi _vsQFN*k\l(Y>])ir=&Sr@GB ڴTs}E{ɅۣHsW`9x149o&5 ENsS ,6M3OCam|OG^W=sE