diff --git a/src/PHPDraft/Model/Elements/DataStructureElement.php b/src/PHPDraft/Model/Elements/DataStructureElement.php
index 0ab175b7..090b25ee 100644
--- a/src/PHPDraft/Model/Elements/DataStructureElement.php
+++ b/src/PHPDraft/Model/Elements/DataStructureElement.php
@@ -158,6 +158,7 @@ function __toString()
if (is_string($object)
|| get_class($object) === self::class
|| get_class($object) === ArrayStructureElement::class
+ || get_class($object) === RequestBodyElement::class
|| get_class($object) === EnumStructureElement::class
)
{
@@ -171,7 +172,7 @@ function __toString()
}
$type = (!in_array($this->type, self::DEFAULTS)) ?
- '' . $this->type . '' : '' . $this->type . '
';
+ '' . $this->type . '' : '' . $this->type . '
';
if (is_null($this->value))
{
@@ -179,7 +180,7 @@ function __toString()
}
else
{
- if (is_object($this->value) && self::class === get_class($this->value))
+ if (is_object($this->value) && (self::class === get_class($this->value) || RequestBodyElement::class === get_class($this->value)))
{
$value = '
'; + var_dump($this->struct); + echo ''; continue; } elseif ($value->element === 'asset') @@ -117,6 +120,7 @@ private function parse_structure($objects) $this->struct[] = $struct; } + } /** diff --git a/src/PHPDraft/Model/HierarchyElement.php b/src/PHPDraft/Model/HierarchyElement.php index db9f07a4..79e5dbff 100644 --- a/src/PHPDraft/Model/HierarchyElement.php +++ b/src/PHPDraft/Model/HierarchyElement.php @@ -84,6 +84,6 @@ public function get_href() $seperator = '-'; $prep = ($this->parent !== NULL) ? $this->parent->get_href() . $seperator : ''; - return $prep . str_replace(' ', $seperator, strtolower($this->title)); + return $prep . str_replace(' ', '__', strtolower($this->title)); } } \ No newline at end of file diff --git a/src/PHPDraft/Out/HTML/default.php b/src/PHPDraft/Out/HTML/default.php index dd61b831..bcb29031 100644 --- a/src/PHPDraft/Out/HTML/default.php +++ b/src/PHPDraft/Out/HTML/default.php @@ -90,7 +90,7 @@ class="pull-right = $this->get_method_icon($transition->get_method()); ?>"> base_structures as $key => $structure): ?>
= $value; ?>+
= $value; ?>@@ -262,23 +265,23 @@ class="value">= $value; ?> - base_structures) > 0):?> -