|
|
|
@ -379,6 +379,11 @@ function islandora_entity_extra_field_info() { |
|
|
|
* Implements hook_entity_view(). |
|
|
|
* Implements hook_entity_view(). |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
function islandora_entity_view(array &$build, EntityInterface $entity, EntityViewDisplayInterface $display, $view_mode) { |
|
|
|
function islandora_entity_view(array &$build, EntityInterface $entity, EntityViewDisplayInterface $display, $view_mode) { |
|
|
|
|
|
|
|
$config_factory = \Drupal::service('config.factory')->get(IslandoraSettingsForm::CONFIG_NAME); |
|
|
|
|
|
|
|
$gemini_url = $config_factory->get(IslandoraSettingsForm::GEMINI_URL); |
|
|
|
|
|
|
|
$pseudo_fields = $config_factory->get(IslandoraSettingsForm::GEMINI_PSEUDO); |
|
|
|
|
|
|
|
// If we aren't configured then don't display. |
|
|
|
|
|
|
|
if (!empty($gemini_url) && count($pseudo_fields) > 0) { |
|
|
|
$route_match_item = \Drupal::routeMatch()->getParameters()->all(); |
|
|
|
$route_match_item = \Drupal::routeMatch()->getParameters()->all(); |
|
|
|
// Get the parameter, which might be node, media or taxonomy term. |
|
|
|
// Get the parameter, which might be node, media or taxonomy term. |
|
|
|
$current_entity = reset($route_match_item); |
|
|
|
$current_entity = reset($route_match_item); |
|
|
|
@ -408,6 +413,7 @@ function islandora_entity_view(array &$build, EntityInterface $entity, EntityVie |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
|