call parent constructor in SDT and FormField

This commit is contained in:
troosan 2017-11-08 00:27:58 +01:00
parent 0bd396b5cb
commit 610d91e041
3 changed files with 5 additions and 1 deletions

View File

@ -45,6 +45,7 @@ Available Font style options:
- ``color``. Font color, e.g. *FF0000*. - ``color``. Font color, e.g. *FF0000*.
- ``doubleStrikethrough``. Double strikethrough, *true* or *false*. - ``doubleStrikethrough``. Double strikethrough, *true* or *false*.
- ``fgColor``. Font highlight color, e.g. *yellow*, *green*, *blue*. - ``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*. - ``hint``. Font content type, *default*, *eastAsia*, or *cs*.
- ``italic``. Italic, *true* or *false*. - ``italic``. Italic, *true* or *false*.
- ``name``. Font name, e.g. *Arial*. - ``name``. Font name, e.g. *Arial*.
@ -54,7 +55,8 @@ Available Font style options:
- ``strikethrough``. Strikethrough, *true* or *false*. - ``strikethrough``. Strikethrough, *true* or *false*.
- ``subScript``. Subscript, *true* or *false*. - ``subScript``. Subscript, *true* or *false*.
- ``superScript``. Superscript, *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 - ``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. See ``\PhpOffice\PhpWord\Style\Language`` class for some language codes.

View File

@ -73,6 +73,7 @@ class FormField extends Text
*/ */
public function __construct($type, $fontStyle = null, $paragraphStyle = null) public function __construct($type, $fontStyle = null, $paragraphStyle = null)
{ {
parent::__construct(null, $fontStyle, $paragraphStyle);
$this->setType($type); $this->setType($type);
} }

View File

@ -68,6 +68,7 @@ class SDT extends Text
*/ */
public function __construct($type, $fontStyle = null, $paragraphStyle = null) public function __construct($type, $fontStyle = null, $paragraphStyle = null)
{ {
parent::__construct(null, $fontStyle, $paragraphStyle);
$this->setType($type); $this->setType($type);
} }