parseCheckboxes
- 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
parseCheckboxes
Ticks or unticks a checkbox in a Word template.
This method allows to modify the state of all the checkboxes of a given Word document.
It allows the modification of:
- legacy checkboxes
- Word 2010 checkboxes
The checkboxes are parsed sequentally, as they show in the Word document, and their final state is defined by the $checkboxes array of 0's and 1's (unchecked or checked respectively).
If the length of the $checkboxes array is shorter than the total number of checkboxes the "extra" one will be ignored and left in their current state.
source
The path to the Word document that you want to parse.
target
The path to the resulting Word document.
checkboxes
An array with possible values: 1 (tick) or 0 (untick).
In principle, this array should have as many entries as checkboxes in the Word document. If there are less the last checkboxes will be ignored and if there are more the extra values will be ignored.
Error while trying to open the (base) template as a zip file.
- phpdocx 14.0:
- return DOCXStructure.
- phpdocx 13.5:
- DOCXStructure and in-memory DOCX documents.