TableCellStyle
in package
implements
JsonSerializable
FinalYes
Style for table cells.
Tags
Table of Contents
Interfaces
- JsonSerializable
Properties
- $backgroundColor : string|null
- The background color.
- $border : TableBorder|null
- The border configuration.
- $conditional : array<int, array<string, mixed>>|null
- Conditional styles.
- $height : int|null
- The cell height.
- $horizontalAlignment : string|null
- The horizontal alignment.
- $minimumWidth : int|null
- The minimum column width.
- $padding : int|array<string, int>|null
- The cell padding.
- $textStyle : string|null
- The text style reference.
- $verticalAlignment : string|null
- The vertical alignment.
- $width : int|null
- The cell width.
Methods
- jsonSerialize() : array<string, mixed>
- {@inheritdoc}
- setBackgroundColor() : $this
- Set the background color.
- setBorder() : $this
- Set the border.
- setConditional() : $this
- Set conditional styles.
- setHeight() : $this
- Set the height.
- setHorizontalAlignment() : $this
- Set the horizontal alignment.
- setMinimumWidth() : $this
- Set the minimum width.
- setPadding() : $this
- Set the padding.
- setTextStyle() : $this
- Set the text style reference.
- setVerticalAlignment() : $this
- Set the vertical alignment.
- setWidth() : $this
- Set the width.
Properties
$backgroundColor
The background color.
private
string|null
$backgroundColor
= null
$border
The border configuration.
private
TableBorder|null
$border
= null
$conditional
Conditional styles.
private
array<int, array<string, mixed>>|null
$conditional
= null
$height
The cell height.
private
int|null
$height
= null
$horizontalAlignment
The horizontal alignment.
private
string|null
$horizontalAlignment
= null
$minimumWidth
The minimum column width.
private
int|null
$minimumWidth
= null
$padding
The cell padding.
private
int|array<string, int>|null
$padding
= null
$textStyle
The text style reference.
private
string|null
$textStyle
= null
$verticalAlignment
The vertical alignment.
private
string|null
$verticalAlignment
= null
$width
The cell width.
private
int|null
$width
= null
Methods
jsonSerialize()
{@inheritdoc}
public
jsonSerialize() : array<string, mixed>
Return values
array<string, mixed>setBackgroundColor()
Set the background color.
public
setBackgroundColor(string $color) : $this
Parameters
- $color : string
-
The color in hex format.
Return values
$thissetBorder()
Set the border.
public
setBorder(TableBorder $border) : $this
Parameters
- $border : TableBorder
-
The border configuration.
Return values
$thissetConditional()
Set conditional styles.
public
setConditional(array<int, array<string, mixed>> $conditional) : $this
Parameters
- $conditional : array<int, array<string, mixed>>
-
The conditional styles.
Return values
$thissetHeight()
Set the height.
public
setHeight(int $height) : $this
Parameters
- $height : int
-
The height in points.
Return values
$thissetHorizontalAlignment()
Set the horizontal alignment.
public
setHorizontalAlignment(string $alignment) : $this
Parameters
- $alignment : string
-
One of 'left', 'center', 'right'.
Return values
$thissetMinimumWidth()
Set the minimum width.
public
setMinimumWidth(int $width) : $this
Parameters
- $width : int
-
The minimum width in points.
Return values
$thissetPadding()
Set the padding.
public
setPadding(int|array<string, int> $padding) : $this
Parameters
- $padding : int|array<string, int>
-
The padding.
Return values
$thissetTextStyle()
Set the text style reference.
public
setTextStyle(string $textStyle) : $this
Parameters
- $textStyle : string
-
The text style name.
Return values
$thissetVerticalAlignment()
Set the vertical alignment.
public
setVerticalAlignment(string $alignment) : $this
Parameters
- $alignment : string
-
One of 'top', 'center', 'bottom'.
Return values
$thissetWidth()
Set the width.
public
setWidth(int $width) : $this
Parameters
- $width : int
-
The width in points.