changeStatusComments

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.