From 7a91d0b53771edf4ee1782bad3aa9c6f855f13da Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Sun, 25 Dec 2022 00:06:17 +0100 Subject: [PATCH] test fixes and changes for release --- Admin/Install/Navigation.install.json | 2 +- Models/EditorDocType.php | 4 ++-- Theme/Backend/Components/Editor/TextView.php | 24 ++++++++++++++++++++ tests/Bootstrap.php | 19 ++++++++++++++++ 4 files changed, 46 insertions(+), 3 deletions(-) diff --git a/Admin/Install/Navigation.install.json b/Admin/Install/Navigation.install.json index 76c0fd6..51d1623 100755 --- a/Admin/Install/Navigation.install.json +++ b/Admin/Install/Navigation.install.json @@ -8,7 +8,7 @@ "uri": "{/lang}/{/app}/editor/list", "target": "self", "icon": null, - "order": 75, + "order": 20, "from": "Editor", "permission": { "permission": 2, "category": null, "element": null }, "parent": 1003301001, diff --git a/Models/EditorDocType.php b/Models/EditorDocType.php index 4475565..dd075ee 100755 --- a/Models/EditorDocType.php +++ b/Models/EditorDocType.php @@ -50,7 +50,7 @@ class EditorDocType implements \JsonSerializable * @var string|EditorDocTypeL11n * @since 1.0.0 */ - protected $title; + protected $title = ''; /** * Constructor. @@ -100,7 +100,7 @@ class EditorDocType implements \JsonSerializable { if ($title instanceof EditorDocTypeL11n) { $this->title = $title; - } elseif (isset($this->title) && $this->title instanceof EditorDocTypeL11n) { + } elseif ($this->title instanceof EditorDocTypeL11n) { $this->title->title = $title; } else { $this->title = new EditorDocTypeL11n(); diff --git a/Theme/Backend/Components/Editor/TextView.php b/Theme/Backend/Components/Editor/TextView.php index c091b6e..8802d9e 100755 --- a/Theme/Backend/Components/Editor/TextView.php +++ b/Theme/Backend/Components/Editor/TextView.php @@ -197,6 +197,30 @@ class TextView extends View return $this->printHtml($this->tplValue); } + /** + * Render template value path + * + * @return string + * + * @since 1.0.0 + */ + public function renderTplValuePath() : string + { + return $this->printHtml($this->tplValuePath); + } + + /** + * Render text value path + * + * @return string + * + * @since 1.0.0 + */ + public function renderTextValuePath() : string + { + return $this->printHtml($this->textValuePath); + } + /** * {@inheritdoc} */ diff --git a/tests/Bootstrap.php b/tests/Bootstrap.php index d46fd31..b5d36a8 100755 --- a/tests/Bootstrap.php +++ b/tests/Bootstrap.php @@ -257,6 +257,25 @@ $CONFIG = [ 'root' => '/', 'https' => false, ], + 'app' => [ + 'path' => __DIR__, + 'default' => [ + 'app' => 'Backend', + 'id' => 'backend', + 'lang' => 'en', + 'theme' => 'Backend', + 'org' => 1, + ], + 'domains' => [ + '127.0.0.1' => [ + 'app' => 'Backend', + 'id' => 'backend', + 'lang' => 'en', + 'theme' => 'Backend', + 'org' => 1, + ], + ], + ], 'socket' => [ 'master' => [ 'host' => '127.0.0.1',