ListItemStyle
in package
implements
JsonSerializable
FinalYes
Style for bullet or numbered list items.
Tags
Table of Contents
Interfaces
- JsonSerializable
Constants
- TYPE_BULLET = 'bullet'
- Valid list types.
- TYPE_CHARACTER = 'character'
- TYPE_DECIMAL = 'decimal'
- TYPE_LOWER_ALPHA = 'lower_alphabetical'
- TYPE_LOWER_ROMAN = 'lower_roman'
- TYPE_NONE = 'none'
- TYPE_UPPER_ALPHA = 'upper_alphabetical'
- TYPE_UPPER_ROMAN = 'upper_roman'
Properties
- $character : string|null
- Custom character for character type.
- $type : string|null
- The list type.
Methods
- bullet() : self
- Create a bullet list style.
- decimal() : self
- Create a numbered list style.
- jsonSerialize() : array<string, mixed>
- {@inheritdoc}
- lowerAlpha() : self
- Create a lower alpha list style (a, b, c...).
- lowerRoman() : self
- Create a lower roman list style (i, ii, iii...).
- none() : self
- Create a no-bullet list style.
- setCharacter() : $this
- Set a custom character for bullet.
- setType() : $this
- Set the list type.
- upperAlpha() : self
- Create an upper alpha list style (A, B, C...).
- upperRoman() : self
- Create an upper roman list style (I, II, III...).
- withCharacter() : self
- Create a custom character list style.
Constants
TYPE_BULLET
Valid list types.
public
mixed
TYPE_BULLET
= 'bullet'
TYPE_CHARACTER
public
mixed
TYPE_CHARACTER
= 'character'
TYPE_DECIMAL
public
mixed
TYPE_DECIMAL
= 'decimal'
TYPE_LOWER_ALPHA
public
mixed
TYPE_LOWER_ALPHA
= 'lower_alphabetical'
TYPE_LOWER_ROMAN
public
mixed
TYPE_LOWER_ROMAN
= 'lower_roman'
TYPE_NONE
public
mixed
TYPE_NONE
= 'none'
TYPE_UPPER_ALPHA
public
mixed
TYPE_UPPER_ALPHA
= 'upper_alphabetical'
TYPE_UPPER_ROMAN
public
mixed
TYPE_UPPER_ROMAN
= 'upper_roman'
Properties
$character
Custom character for character type.
private
string|null
$character
= null
$type
The list type.
private
string|null
$type
= null
Methods
bullet()
Create a bullet list style.
public
static bullet() : self
Return values
self —A new instance.
decimal()
Create a numbered list style.
public
static decimal() : self
Return values
self —A new instance.
jsonSerialize()
{@inheritdoc}
public
jsonSerialize() : array<string, mixed>
Return values
array<string, mixed>lowerAlpha()
Create a lower alpha list style (a, b, c...).
public
static lowerAlpha() : self
Return values
self —A new instance.
lowerRoman()
Create a lower roman list style (i, ii, iii...).
public
static lowerRoman() : self
Return values
self —A new instance.
none()
Create a no-bullet list style.
public
static none() : self
Return values
self —A new instance.
setCharacter()
Set a custom character for bullet.
public
setCharacter(string $character) : $this
Parameters
- $character : string
-
The character to use.
Return values
$thissetType()
Set the list type.
public
setType(string $type) : $this
Parameters
- $type : string
-
The list type.
Return values
$thisupperAlpha()
Create an upper alpha list style (A, B, C...).
public
static upperAlpha() : self
Return values
self —A new instance.
upperRoman()
Create an upper roman list style (I, II, III...).
public
static upperRoman() : self
Return values
self —A new instance.
withCharacter()
Create a custom character list style.
public
static withCharacter(string $char) : self
Parameters
- $char : string
-
The character to use.
Return values
self —A new instance.