Skip to content

Commit

Permalink
DGIR-44 : Fix linting error
Browse files Browse the repository at this point in the history
  • Loading branch information
Prashant-bd committed Nov 16, 2023
1 parent 3cf07ac commit c00d526
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions islandora_entity_status.module
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* Hook implementations.
*/

use Drupal\Core\Entity\EntityInterface;
use Drupal\islandora\IslandoraUtils;
use Drupal\media\MediaInterface;
use Drupal\node\NodeInterface;
Expand All @@ -29,15 +30,15 @@ function islandora_entity_status_media_presave(MediaInterface $media) {
/**
* Implements hook_entity_update().
*/
function islandora_entity_status_entity_update(Drupal\Core\Entity\EntityInterface $entity) {
function islandora_entity_status_entity_update(EntityInterface $entity) {
// Check if the entity is a node with the bundle "islandora_object".
if ($entity->getEntityTypeId() == 'node' && $entity->bundle() == 'islandora_object') {
// Get the current node ID.
$nid = $entity->id();

// Query for media items that are associated with the current node.
$query = \Drupal::entityQuery('media')
->accessCheck(False)
->accessCheck(FALSE)
->condition(IslandoraUtils::MEDIA_OF_FIELD, $nid);
$media_ids = $query->execute();

Expand Down

0 comments on commit c00d526

Please sign in to comment.