Contentserv PHP API

CSWhiteboardSection
in package

Tags

Table of Contents

ATTR_NAME_NUMMODE  = 'NumberingMode'
ATTR_NAME_NUMPREFIXINCLUDE  = 'NumberingIncludePrefix'
ATTR_NAME_NUMPREFIXSECTION  = 'NumberingSectionPrefix'
ATTR_NAME_NUMSECTIONMARKER  = 'NumberingSectionMarker'
ATTR_NAME_NUMSTARTINDEX  = 'NumberingStartIndex'
ATTR_NAME_NUMSTYLE  = 'NumberingStyle'
ATTR_NAME_STARTPAGEID  = 'StartPageId'
NUMMODE_AUTOMATIC  = 0
NUMMODE_MANUAL  = 1
NUMSTYLE_ARABIC  = \CSICM_NUMBERSTYLE_ARABIC
NUMSTYLE_ARABICZERODOUBLE  = \CSICM_NUMBERSTYLE_DOUBLE_LEADING_ZEROS
NUMSTYLE_ARABICZEROSINGLE  = \CSICM_NUMBERSTYLE_SINGLE_LEADING_ZEROS
NUMSTYLE_ARABICZEROTRIPLE  = \CSICM_NUMBERSTYLE_TRIPLE_LEADING_ZEROS
NUMSTYLE_LETTERSLOWER  = \CSICM_NUMBERSTYLE_LOWER_LETTERS
NUMSTYLE_LETTERSUPPER  = \CSICM_NUMBERSTYLE_UPPER_LETTERS
NUMSTYLE_ROMANLOWER  = \CSICM_NUMBERSTYLE_LOWER_ROMAN
NUMSTYLE_ROMANUPPER  = \CSICM_NUMBERSTYLE_UPPER_ROMAN
__construct()  : CSWhiteboardSection
Creates a single section object and initializes its internal properties with default values.
getNumberingMode()  : int
Returns the section's page numbering (== naming) mode.
getNumberingSectionMarker()  : string
Returns the section's marker.
getNumberingSectionPrefix()  : string
Returns the section prefix. This is being used in technical page names and where it is explicitly enabled.
getNumberingSectionPrefixInclude()  : bool
Reports the section prefix application status.
getNumberingStartIndex()  : int
Returns the start index being used for page numbering (== naming).
getNumberingStyle()  : int
Returns the section's page numbering (== naming) style.
getNumberingStyleName()  : string
Returns a dictionary key, which can be translated into a textual representation of a specific numbering style.
getNumberingStyles()  : array<string|int, mixed>
Returns a list of numbering styles supported for page numbering.
getPageNames()  : array<string|int, mixed>
Generates a list of page names for a specified range of pages in the section. Usually, this will be called from the {@link CSWhiteboardSections::getPageNames()} method in order to retrieve all page names for a complete whiteboard document.
getParentDocument()  : CSMamWbdFile|null
Returns the whiteboard document that is associated with the current section object.
getStartPageId()  : int
Returns the page ID of the page where the current section starts in the WBD document.
getStartPageIndex()  : int
Returns the page index of the page where the current section starts in the WBD document.
loadFromIcmSection()  : bool
Loads existing section information from an InDesign document's section object.
loadFromJsonArray()  : bool
Loads existing section information from an array.
saveToJsonArray()  : array<string|int, mixed>
Wraps all section information into an array, which can be serialized easily.

Constants

ATTR_NAME_NUMPREFIXINCLUDE

public mixed ATTR_NAME_NUMPREFIXINCLUDE = 'NumberingIncludePrefix'
Tags

ATTR_NAME_NUMPREFIXSECTION

public mixed ATTR_NAME_NUMPREFIXSECTION = 'NumberingSectionPrefix'
Tags

ATTR_NAME_NUMSECTIONMARKER

public mixed ATTR_NAME_NUMSECTIONMARKER = 'NumberingSectionMarker'
Tags

ATTR_NAME_NUMSTARTINDEX

public mixed ATTR_NAME_NUMSTARTINDEX = 'NumberingStartIndex'
Tags

NUMSTYLE_ARABICZERODOUBLE

public mixed NUMSTYLE_ARABICZERODOUBLE = \CSICM_NUMBERSTYLE_DOUBLE_LEADING_ZEROS
Tags

NUMSTYLE_ARABICZEROSINGLE

public mixed NUMSTYLE_ARABICZEROSINGLE = \CSICM_NUMBERSTYLE_SINGLE_LEADING_ZEROS
Tags

NUMSTYLE_ARABICZEROTRIPLE

public mixed NUMSTYLE_ARABICZEROTRIPLE = \CSICM_NUMBERSTYLE_TRIPLE_LEADING_ZEROS
Tags

NUMSTYLE_LETTERSLOWER

public mixed NUMSTYLE_LETTERSLOWER = \CSICM_NUMBERSTYLE_LOWER_LETTERS
Tags

NUMSTYLE_LETTERSUPPER

public mixed NUMSTYLE_LETTERSUPPER = \CSICM_NUMBERSTYLE_UPPER_LETTERS
Tags

NUMSTYLE_ROMANLOWER

public mixed NUMSTYLE_ROMANLOWER = \CSICM_NUMBERSTYLE_LOWER_ROMAN
Tags

NUMSTYLE_ROMANUPPER

