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
Tags 8.x-1.0-alpha1
No related merge requests found
......@@ -37,7 +37,7 @@
}
},
themes: {
dots: dots,
dots: dots === '1',
name: theme
},
'check_callback' : true,
......
......@@ -29,19 +29,17 @@ class HmDisplayJstree extends HmDisplayPluginBase implements HmDisplayPluginInte
}
// The jsTree theme.
$theme = 'default';
$dot = '';
if (isset($options->theme)) {
if (isset($options->theme->name)) {
// The name of the theme.
$theme = $options->theme->name;
}
else {
$theme = 'default';
}
if (isset($options->theme->dot)) {
$dot = $options->theme->dot;
}
else {
$dot = TRUE;
// The dot line setting.
$dot = $options->theme->dot ? '1' : '0';
}
}
......
......@@ -13,7 +13,7 @@ interface HmDisplayPluginInterface extends PluginInspectionInterface {
/*
* 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.
......
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