예제 #1
0
 /**
  * {@inheritdoc}
  */
 public function submitForm(array &$form, FormStateInterface $form_state)
 {
     parent::submitForm($form, $form_state);
     $storage = $this->entityManager->getStorage('taxonomy_vocabulary');
     $vocabulary = $storage->load($this->entity->bundle());
     // @todo Move to storage http://drupal.org/node/1988712
     taxonomy_check_vocabulary_hierarchy($vocabulary, array('tid' => $this->entity->id()));
 }
예제 #2
0
 /**
  * {@inheritdoc}
  */
 public function submitForm(array &$form, FormStateInterface $form_state)
 {
     parent::submitForm($form, $form_state);
     /** @var \Drupal\Core\Entity\ContentEntityInterface $term */
     $term = $this->getEntity();
     if ($term->isDefaultTranslation()) {
         $storage = $this->entityManager->getStorage('taxonomy_vocabulary');
         $vocabulary = $storage->load($this->entity->bundle());
         // @todo Move to storage http://drupal.org/node/1988712
         taxonomy_check_vocabulary_hierarchy($vocabulary, array('tid' => $term->id()));
     }
 }