Skip to content

Commit 94a0510

Browse files
authored
Merge pull request #26 from dmstr/feature/plugin-asset-option
JsonEditorWidget: add registerPluginAsset option
2 parents bb108e8 + 345bb51 commit 94a0510

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/JsonEditorWidget.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,13 @@ class JsonEditorWidget extends BaseWidget
6565
*/
6666
public $language = null;
6767

68+
/**
69+
* if true JsonEditorPluginsAsset will be registered
70+
*
71+
* @var bool
72+
*/
73+
public $registerPluginAsset = false;
74+
6875
/**
6976
* If true, a hidden input will be rendered to contain the results
7077
* @var boolean
@@ -110,6 +117,9 @@ public function init()
110117
}
111118

112119
parent::init();
120+
if ($this->registerPluginAsset) {
121+
JsonEditorPluginsAsset::register($this->getView());
122+
}
113123
JsonEditorAsset::register($this->getView());
114124
}
115125

0 commit comments

Comments
 (0)