You are here

class AuditPreEntityDeleteEvent in Acquia Content Hub 8

Event fired before deleting an entity.

Class AuditPreEntityDeleteEvent.

Hierarchy

Expanded class hierarchy of AuditPreEntityDeleteEvent

2 files declare their use of AuditPreEntityDeleteEvent
ContentLockPreEntityDelete.php in acquia_contenthub_audit/src/EventSubscriber/ContentLockPreEntityDelete.php
SubscriberAudit.php in acquia_contenthub_audit/src/SubscriberAudit.php

File

acquia_contenthub_audit/src/Event/AuditPreEntityDeleteEvent.php, line 13

Namespace

Drupal\acquia_contenthub_audit\Event
View source
class AuditPreEntityDeleteEvent extends Event {

  /**
   * The entity about to be deleted.
   *
   * @var \Drupal\Core\Entity\ContentEntityInterface
   */
  protected $entity;

  /**
   * AuditPreEntityDeleteEvent constructor.
   *
   * @param \Drupal\Core\Entity\ContentEntityInterface $entity
   *   The entity that is about to be deleted.
   */
  public function __construct(ContentEntityInterface $entity) {
    $this->entity = $entity;
  }

  /**
   * The entity to be deleted.
   *
   * @return \Drupal\Core\Entity\ContentEntityInterface
   *   Entity.
   */
  public function getEntity() {
    return $this->entity;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
AuditPreEntityDeleteEvent::$entity protected property The entity about to be deleted.
AuditPreEntityDeleteEvent::getEntity public function The entity to be deleted.
AuditPreEntityDeleteEvent::__construct public function AuditPreEntityDeleteEvent constructor.