public function adminSummary() { // set up $this->valueOptions for the parent summary $this->valueOptions = array(); if ($this->value) { $this->value = array_filter($this->value); $terms = Term::loadMultiple($this->value); foreach ($terms as $term) { $this->valueOptions[$term->id()] = SafeMarkup::checkPlain(\Drupal::entityManager()->getTranslationFromContext($term)->label()); } } return parent::adminSummary(); }
public function adminSummary() { // set up $this->value_options for the parent summary $this->value_options = array(); if ($this->value) { $this->value = array_filter($this->value); $result = db_select('taxonomy_term_data', 'td')->fields('td')->condition('td.tid', $this->value)->execute(); foreach ($result as $term_record) { $this->value_options[$term_record->tid] = $term_record->name; } } return parent::adminSummary(); }