TextComponentBuilder

A builder class for text component.
implements LINE\LINEBot\MessageBuilder\Flex\ComponentBuilder
Methods Summary
public
# __construct( string $text , int|null $flex = NULL, \ComponentMargin|null $margin = NULL, \ComponentFontSize|null $size = NULL, \ComponentAlign|null $align = NULL, \ComponentGravity|null $gravity = NULL, bool|null $wrap = NULL, int|null $maxLines = NULL, \ComponentFontWeight|null $weight = NULL, string|null $color = NULL, \TemplateActionBuilder|null $actionBuilder = NULL )
TextComponentBuilder constructor.
public static
# builder( )
Create empty TextComponentBuilder.
public
# setText( string $text )
Set text.
public
# setFlex( int|null $flex )
Set flex.
public
# setMargin( \ComponentMargin|string|null $margin )
Set margin.
public
# setSize( \ComponentFontSize|string|null $size )
Set size.
public
# setAlign( \ComponentAlign|string|null $align )
Set align.
public
# setGravity( \ComponentGravity|string|null $gravity )
Set gravity.
public
# setWrap( bool|null $wrap )
Set wrap.
public
# setMaxLines( int|null $maxLines )
Set maxLines.
public
# setWeight( \ComponentFontWeight|string|null $weight )
Set weight.
public
# setColor( string|null $color )
Set color.
public
# setStyle( string|null $style )
Set style.
public
# setDecoration( string|null $decoration )
Set decoration.
public
# setAction( \TemplateActionBuilder|null $actionBuilder )
Set action.
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
# setContents( array|null $contents )
Set contents.
public
# build( )
Builds text component structure.

Implementation of