From 610d91e041fc53ef141faee97ab993909fff6f60 Mon Sep 17 00:00:00 2001 From: troosan Date: Wed, 8 Nov 2017 00:27:58 +0100 Subject: [PATCH] call parent constructor in SDT and FormField --- docs/styles.rst | 4 +++- src/PhpWord/Element/FormField.php | 1 + src/PhpWord/Element/SDT.php | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/styles.rst b/docs/styles.rst index 4f4926a8..f223574f 100644 --- a/docs/styles.rst +++ b/docs/styles.rst @@ -45,6 +45,7 @@ Available Font style options: - ``color``. Font color, e.g. *FF0000*. - ``doubleStrikethrough``. Double strikethrough, *true* or *false*. - ``fgColor``. Font highlight color, e.g. *yellow*, *green*, *blue*. + See ``\PhpOffice\PhpWord\Style\Font::FGCOLOR_...`` constants for more values - ``hint``. Font content type, *default*, *eastAsia*, or *cs*. - ``italic``. Italic, *true* or *false*. - ``name``. Font name, e.g. *Arial*. @@ -54,7 +55,8 @@ Available Font style options: - ``strikethrough``. Strikethrough, *true* or *false*. - ``subScript``. Subscript, *true* or *false*. - ``superScript``. Superscript, *true* or *false*. -- ``underline``. Underline, *dash*, *dotted*, etc. +- ``underline``. Underline, *single*, *dash*, *dotted*, etc. + See ``\PhpOffice\PhpWord\Style\Font::UNDERLINE_...`` constants for more values - ``lang``. Language, either a language code like *en-US*, *fr-BE*, etc. or an object (or as an array) if you need to set eastAsian or bidirectional languages See ``\PhpOffice\PhpWord\Style\Language`` class for some language codes. diff --git a/src/PhpWord/Element/FormField.php b/src/PhpWord/Element/FormField.php index 1e3e182c..598d61dc 100644 --- a/src/PhpWord/Element/FormField.php +++ b/src/PhpWord/Element/FormField.php @@ -73,6 +73,7 @@ class FormField extends Text */ public function __construct($type, $fontStyle = null, $paragraphStyle = null) { + parent::__construct(null, $fontStyle, $paragraphStyle); $this->setType($type); } diff --git a/src/PhpWord/Element/SDT.php b/src/PhpWord/Element/SDT.php index 6d4207b7..86f445cc 100644 --- a/src/PhpWord/Element/SDT.php +++ b/src/PhpWord/Element/SDT.php @@ -68,6 +68,7 @@ class SDT extends Text */ public function __construct($type, $fontStyle = null, $paragraphStyle = null) { + parent::__construct(null, $fontStyle, $paragraphStyle); $this->setType($type); }