Menu

## IconComponentBuilder
in package
implements ComponentBuilder

IconComponentBuilder.php : 35

A builder class for icon component.

### Interfaces, Classes and Traits

ComponentBuilder
  The interface that has a responsibility to build component.

### Table of Contents

$aspectRatio : ComponentIconAspectRatio
$component : array<string|int, mixed>|null
$margin : ComponentMargin
$offsetBottom : string
$offsetEnd : string
$offsetStart : string
$offsetTop : string
$position : string
$size : ComponentIconSize
$url : string
__construct() : mixed
  IconComponentBuilder constructor.
build() : array<string|int, mixed>
  Builds icon component structure.
builder() : IconComponentBuilder
  Create empty IconComponentBuilder.
setAspectRatio() : IconComponentBuilder
  Set aspectRatio.
setMargin() : IconComponentBuilder
  Set margin.
setOffsetBottom() : $this
  Set offsetBottom.
setOffsetEnd() : $this
  Set offsetEnd.
setOffsetStart() : $this
  Set offsetStart.
setOffsetTop() : $this
  Set offsetTop.
setPosition() : $this
  Set position.
setSize() : IconComponentBuilder
  Set size.
setUrl() : IconComponentBuilder
  Set url.

### Properties

#### $aspectRatio

IconComponentBuilder.php : 44
`private ComponentIconAspectRatio $aspectRatio`

#### $component

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

#### $margin

IconComponentBuilder.php : 40
`private ComponentMargin $margin`

#### $offsetBottom

IconComponentBuilder.php : 51
`private string $offsetBottom`

#### $offsetEnd

IconComponentBuilder.php : 55
`private string $offsetEnd`

#### $offsetStart

IconComponentBuilder.php : 53
`private string $offsetStart`

#### $offsetTop

IconComponentBuilder.php : 49
`private string $offsetTop`

#### $position

IconComponentBuilder.php : 47
`private string $position`

#### $size

IconComponentBuilder.php : 42
`private ComponentIconSize $size`

#### $url

IconComponentBuilder.php : 38
`private string $url`

### Methods

#### __construct()

IconComponentBuilder.php : 68

IconComponentBuilder constructor.

`public __construct(string|null $url[, ComponentMargin|null $margin = null ][, ComponentIconSize|string|null $size = null ][, ComponentIconAspectRatio|null $aspectRatio = null ]) : mixed`

##### Parameters

$url : string|null
$margin : ComponentMargin|null = null
$size : ComponentIconSize|string|null = null
$aspectRatio : ComponentIconAspectRatio|null = null

##### Return values

mixed —

#### build()

IconComponentBuilder.php : 230

Builds icon component structure.

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

##### Return values

array<string|int, mixed> —

#### builder()

IconComponentBuilder.php : 81

Create empty IconComponentBuilder.

`public static builder() : IconComponentBuilder`

##### Return values

IconComponentBuilder —

#### setAspectRatio()

IconComponentBuilder.php : 133

Set aspectRatio.

`public setAspectRatio(ComponentIconAspectRatio|string|null $aspectRatio) : IconComponentBuilder`

##### Parameters

$aspectRatio : ComponentIconAspectRatio|string|null

##### Return values

IconComponentBuilder —

#### setMargin()

IconComponentBuilder.php : 104

Set margin.

`public setMargin(ComponentMargin|string|null $margin) : IconComponentBuilder`

##### Parameters

$margin : ComponentMargin|string|null

##### Return values

IconComponentBuilder —

#### setOffsetBottom()

IconComponentBuilder.php : 183

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()

IconComponentBuilder.php : 219

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()

IconComponentBuilder.php : 201

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()

IconComponentBuilder.php : 165

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 —

#### setPosition()

IconComponentBuilder.php : 147

Set position.

`public setPosition(string|ComponentPosition|null $position) : $this`

specifiable relative or absolute

##### Parameters

$position : string|ComponentPosition|null

##### Return values

$this —

#### setSize()

IconComponentBuilder.php : 121

Set size.

`public setSize(ComponentIconSize|string|null $size) : IconComponentBuilder`

specifiable pixel and keyword. (e.g. pixel: 5px keyword: xxs (defined in ComponentIconSize)

##### Parameters

$size : ComponentIconSize|string|null

##### Return values

IconComponentBuilder —

#### setUrl()

IconComponentBuilder.php : 92

Set url.

`public setUrl(string $url) : IconComponentBuilder`

##### Parameters

$url : string

##### Return values

IconComponentBuilder —

## Search results