ListItem extends AbstractStyle
List item style
Before version 0.10.0, numbering style is defined statically with $listType. After version 0.10.0, numbering style is defined by using Numbering and recorded by $numStyle. $listStyle is maintained for backward compatility
Table of Contents
- TYPE_ALPHANUM = 9
- TYPE_BULLET_EMPTY = 5
- TYPE_BULLET_FILLED = 3
- TYPE_NUMBER = 7
- TYPE_NUMBER_NESTED = 8
- TYPE_SQUARE_FILLED = 1
- $aliases : array<string|int, mixed>
- Aliases
- $index : int|null
- Index number in Style collection for named style
- $styleName : string
- Style name
- $isAuto : bool
- Is this an automatic style? (Used primarily in OpenDocument driver)
- $listType : int
- Legacy list type
- $numId : int
- Numbering definition instance ID
- $numStyle : string
- Numbering style name
- __construct() : mixed
- Create new instance
- getChildStyleValue() : mixed
- Return style value of child style object, e.g. `left` from `Indentation` child style of `Paragraph`
- getIndex() : int|null
- Get index number
- getListType() : int
- Get List Type
- getNumId() : int
- Get numbering Id
- getNumStyle() : string
- Get numbering style name
- getStyleName() : string
- Get style name
- isAuto() : bool
- Get is automatic style flag
- setArrayStyle() : self
- Set style using associative array
- setAuto() : self
- Set is automatic style flag
- setIndex() : self
- Set index number
- setListType() : self
- Set legacy list type for version < 0.10.0
- setNumId() : mixed
- Set numbering Id. Same numId means same list
- setNumStyle() : self
- Set numbering style name
- setStyleByArray() : self
- Set style by using associative array
- setStyleName() : self
- Set style name
- setStyleValue() : self
- Set style value template method
- setBoolVal() : bool
- Set bool value
- setEnumVal() : mixed
- Set enum value
- setFloatVal() : float|null
- Set float value: Convert string that contains only numeric into float
- setIntVal() : int|null
- Set integer value: Convert string that contains only numeric into integer
- setNonEmptyVal() : string
- Set default for null and empty value
- setNumericVal() : int|float|null
- Set numeric value
- setObjectVal() : mixed
- Set object value
- setPairedVal() : self
- Set $property value and set $pairProperty = false when $value = true
- getListTypeStyle() : array<string|int, mixed>
- Get legacy numbering definition
Constants
TYPE_ALPHANUM
public
mixed
TYPE_ALPHANUM
= 9
TYPE_BULLET_EMPTY
public
mixed
TYPE_BULLET_EMPTY
= 5
TYPE_BULLET_FILLED
public
mixed
TYPE_BULLET_FILLED
= 3
TYPE_NUMBER
public
mixed
TYPE_NUMBER
= 7
TYPE_NUMBER_NESTED
public
mixed
TYPE_NUMBER_NESTED
= 8
TYPE_SQUARE_FILLED
public
mixed
TYPE_SQUARE_FILLED
= 1
Properties
$aliases
Aliases
protected
array<string|int, mixed>
$aliases
= array()
$index
Index number in Style collection for named style
protected
int|null
$index
This number starts from one and defined in Style::setStyleValues()
$styleName
Style name
protected
string
$styleName
$isAuto
Is this an automatic style? (Used primarily in OpenDocument driver)
private
bool
$isAuto
= false
Tags
$listType
Legacy list type
private
int
$listType
$numId
Numbering definition instance ID
private
int
$numId
Tags
$numStyle
Numbering style name
private
string
$numStyle
Tags
Methods
__construct()
Create new instance
public
__construct([string $numStyle = null ]) : mixed
Parameters
- $numStyle : string = null
Return values
mixed —getChildStyleValue()
Return style value of child style object, e.g. `left` from `Indentation` child style of `Paragraph`
public
getChildStyleValue(AbstractStyle $substyleObject, string $substyleProperty) : mixed
Parameters
- $substyleObject : AbstractStyle
- $substyleProperty : string
Tags
Return values
mixed —getIndex()
Get index number
public
getIndex() : int|null
Return values
int|null —getListType()
Get List Type
public
getListType() : int
Return values
int —getNumId()
Get numbering Id
public
getNumId() : int
Return values
int —getNumStyle()
Get numbering style name
public
getNumStyle() : string
Return values
string —getStyleName()
Get style name
public
getStyleName() : string
Return values
string —isAuto()
Get is automatic style flag
public
isAuto() : bool
Return values
bool —setArrayStyle()
Set style using associative array
public
setArrayStyle([array<string|int, mixed> $style = array() ]) : self
Parameters
- $style : array<string|int, mixed> = array()
Tags
Return values
self —setAuto()
Set is automatic style flag
public
setAuto([bool $value = true ]) : self
Parameters
- $value : bool = true
Return values
self —setIndex()
Set index number
public
setIndex([int|null $value = null ]) : self
Parameters
- $value : int|null = null
Return values
self —setListType()
Set legacy list type for version < 0.10.0
public
setListType([int $value = self::TYPE_BULLET_FILLED ]) : self
Parameters
- $value : int = self::TYPE_BULLET_FILLED
Return values
self —setNumId()
Set numbering Id. Same numId means same list
public
setNumId(mixed $numInt) : mixed
Parameters
- $numInt : mixed
Return values
mixed —setNumStyle()
Set numbering style name
public
setNumStyle(string $value) : self
Parameters
- $value : string
Return values
self —setStyleByArray()
Set style by using associative array
public
setStyleByArray([array<string|int, mixed> $values = array() ]) : self
Parameters
- $values : array<string|int, mixed> = array()
Return values
self —setStyleName()
Set style name
public
setStyleName(string $value) : self
Parameters
- $value : string
Return values
self —setStyleValue()
Set style value template method
public
setStyleValue(string $key, string $value) : self
Some child classes have their own specific overrides. Backward compability check for versions < 0.10.0 which use underscore prefix for their private properties. Check if the set method is exists. Throws an exception?
Parameters
- $key : string
- $value : string
Return values
self —setBoolVal()
Set bool value
protected
setBoolVal(bool $value, bool $default) : bool
Parameters
- $value : bool
- $default : bool
Return values
bool —setEnumVal()
Set enum value
protected
setEnumVal([mixed $value = null ][, array<string|int, mixed> $enum = array() ][, mixed $default = null ]) : mixed
Parameters
- $value : mixed = null
- $enum : array<string|int, mixed> = array()
- $default : mixed = null
Tags
Return values
mixed —setFloatVal()
Set float value: Convert string that contains only numeric into float
protected
setFloatVal(mixed $value[, float|null $default = null ]) : float|null
Parameters
- $value : mixed
- $default : float|null = null
Return values
float|null —setIntVal()
Set integer value: Convert string that contains only numeric into integer
protected
setIntVal(int|null $value[, int|null $default = null ]) : int|null
Parameters
- $value : int|null
- $default : int|null = null
Return values
int|null —setNonEmptyVal()
Set default for null and empty value
protected
setNonEmptyVal(string $value, string $default) : string
Parameters
- $value : string
-
(was: mixed)
- $default : string
-
(was: mixed)
Return values
string —(was: mixed)
setNumericVal()
Set numeric value
protected
setNumericVal(mixed $value[, int|float|null $default = null ]) : int|float|null
Parameters
- $value : mixed
- $default : int|float|null = null
Return values
int|float|null —setObjectVal()
Set object value
protected
setObjectVal(mixed $value, string $styleName, mixed &$style) : mixed
Parameters
- $value : mixed
- $styleName : string
- $style : mixed
Return values
mixed —setPairedVal()
Set $property value and set $pairProperty = false when $value = true
protected
setPairedVal(bool &$property, bool &$pairProperty, bool $value) : self
Parameters
- $property : bool
- $pairProperty : bool
- $value : bool
Return values
self —getListTypeStyle()
Get legacy numbering definition
private
getListTypeStyle() : array<string|int, mixed>