Skip to content

Commit

Permalink
Temporarily remove PUID data source to avoid error reported in #6.
Browse files Browse the repository at this point in the history
  • Loading branch information
mjordan committed Apr 25, 2020
1 parent b64bb9e commit 1b299b0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
5 changes: 3 additions & 2 deletions media_formats_reports.services.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@ services:
# Datasource services.
media_formats_reports.datasource.mimetype:
class: Drupal\media_formats_reports\Plugin\DataSource\MimeType
media_formats_reports.datasource.puid:
class: Drupal\media_formats_reports\Plugin\DataSource\Puid
# Temporarily removed pending https://github.com/mjordan/media_formats_reports/issues/6
# media_formats_reports.datasource.puid:
# class: Drupal\media_formats_reports\Plugin\DataSource\Puid
10 changes: 6 additions & 4 deletions src/Utils.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,13 @@ public function getServices($ids_only = FALSE) {
$services = $container->getServiceIds();
$services = preg_grep("/media_formats_reports\.datasource\./", $services);

// Temporary disable the FITS data source pending https://github.com/mjordan/media_formats_reports/issues/6
unset($services['puid']);
// If the Islandora FITS module is not enabled, don't show the PUID report option.
$module_handler = \Drupal::service('module_handler');
if (!$module_handler->moduleExists('islandora_fits')) {
unset($services['puid']);
}
// $module_handler = \Drupal::service('module_handler');
// if (!$module_handler->moduleExists('islandora_fits')) {
// unset($services['puid']);
// }

if ($ids_only) {
$service_ids_to_return = [];
Expand Down

0 comments on commit 1b299b0

Please sign in to comment.