Advertisement
Guest User

Untitled

a guest
Oct 19th, 2017
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.52 KB | None | 0 0
  1.   // We use policy page content type for indexing taxonomies.
  2.   // See: EEAS-504.
  3.   if ($entity->type == 'eeas_policy_page') {
  4.     $term = taxonomy_term_load($entity->field_eeas_published_on[LANGUAGE_NONE][0]['tid']);
  5.     foreach ($term->description_field as $langcode => $translated_description) {
  6.       $document->addField('sm_policy_page_taxonomy_names', strip_tags($translated_description[0]['value']));
  7.       $document->addField('sm_policy_page_taxonomy_names', i18n_taxonomy_term_name($term, $langcode));
  8.     }
  9.   }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement