diff --git a/islandora_fits.module b/islandora_fits.module index eb5fff3f..e46557bb 100644 --- a/islandora_fits.module +++ b/islandora_fits.module @@ -1,4 +1,3 @@ - t('File Checksum'), - 'description' => t('Checksum as discovered by FITs webservice'), - 'weight' => 100, - 'visible' => TRUE, - ]; + $types = []; + foreach ($node_types as $node_type) { + $types[] = $node_type->get('type'); + } + + foreach ($types as $bundle) { + $fields = $entityFieldManager->getFieldDefinitions('node', $bundle); + if (array_key_exists('field_model', $fields) && array_key_exists('field_member_of', $fields)) { + $extra['node'][$bundle]['display']['islandora_fits_checksum'] = [ + 'label' => t('File Checksum'), + 'description' => t('Checksum as discovered by FITs webservice'), + 'weight' => 100, + 'visible' => TRUE, + ]; + } + } + return $extra; }