changeStatusComments
- addBibliography
- addBookmark
- addBreak
- addChart
- addCitation
- addComment
- addCrossReference
- addDateAndHour
- addEndnote
- addExternalFile
- addFootnote
- addFormElement
- addHeading
- addImage
- addLink
- addList
- addMathEquation
- addMergeField
- addOLE
- addOnlineVideo
- addPageNumber
- addShape
- addSimpleField
- addSource
- addStructuredDocumentTag
- addSVG
- addTab
- addTable
- addTableContents
- addTableFigures
- addText
- addTextBox
- addWordFragment
- addWordML
- embedHTML
- addBackgroundImage
- addFooter
- addFooterSection
- addHeader
- addHeaderSection
- addLineNumbering
- addMacroFromDoc
- addPageBorders
- addProperties
- addSection
- createDocx
- createDocxAndDownload
- createCharacterStyle
- createListStyle
- createParagraphStyle
- createTableStyle
- docxSettings
- embedFont
- importChartStyle
- importHeadersAndFooters
- importListStyle
- importStyles
- importStylesWordDefault
- modifyPageLayout
- parseStyles
- removeFooters
- removeHeaders
- setBackgroundColor
- setDecimalSymbol
- setDefaultFont
- setDocumentDefaultStyles
- setEncodeUTF8
- setLanguage
- setMarkAsFinal
- setRTL
- clearBlocks
- cloneBlock
- deleteBlock
- getTemplateVariables
- getTemplateVariablesType
- modifyInputFields
- modifyMergeFields
- processTemplate
- removeTemplateVariable
- removeTemplateVariableImage
- replaceBlock
- replaceListVariable
- replacePlaceholderImage
- replaceTableVariable
- replaceVariableByExternalFile
- replaceVariableByHtml
- replaceVariableByText
- replaceVariableByWordFragment
- replaceVariableByWordML
- setTemplateSymbol
- setTemplateBlockSymbol
- tickCheckboxes
changeStatusComments
ADVANCED / PREMIUM
TRIAL
Sets a comment as completed or not completed.
Description
public changeStatusComments (string $source, string $target, array $reference, array $statusComments)
This method allows you to set a comment as completed or not completed. Compatible with MS Word 2013 and newer.
Parameters
source
Path to the Word document.
target
Path to the resulting document.
referenceNode
An array to get the refence node.
The possible keys and values of this array are:
Key | Type | Description |
---|---|---|
contains | string | Contains a text string. |
occurrence | int | Exact occurrence (int) or range of contents (e.g.: 2..9, 2.., ..9) (string) or first() or last(). If empty iterate all elements. |
customQuery | string | Custom xpath query, overwrites any other reference. |
statusComments
An array of true (completed) or false (not completed) values.
Exceptions
Error while trying to open the (base) template as a zip file.
No comments file.
No commentsExtended file.
Code samples
Example #1
Release notes
- phpdocx 13.0:
- in-memory DOCX documents.
- phpdocx 8.5:
- new method.