Mercurial > hg > isophonics-drupal-site
diff core/modules/taxonomy/src/Form/OverviewTerms.php @ 16:c2387f117808
Routine composer update
author | Chris Cannam |
---|---|
date | Tue, 10 Jul 2018 15:07:59 +0100 |
parents | 1fec387a4317 |
children | 129ea1e6d783 |
line wrap: on
line diff
--- a/core/modules/taxonomy/src/Form/OverviewTerms.php Thu Apr 26 11:26:54 2018 +0100 +++ b/core/modules/taxonomy/src/Form/OverviewTerms.php Tue Jul 10 15:07:59 2018 +0100 @@ -241,6 +241,11 @@ $form['terms'] = [ '#type' => 'table', '#empty' => $empty, + '#header' => [ + 'term' => $this->t('Name'), + 'operations' => $this->t('Operations'), + 'weight' => $this->t('Weight'), + ], '#attributes' => [ 'id' => 'taxonomy', ], @@ -251,6 +256,11 @@ // all terms. $change_weight_access = AccessResult::allowed(); foreach ($current_page as $key => $term) { + $form['terms'][$key] = [ + 'term' => [], + 'operations' => [], + 'weight' => [], + ]; /** @var $term \Drupal\Core\Entity\EntityInterface */ $term = $this->entityManager->getTranslationFromContext($term); $form['terms'][$key]['#term'] = $term; @@ -344,11 +354,8 @@ $row_position++; } - $form['terms']['#header'] = [$this->t('Name')]; - $this->renderer->addCacheableDependency($form['terms'], $change_weight_access); if ($change_weight_access->isAllowed()) { - $form['terms']['#header'][] = $this->t('Weight'); if ($parent_fields) { $form['terms']['#tabledrag'][] = [ 'action' => 'match', @@ -377,8 +384,6 @@ ]; } - $form['terms']['#header'][] = $this->t('Operations'); - if (($taxonomy_vocabulary->getHierarchy() !== VocabularyInterface::HIERARCHY_MULTIPLE && count($tree) > 1) && $change_weight_access->isAllowed()) { $form['actions'] = ['#type' => 'actions', '#tree' => FALSE]; $form['actions']['submit'] = [