Skip to content

Commit

Permalink
DGIR-44 : Change hook implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
Prashant-bd committed Nov 22, 2023
1 parent cdb9615 commit 5e3c030
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions islandora_entity_status.module
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ function islandora_entity_status_media_presave(MediaInterface $media) {
}

/**
* Implements hook_entity_update().
* Implements hook_ENTITY_TYPE_update().
*/
function islandora_entity_status_entity_update(EntityInterface $entity) {
function islandora_entity_status_islandora_object_update(EntityInterface $entity) {
// Check if the entity is a node with the bundle "islandora_object".
if ($entity->getEntityTypeId() == 'node' && $entity->bundle() == 'islandora_object') {
if ($entity->hasField(IslandoraUtils::MEDIA_OF_FIELD)) {
// Get the current node ID.
$nid = $entity->id();

Expand Down

0 comments on commit 5e3c030

Please sign in to comment.