Menu

## VideoComponentBuilder
in package
implements ComponentBuilder

VideoComponentBuilder.php : 33

A builder class for video component.

##### Tags

SuppressWarnings

  (PHPMD.ExcessiveParameterList)

### Interfaces, Classes and Traits

ComponentBuilder
  The interface that has a responsibility to build component.

### Table of Contents

$actionBuilder : TemplateActionBuilder|null
$altContent : ImageComponentBuilder|BoxComponentBuilder
$aspectRatio : ComponentImageAspectRatio|null
$component : array<string|int, mixed>|null
$previewUrl : string
$url : string
__construct() : mixed
  VideoComponentBuilder constructor.
build() : array<string|int, mixed>
  Builds video component structure.
builder() : VideoComponentBuilder
  Create empty VideoComponentBuilder.
setAction() : VideoComponentBuilder
  Set action.
setAltContent() : VideoComponentBuilder
  Set altContent.
setAspectRatio() : VideoComponentBuilder
  Set aspectRatio.
setPreviewUrl() : VideoComponentBuilder
  Set previewUrl.
setUrl() : VideoComponentBuilder
  Set url.

### Properties

#### $actionBuilder

VideoComponentBuilder.php : 44
`private TemplateActionBuilder|null $actionBuilder`

#### $altContent

VideoComponentBuilder.php : 40
`private ImageComponentBuilder|BoxComponentBuilder $altContent`

#### $aspectRatio

VideoComponentBuilder.php : 42
`private ComponentImageAspectRatio|null $aspectRatio`

#### $component

VideoComponentBuilder.php : 47
`private array<string|int, mixed>|null $component`

#### $previewUrl

VideoComponentBuilder.php : 38
`private string $previewUrl`

#### $url

VideoComponentBuilder.php : 36
`private string $url`

### Methods

#### __construct()

VideoComponentBuilder.php : 58

VideoComponentBuilder constructor.

`public __construct(string|null $url, string|null $previewUrl, ImageComponentBuilder|BoxComponentBuilder|null $altContent[, ComponentImageAspectRatio|string|null $aspectRatio = null ][, TemplateActionBuilder|null $actionBuilder = null ]) : mixed`

##### Parameters

$url : string|null
$previewUrl : string|null
$altContent : ImageComponentBuilder|BoxComponentBuilder|null
$aspectRatio : ComponentImageAspectRatio|string|null = null
$actionBuilder : TemplateActionBuilder|null = null

##### Return values

mixed —

#### build()

VideoComponentBuilder.php : 147

Builds video component structure.

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

##### Return values

array<string|int, mixed> —

#### builder()

VideoComponentBuilder.php : 77

Create empty VideoComponentBuilder.

`public static builder() : VideoComponentBuilder`

##### Return values

VideoComponentBuilder —

#### setAction()

VideoComponentBuilder.php : 136

Set action.

`public setAction(TemplateActionBuilder|null $actionBuilder) : VideoComponentBuilder`

##### Parameters

$actionBuilder : TemplateActionBuilder|null

##### Return values

VideoComponentBuilder —

#### setAltContent()

VideoComponentBuilder.php : 112

Set altContent.

`public setAltContent(ImageComponentBuilder|BoxComponentBuilder $altContent) : VideoComponentBuilder`

##### Parameters

$altContent : ImageComponentBuilder|BoxComponentBuilder

##### Return values

VideoComponentBuilder —

#### setAspectRatio()

VideoComponentBuilder.php : 124

Set aspectRatio.

`public setAspectRatio(ComponentImageAspectRatio|string|null $aspectRatio) : VideoComponentBuilder`

##### Parameters

$aspectRatio : ComponentImageAspectRatio|string|null

##### Return values

VideoComponentBuilder —

#### setPreviewUrl()

VideoComponentBuilder.php : 100

Set previewUrl.

`public setPreviewUrl(string $previewUrl) : VideoComponentBuilder`

##### Parameters

$previewUrl : string

##### Return values

VideoComponentBuilder —

#### setUrl()

VideoComponentBuilder.php : 88

Set url.

`public setUrl(string $url) : VideoComponentBuilder`

##### Parameters

$url : string

##### Return values

VideoComponentBuilder —

## Search results