You are here

class ContentCrudEvent in Tome 8

Wraps a content event for listeners.

Hierarchy

  • class \Drupal\tome_sync\Event\ContentCrudEvent extends \Symfony\Component\EventDispatcher\Event

Expanded class hierarchy of ContentCrudEvent

3 files declare their use of ContentCrudEvent
ContentHasherEventSubscriber.php in modules/tome_sync/src/EventSubscriber/ContentHasherEventSubscriber.php
Exporter.php in modules/tome_sync/src/Exporter.php
Importer.php in modules/tome_sync/src/Importer.php

File

modules/tome_sync/src/Event/ContentCrudEvent.php, line 11

Namespace

Drupal\tome_sync\Event
View source
class ContentCrudEvent extends Event {

  /**
   * Content object.
   *
   * @var \Drupal\Core\Entity\ContentEntityInterface
   */
  protected $content;

  /**
   * Constructs a CollectPathsEvent object.
   *
   * @param \Drupal\Core\Entity\ContentEntityInterface $content
   *   Content object.
   */
  public function __construct(ContentEntityInterface $content) {
    $this->content = $content;
  }

  /**
   * Gets the content object.
   *
   * @return \Drupal\Core\Entity\ContentEntityInterface
   *   The content object that caused the event to fire.
   */
  public function getContent() {
    return $this->content;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
ContentCrudEvent::$content protected property Content object.
ContentCrudEvent::getContent public function Gets the content object.
ContentCrudEvent::__construct public function Constructs a CollectPathsEvent object.