Skip to content

Commit cb3e211

Browse files
author
Michaël Dupont
committed
fix(documentation): snippet for FootnoteProperties
The documentation contained an incorrect code snippet for configuring FootnoteProperties. Now the code is valid.
1 parent 4852028 commit cb3e211

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

docs/elements.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -359,17 +359,17 @@ The footnote numbering can be controlled by setting the FootnoteProperties on th
359359

360360
.. code-block:: php
361361
362-
$fp = new PhpWord\SimpleType\FootnoteProperties();
362+
$fp = new \PhpOffice\PhpWord\ComplexType\FootnoteProperties();
363363
//sets the position of the footnote (pageBottom (default), beneathText, sectEnd, docEnd)
364-
$fp->setPos(FootnoteProperties::POSITION_DOC_END);
364+
$fp->setPos(\PhpOffice\PhpWord\ComplexType\FootnoteProperties::POSITION_BENEATH_TEXT);
365365
//set the number format to use (decimal (default), upperRoman, upperLetter, ...)
366-
$fp->setNumFmt(FootnoteProperties::NUMBER_FORMAT_LOWER_ROMAN);
366+
$fp->setNumFmt(\PhpOffice\PhpWord\SimpleType\NumberFormat::LOWER_ROMAN);
367367
//force starting at other than 1
368368
$fp->setNumStart(2);
369369
//when to restart counting (continuous (default), eachSect, eachPage)
370-
$fp->setNumRestart(FootnoteProperties::RESTART_NUMBER_EACH_PAGE);
370+
$fp->setNumRestart(\PhpOffice\PhpWord\ComplexType\FootnoteProperties::RESTART_NUMBER_EACH_PAGE);
371371
//And finaly, set it on the Section
372-
$section->setFootnoteProperties($properties);
372+
$section->setFootnoteProperties($fp);
373373
374374
Checkboxes
375375
----------

0 commit comments

Comments
 (0)