summaryrefslogtreecommitdiffstats
path: root/core/modules/taxonomy/src/TermForm.php
diff options
context:
space:
mode:
Diffstat (limited to 'core/modules/taxonomy/src/TermForm.php')
-rw-r--r--core/modules/taxonomy/src/TermForm.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/core/modules/taxonomy/src/TermForm.php b/core/modules/taxonomy/src/TermForm.php
index 9d3c2cf..daa2868 100644
--- a/core/modules/taxonomy/src/TermForm.php
+++ b/core/modules/taxonomy/src/TermForm.php
@@ -30,7 +30,7 @@ class TermForm extends ContentEntityForm {
$form['relations'] = array(
'#type' => 'details',
'#title' => $this->t('Relations'),
- '#open' => $vocabulary->hierarchy == TAXONOMY_HIERARCHY_MULTIPLE,
+ '#open' => $vocabulary->getHierarchy() == TAXONOMY_HIERARCHY_MULTIPLE,
'#weight' => 10,
);
@@ -154,8 +154,8 @@ class TermForm extends ContentEntityForm {
}
// If we've increased the number of parents and this is a single or flat
// hierarchy, update the vocabulary immediately.
- elseif ($current_parent_count > $previous_parent_count && $vocabulary->hierarchy != TAXONOMY_HIERARCHY_MULTIPLE) {
- $vocabulary->hierarchy = $current_parent_count == 1 ? TAXONOMY_HIERARCHY_SINGLE : TAXONOMY_HIERARCHY_MULTIPLE;
+ elseif ($current_parent_count > $previous_parent_count && $vocabulary->getHierarchy() != TAXONOMY_HIERARCHY_MULTIPLE) {
+ $vocabulary->setHierarchy($current_parent_count == 1 ? TAXONOMY_HIERARCHY_SINGLE : TAXONOMY_HIERARCHY_MULTIPLE);
$vocabulary->save();
}