File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
src/PhpWord/Writer/Word2007/Element Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change 25
25
*
26
26
* @since 0.12.0
27
27
* @link http://www.datypic.com/sc/ooxml/t-w_CT_SdtBlock.html
28
+ * @SuppressWarnings(PHPMD.UnusedPrivateMethod)
28
29
*/
29
30
class SDT extends Text
30
31
{
@@ -100,7 +101,9 @@ private function writeDropDownList(XMLWriter $xmlWriter, SDTElement $element)
100
101
*/
101
102
private function writeDate (XMLWriter $ xmlWriter , SDTElement $ element )
102
103
{
103
- $ xmlWriter ->startElement ("w:date " );
104
+ $ type = $ element ->getType ();
105
+
106
+ $ xmlWriter ->startElement ("w: {$ type }" );
104
107
$ xmlWriter ->writeElementBlock ('w:dateFormat ' , 'w:val ' , 'd/M/yyyy ' );
105
108
$ xmlWriter ->writeElementBlock ('w:lid ' , 'w:val ' , 'en-US ' );
106
109
$ xmlWriter ->writeElementBlock ('w:storeMappedDataAs ' , 'w:val ' , 'dateTime ' );
You can’t perform that action at this time.
0 commit comments