Skip to content
Snippets Groups Projects
Commit 2e1c6278 authored by Mingsong's avatar Mingsong
Browse files

Fix bugs for empty display profile configuration

parent e4534dc2
No related branches found
No related tags found
No related merge requests found
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
} }
}, },
themes: { themes: {
dots: dots, dots: dots === '1',
name: theme name: theme
}, },
'check_callback' : true, 'check_callback' : true,
......
...@@ -29,19 +29,17 @@ class HmDisplayJstree extends HmDisplayPluginBase implements HmDisplayPluginInte ...@@ -29,19 +29,17 @@ class HmDisplayJstree extends HmDisplayPluginBase implements HmDisplayPluginInte
} }
// The jsTree theme. // The jsTree theme.
$theme = 'default';
$dot = '';
if (isset($options->theme)) { if (isset($options->theme)) {
if (isset($options->theme->name)) { if (isset($options->theme->name)) {
// The name of the theme.
$theme = $options->theme->name; $theme = $options->theme->name;
} }
else {
$theme = 'default';
}
if (isset($options->theme->dot)) { if (isset($options->theme->dot)) {
$dot = $options->theme->dot; // The dot line setting.
} $dot = $options->theme->dot ? '1' : '0';
else {
$dot = TRUE;
} }
} }
......
...@@ -13,7 +13,7 @@ interface HmDisplayPluginInterface extends PluginInspectionInterface { ...@@ -13,7 +13,7 @@ interface HmDisplayPluginInterface extends PluginInspectionInterface {
/* /*
* Build the tree form. * Build the tree form.
*/ */
public function getForm(string $url_source, string $url_update, array &$form = [], FormStateInterface &$form_state = NULL, array $options = []); public function getForm(string $url_source, string $url_update, array &$form = [], FormStateInterface &$form_state = NULL, $options = NULL);
/** /**
* Build the data array that JS library accepts. * Build the data array that JS library accepts.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment