Skip to content

Commit

Permalink
DDST-382: Comment update
Browse files Browse the repository at this point in the history
  • Loading branch information
Prashant-bd committed Jul 29, 2024
1 parent bca65aa commit a8cbd06
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/IslandoraNodeDeleteSubscriber.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
use Drupal\Core\Entity\EntityTypeManagerInterface;
use Drupal\node\NodeInterface;

/**
* Subscriber to handle deletion of related Embargoes when a node is deleted.
*/
class IslandoraNodeDeleteSubscriber {

/**
Expand All @@ -25,13 +28,12 @@ public function __construct(EntityTypeManagerInterface $entity_type_manager) {
}

/**
* Deletes the associated custom entity.
* Deletes the associated embargos.
*
* @param \Drupal\node\NodeInterface $node
* The Islandora object node being deleted.
*/
public function deleteAssociatedCustomEntity(NodeInterface $node): void {
// Replace 'your_custom_entity_type' with the actual machine name of your custom entity type.
$custom_entity_storage = $this->entityTypeManager->getStorage('embargo');
$custom_entities = $custom_entity_storage->loadByProperties(['embargoed_node' => $node->id()]);

Expand Down

0 comments on commit a8cbd06

Please sign in to comment.