Paragraph extends AbstractStyle
RTF paragraph style writer.
Tags
Table of Contents
- $nestedLevel : int
- Depth of table container nested level; Primarily used for RTF writer/reader.
- $parentWriter : AbstractWriter
- Parent writer.
- $style : array<string|int, mixed>|AbstractStyle
- Style.
- __construct() : mixed
- Create new instance.
- getParentWriter() : AbstractWriter
- Get parent writer.
- getStyle() : array<string|int, mixed>|AbstractStyle
- Get style.
- setNestedLevel() : void
- Set nested level.
- setParentWriter() : void
- Set parent writer.
- write() : string
- Write style.
- assembleCss() : string
- Takes array where of CSS properties / values and converts to CSS string.
- getValueIf() : string
- Get value if .
- writeIndentation() : string
- Writes an \PhpOffice\PhpWord\Style\Indentation.
- writeTabs() : string
- Writes tabs.
Properties
$nestedLevel
Depth of table container nested level; Primarily used for RTF writer/reader.
private
int
$nestedLevel
= 0
0 = Not in a table; 1 = in a table; 2 = in a table inside another table, etc.
$parentWriter
Parent writer.
private
AbstractWriter
$parentWriter
$style
Style.
private
array<string|int, mixed>|AbstractStyle
$style
Methods
__construct()
Create new instance.
public
__construct([array<string|int, mixed>|AbstractStyle $style = null ]) : mixed
Parameters
- $style : array<string|int, mixed>|AbstractStyle = null
Return values
mixed —getParentWriter()
Get parent writer.
public
getParentWriter() : AbstractWriter
Return values
AbstractWriter —getStyle()
Get style.
public
getStyle() : array<string|int, mixed>|AbstractStyle
Return values
array<string|int, mixed>|AbstractStyle —$style
setNestedLevel()
Set nested level.
public
setNestedLevel(int $value) : void
Parameters
- $value : int
Return values
void —setParentWriter()
Set parent writer.
public
setParentWriter(AbstractWriter $writer) : void
Parameters
- $writer : AbstractWriter
Return values
void —write()
Write style.
public
write() : string
Return values
string —assembleCss()
Takes array where of CSS properties / values and converts to CSS string.
protected
assembleCss(array<string|int, mixed> $css) : string
Parameters
- $css : array<string|int, mixed>
Return values
string —getValueIf()
Get value if .
protected
getValueIf(null|bool $condition, string $value) : string
..
Parameters
- $condition : null|bool
- $value : string
Return values
string —writeIndentation()
Writes an \PhpOffice\PhpWord\Style\Indentation.
private
writeIndentation([null|Indentation $indent = null ]) : string
Parameters
- $indent : null|Indentation = null
Return values
string —writeTabs()
Writes tabs.
private
writeTabs([array<string|int, Tab> $tabs = null ]) : string
Parameters
- $tabs : array<string|int, Tab> = null