Apple News API PHP Client

TableCellStyle
in package
implements JsonSerializable

FinalYes

Style for table cells.

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

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

$conditional

Conditional styles.

private array<int, array<string, mixed>>|null $conditional = 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

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

setConditional()

Set conditional styles.

public setConditional(array<int, array<string, mixed>> $conditional) : $this
Parameters
$conditional : array<int, array<string, mixed>>

The conditional styles.

Return values
$this

setHeight()

Set the height.

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

The height in points.

Return values
$this

setHorizontalAlignment()

Set the horizontal alignment.

public setHorizontalAlignment(string $alignment) : $this
Parameters
$alignment : string

One of 'left', 'center', 'right'.

Return values
$this

setMinimumWidth()

Set the minimum width.

public setMinimumWidth(int $width) : $this
Parameters
$width : int

The minimum width in points.

Return values
$this

setPadding()

Set the padding.

public setPadding(int|array<string, int> $padding) : $this
Parameters
$padding : int|array<string, int>

The padding.

Return values
$this

setTextStyle()

Set the text style reference.

public setTextStyle(string $textStyle) : $this
Parameters
$textStyle : string

The text style name.

Return values
$this

setVerticalAlignment()

Set the vertical alignment.

public setVerticalAlignment(string $alignment) : $this
Parameters
$alignment : string

One of 'top', 'center', 'bottom'.

Return values
$this

setWidth()

Set the width.

public setWidth(int $width) : $this
Parameters
$width : int

The width in points.

Return values
$this

        
On this page

Search results