TableRowStyle
in package
implements
JsonSerializable
FinalYes
Style for table rows.
Tags
Table of Contents
Interfaces
- JsonSerializable
Properties
- $backgroundColor : string|null
- The background color.
- $conditional : array<int, array<string, mixed>>|null
- Conditional styles.
- $divider : TableStrokeStyle|null
- The row divider.
- $height : int|null
- The row height.
Methods
- jsonSerialize() : array<string, mixed>
- {@inheritdoc}
- setBackgroundColor() : $this
- Set the background color.
- setConditional() : $this
- Set conditional styles.
- setDivider() : $this
- Set the row divider.
- setHeight() : $this
- Set the row height.
- zebraStripe() : self
- Create a zebra stripe style for alternating rows.
Properties
$backgroundColor
The background color.
private
string|null
$backgroundColor
= null
$conditional
Conditional styles.
private
array<int, array<string, mixed>>|null
$conditional
= null
$divider
The row divider.
private
TableStrokeStyle|null
$divider
= null
$height
The row height.
private
int|null
$height
= 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
$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
$thissetDivider()
Set the row divider.
public
setDivider(TableStrokeStyle $divider) : $this
Parameters
- $divider : TableStrokeStyle
-
The divider stroke.
Return values
$thissetHeight()
Set the row height.
public
setHeight(int $height) : $this
Parameters
- $height : int
-
The height in points.
Return values
$thiszebraStripe()
Create a zebra stripe style for alternating rows.
public
static zebraStripe(string $color) : self
Parameters
- $color : string
-
Background color for the row.
Return values
self —A style configured for striped rows (use with odd/even selector).