public mixed NUMSTYLE_ROMANUPPER = \CSICM_NUMBERSTYLE_UPPER_ROMAN
Tags

Methods

__construct()

Creates a single section object and initializes its internal properties with default values.

public __construct(CSMamWbdFile $oWbdDocument) : CSWhiteboardSection
Parameters
$oWbdDocument : CSMamWbdFile

The owner document where the new section should belong to.

Tags
access

public

Return values
CSWhiteboardSection

getNumberingMode()

Returns the section's page numbering (== naming) mode.

public getNumberingMode() : int
Tags
access

public

Return values
int

One of the NUMMODE_* constants, indicating how the start page index is chosen during page numbering.

getNumberingSectionMarker()

Returns the section's marker.

public getNumberingSectionMarker() : string
Tags
access

public

Return values
string

The section marker, which is only effective in InDesign documents.

getNumberingSectionPrefix()

Returns the section prefix. This is being used in technical page names and where it is explicitly enabled.

public getNumberingSectionPrefix() : string
Tags
access

public

Return values
string

The section prefix, which in certain cases is prepended to the page name.

getNumberingSectionPrefixInclude()

Reports the section prefix application status.

public getNumberingSectionPrefixInclude() : bool
Tags
access

public

Return values
bool

TRUE, if the section prefix should be prepended even to non-technical (== display) page names. FALSE, if it should only be applied to display page names (e.g. in exported content, such as PDFs).

getNumberingStartIndex()

Returns the start index being used for page numbering (== naming).

public getNumberingStartIndex() : int

This might be different from the start page index returned by the method.

Tags
access

public

Return values
int

The page index that will be used as a starting point when pages are numbered.

getNumberingStyle()

Returns the section's page numbering (== naming) style.

public getNumberingStyle() : int
Tags
access

public

Return values
int

The numbering style for the current section, which controls how pages are named in the section. Will be one of the NUMSTYLE_* constants.

getNumberingStyleName()

Returns a dictionary key, which can be translated into a textual representation of a specific numbering style.

public static getNumberingStyleName(int $iNumberingStyle) : string
Parameters
$iNumberingStyle : int

The numbering style whose name should be retrieved. Should be one of the NUMSTYLE_* constants.

Tags
access

public

Return values
string

The dictionary key for the specified numbering style. If an unknown/invalid numbering style has been specified, the result is an empty string.

getNumberingStyles()

Returns a list of numbering styles supported for page numbering.

public static getNumberingStyles() : array<string|int, mixed>
Tags
access

public

Return values
array<string|int, mixed>

An array, where the keys designate the numbering styles by their respective NUMSTYLE_* constants. The values represent the dictionary keys, which can be translated into the number style names.

getPageNames()

Generates a list of page names for a specified range of pages in the section. Usually, this will be called from the {@link CSWhiteboardSections::getPageNames()} method in order to retrieve all page names for a complete whiteboard document.

public getPageNames(int $iPageIndexStart[, int $iPageCount = 1 ][, bool $bUseDisplayNames = FALSE ]) : array<string|int, mixed>
Parameters
$iPageIndexStart : int

The page index (== page number minus one) where the numbering should start at.

$iPageCount : int = 1

The number of page names to generate.

$bUseDisplayNames : bool = FALSE

If set to TRUE, the page names will be returned for displaying purposes (e.g. for rendering in PDF documents, etc.). If set to FALSE (default), the technical page names will be returned, which always include the section prefix (regardless of the "include prefix in page name" setting).

Tags
Return values
array<string|int, mixed>

getParentDocument()

Returns the whiteboard document that is associated with the current section object.

public getParentDocument() : CSMamWbdFile|null
Tags
access

public

Return values
CSMamWbdFile|null

The whiteboard document that is associated with the current section object.

getStartPageId()

Returns the page ID of the page where the current section starts in the WBD document.

public getStartPageId() : int
Tags
access

public

Return values
int

The page ID in the WBD document where the current section starts. The returned page ID is identical to the page ID from the same page in the INDD template that has been used to create the whiteboard.

getStartPageIndex()

Returns the page index of the page where the current section starts in the WBD document.

public getStartPageIndex() : int
Tags
access

public

Return values
int

The page index in the WBD document where the current section starts.

loadFromIcmSection()

Loads existing section information from an InDesign document's section object.

public loadFromIcmSection(CSIcmSection $oInddSection) : bool

Before transferring the values, the current section is initialized with default property values.

Parameters
$oInddSection : CSIcmSection

The source INDD section object, providing the section information to apply.

Tags
access

public

Return values
bool

Always TRUE on transfer success.

loadFromJsonArray()

Loads existing section information from an array.

public loadFromJsonArray(array<string|int, mixed> $amSectionInfo) : bool

Before transferring the values, the current section is initialized with default property values.

Parameters
$amSectionInfo : array<string|int, mixed>

An array containing the properties to load. ATTR_NAME_* constants should be used as the keys to identify the correct property name for the values to store.

Tags
access

public

Return values
bool

Always TRUE on transfer success.

saveToJsonArray()

Wraps all section information into an array, which can be serialized easily.

public saveToJsonArray() : array<string|int, mixed>
Tags
access

public

Return values
array<string|int, mixed>

An array, where the keys designate the section property names by their respective ATTR_NAME_* constants. This can be used to prepare serialization, e.g. using JSON.


        

Search results