' . t('About') . ''; $output .= '

' . t('Islandora Herbarium') . '

'; return $output; default: } } /** * Implements hook_entity_presave(). */ function islandora_herbarium_object_entity_presave(Drupal\Core\Entity\EntityInterface $entity) { if ($entity->bundle() == 'islandora_herbarium_object') { // Get the geo data. $geo = \Drupal::service('islandora_herbarium_object.geoparser'); $geo->updateEntity($entity); // Get the taxonomy data. $taxon = \Drupal::service('islandora_herbarium_object.taxonparser'); $taxon->updateEntity($entity); $title = $taxon->getValue('canonicalName') . ' - ' . $geo->getValue('name'); if(!empty($title)) { $entity->setTitle($title); } } }