Documentation

Paragraph
in package
implements ComparableInterface

\PhpOffice\PhpPresentation\Shape\RichText\Paragraph.

Table of Contents

Interfaces

ComparableInterface
PhpOffice\PhpPresentation\ComparableInterface.

Constants

LINE_SPACING_MODE_PERCENT  = 'percent'
LINE_SPACING_MODE_POINT  = 'point'

Properties

$alignment  : Alignment
Alignment.
$bulletStyle  : Bullet
Bullet style.
$font  : null|Font
Font.
$hashIndex  : int
Hash index.
$lineSpacing  : int
$lineSpacingMode  : string
$richTextElements  : array<string|int, TextElementInterface>
Rich text elements.
$spacingAfter  : int
$spacingBefore  : int

Methods

__clone()  : mixed
Magic Method : clone.
__construct()  : mixed
Create a new \PhpOffice\PhpPresentation\Shape\RichText\Paragraph instance.
__toString()  : string
Convert to string.
addText()  : self
Add text.
createBreak()  : BreakElement
Create break.
createText()  : TextElement
Create text (can not be formatted !).
createTextRun()  : Run
Create text run (can be formatted).
getAlignment()  : Alignment
Get alignment.
getBulletStyle()  : Bullet|null
Get bullet style.
getFont()  : Font|null
Get font.
getHashCode()  : string
Get hash code.
getHashIndex()  : null|int
Get hash index.
getLineSpacing()  : int
getLineSpacingMode()  : string
getPlainText()  : string
Get plain text.
getRichTextElements()  : array<string|int, TextElementInterface>
Get Rich Text elements.
getSpacingAfter()  : int
Value in points.
getSpacingBefore()  : int
Value in points.
setAlignment()  : self
Set alignment.
setBulletStyle()  : self
Set bullet style.
setFont()  : self
Set font.
setHashIndex()  : $this
Set hash index.
setLineSpacing()  : self
Value in points.
setLineSpacingMode()  : self
setRichTextElements()  : self
Set Rich Text elements.
setSpacingAfter()  : self
Value in points.
setSpacingBefore()  : self
Value in points.

Constants

LINE_SPACING_MODE_PERCENT

public mixed LINE_SPACING_MODE_PERCENT = 'percent'

LINE_SPACING_MODE_POINT

public mixed LINE_SPACING_MODE_POINT = 'point'

Properties

$hashIndex

Hash index.

private int $hashIndex

$lineSpacingMode

private string $lineSpacingMode = self::LINE_SPACING_MODE_PERCENT

$spacingBefore

private int $spacingBefore = 0

Methods

__clone()

Magic Method : clone.

public __clone() : mixed

__construct()

Create a new \PhpOffice\PhpPresentation\Shape\RichText\Paragraph instance.

public __construct() : mixed

__toString()

Convert to string.

public __toString() : string
Return values
string

createText()

Create text (can not be formatted !).

public createText([string $pText = '' ]) : TextElement
Parameters
$pText : string = ''

Text

Return values
TextElement

createTextRun()

Create text run (can be formatted).

public createTextRun([string $pText = '' ]) : Run
Parameters
$pText : string = ''

Text

Return values
Run

getHashCode()

Get hash code.

public getHashCode() : string
Return values
string

Hash code

getHashIndex()

Get hash index.

public getHashIndex() : null|int

Note that this index may vary during script execution! Only reliable moment is while doing a write of a workbook and when changes are not allowed.

Return values
null|int

Hash index

getLineSpacing()

public getLineSpacing() : int
Return values
int

getLineSpacingMode()

public getLineSpacingMode() : string
Return values
string

getPlainText()

Get plain text.

public getPlainText() : string
Return values
string

getSpacingAfter()

Value in points.

public getSpacingAfter() : int
Return values
int

getSpacingBefore()

Value in points.

public getSpacingBefore() : int
Return values
int

setBulletStyle()

Set bullet style.

public setBulletStyle([Bullet|null $style = null ]) : self
Parameters
$style : Bullet|null = null
Return values
self

setFont()

Set font.

public setFont([null|Font $pFont = null ]) : self
Parameters
$pFont : null|Font = null

Font

Return values
self

setHashIndex()

Set hash index.

public setHashIndex(int $value) : $this

Note that this index may vary during script execution! Only reliable moment is while doing a write of a workbook and when changes are not allowed.

Parameters
$value : int

Hash index

Return values
$this

setLineSpacing()

Value in points.

public setLineSpacing(int $lineSpacing) : self
Parameters
$lineSpacing : int
Return values
self

setLineSpacingMode()

public setLineSpacingMode(string $lineSpacingMode) : self
Parameters
$lineSpacingMode : string
Return values
self

setRichTextElements()

Set Rich Text elements.

public setRichTextElements([array<string|int, TextElementInterface$pElements = [] ]) : self
Parameters
$pElements : array<string|int, TextElementInterface> = []

Array of elements

Return values
self

setSpacingAfter()

Value in points.

public setSpacingAfter(int $spacingAfter) : self
Parameters
$spacingAfter : int
Return values
self

setSpacingBefore()

Value in points.

public setSpacingBefore(int $spacingBefore) : self
Parameters
$spacingBefore : int
Return values
self

        
On this page

Search results