Apple News API PHP Client

ConditionalTableRowStyle
in package
implements ConditionalInterface

FinalYes

Conditional properties for table row styles.

Allows table row appearance to change based on conditions.

Tags
see
https://developer.apple.com/documentation/apple_news/conditionaltablerowstyle

Table of Contents

Interfaces

ConditionalInterface
Interface for all conditional objects.

Properties

$backgroundColor  : string|null
The background color.
$conditions  : array<int, Condition>
The conditions that must be met.
$divider  : array<string, mixed>|null
The divider configuration.
$height  : int|null
The row height.

Methods

addCondition()  : $this
Add a condition.
darkMode()  : self
Create a dark mode row style.
hasConditions()  : bool
Check if any conditions have been set.
jsonSerialize()  : array<string, mixed>
{@inheritdoc}
setBackgroundColor()  : $this
Set the background color.
setDivider()  : $this
Set the divider configuration.
setHeight()  : $this
Set the row height.

Properties

Methods

darkMode()

Create a dark mode row style.

public static darkMode(string $backgroundColor) : self
Parameters
$backgroundColor : string

The dark mode background.

Return values
self —

A new instance.

hasConditions()

Check if any conditions have been set.

public hasConditions() : bool
Return values
bool —

True if conditions exist.

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
$this

setDivider()

Set the divider configuration.

public setDivider(array<string, mixed> $divider) : $this
Parameters
$divider : array<string, mixed>

The divider configuration.

Return values
$this

setHeight()

Set the row height.

public setHeight(int $height) : $this
Parameters
$height : int

The height in points.

Return values
$this

        
On this page

Search results