CSWhiteboardSections
in package
Tags
Table of Contents
- FIELD_NAME_SECTIONS = 'MAM_GUI_EDIT_ATTRIBUTE_SECTIONS_LABEL'
- __construct() : CSWhiteboardSections
- Creates a new sections container object and loads the section information from the corresponding whiteboard document or template.
- applySection() : CSWhiteboardSection
- Adds a new section to the corresponding document or updates an existing one.
- getPageNames() : array<string|int, mixed>
- Returns a list of page names for the whiteboard document. The list is sorted by the corresponding page indices in an ascending order, so that the list can be traversed in the natural order of the pages in the document.
- getParentDocument() : CSMamWbdFile|null
- Returns the whiteboard document that is associated with the current section container object.
- getSectionByPageId() : CSWhiteboardSection|null
- Retrieves the section object that has been applied explicitly to a specific page.
- getSectionEffectiveByPageId() : CSWhiteboardSection|null
- Retrieves the section object that is effective implicitly to a specific page (regarding page numbering).
- getSectionPageCount() : int
- Returns the number of pages that a specified section contains.
- getSections() : array<string|int, mixed>
- Retrieves a list of section objects, which have been applied to a whiteboard document.
- removeSection() : bool
- Removes a given section from the corresponding document. When deleting the last element, the list is being re-populated with a default section that starts on the very first page.
- removeSectionByPageId() : bool
- Removes the section that is directly defined for the specified page of the corresponding document.
- removeSectionEffectiveByPageId() : bool
- Removes the section that is effective for the specified page from the corresponding document.
Constants
FIELD_NAME_SECTIONS
public
mixed
FIELD_NAME_SECTIONS
= 'MAM_GUI_EDIT_ATTRIBUTE_SECTIONS_LABEL'
Tags
Methods
__construct()
Creates a new sections container object and loads the section information from the corresponding whiteboard document or template.
public
__construct(CSMamWbdFile $oWbdDocument) : CSWhiteboardSections
Parameters
- $oWbdDocument : CSMamWbdFile
-
The document object whose section information should be loaded.
Tags
Return values
CSWhiteboardSections —applySection()
Adds a new section to the corresponding document or updates an existing one.
public
applySection(CSWhiteboardSection $oWbdSection) : CSWhiteboardSection
Parameters
- $oWbdSection : CSWhiteboardSection
-
The section object to add.
Tags
Return values
CSWhiteboardSection —getPageNames()
Returns a list of page names for the whiteboard document. The list is sorted by the corresponding page indices in an ascending order, so that the list can be traversed in the natural order of the pages in the document.
public
getPageNames([bool $bUseDisplayNames = FALSE ]) : array<string|int, mixed>
Parameters
- $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> —An array of strings, containing the page names. The page names calculation is based on the section objects in the document and their associated properties (like the start page index, numbering style, etc.). The array keys designate the page IDs.
getParentDocument()
Returns the whiteboard document that is associated with the current section container object.
public
getParentDocument() : CSMamWbdFile|null
Tags
Return values
CSMamWbdFile|null —The whiteboard document that is associated with the current section container object.
getSectionByPageId()
Retrieves the section object that has been applied explicitly to a specific page.
public
getSectionByPageId(int $iPageId) : CSWhiteboardSection|null
If the section object is required that is effective for the specified page regarding page numbering, have a look at the method.
Parameters
- $iPageId : int
-
The ID of the page from which the section object should be retrieved.
Tags
Return values
CSWhiteboardSection|null —If a section directly starts on the specified page, the corresponding section object is returned. If the specified page is located between two section start markers and thus has no section object associated, the return value is NULL.
getSectionEffectiveByPageId()
Retrieves the section object that is effective implicitly to a specific page (regarding page numbering).
public
getSectionEffectiveByPageId(int $iPageId) : CSWhiteboardSection|null
If the page should be checked whether a section object has been applied to it directly, have a look at the method.
Parameters
- $iPageId : int
-
The ID of the page from which the effective section object should be retrieved.
Tags
Return values
CSWhiteboardSection|null —If a section directly starts on the specified page, the corresponding section object is returned. If the specified page is located between two section start markers and thus has no section object associated, a search is performed for the latest section that has been defined before the specified page. If no sections have been explicitly defined at all, the returned section object is a default section object, which is responsible for pagination of the whole document.
getSectionPageCount()
Returns the number of pages that a specified section contains.
public
getSectionPageCount(CSWhiteboardSection $oWbdSection) : int
Parameters
- $oWbdSection : CSWhiteboardSection
-
The section object whose page count should be determined.
Tags
Return values
int —The number of pages in the specified section.
getSections()
Retrieves a list of section objects, which have been applied to a whiteboard document.
public
getSections() : array<string|int, mixed>
The list is sorted by the corresponding start page indices in an ascending order, so that the list can be traversed in the natural order of the pages in the document.
Tags
Return values
array<string|int, mixed> —An array of CSWhiteboardSection objects, where the keys designate the IDs of the pages on which they are defined.
removeSection()
Removes a given section from the corresponding document. When deleting the last element, the list is being re-populated with a default section that starts on the very first page.
public
removeSection(CSWhiteboardSection $oWbdSection) : bool
Parameters
- $oWbdSection : CSWhiteboardSection
-
The section object to remove.
Tags
Return values
bool —TRUE, if the section was deleted successfully. FALSE, if the section object could not be found in the sections list.
removeSectionByPageId()
Removes the section that is directly defined for the specified page of the corresponding document.
public
removeSectionByPageId(int $iPageId) : bool
If no section is defined on the specified page, the call will not have any effect.
Parameters
- $iPageId : int
-
The ID of the page, whose effective section should be removed.
Tags
Return values
bool —TRUE, if the section was deleted successfully. FALSE, if no section object was defined on the specified page.
removeSectionEffectiveByPageId()
Removes the section that is effective for the specified page from the corresponding document.
public
removeSectionEffectiveByPageId(int $iPageId) : bool
When deleting the last element, the list is being re-populated with a default section that starts on the very first page.
Parameters
- $iPageId : int
-
The ID of the page, whose effective section should be removed.
Tags
Return values
bool —TRUE, if the section was deleted successfully. FALSE, if the section object could not be found in the sections list.
