You are here

class ExportEvent in Default Content for D8 2.0.x

Same name and namespace in other branches
  1. 8 src/Event/ExportEvent.php \Drupal\default_content\Event\ExportEvent

Defines event fired when content is exported.

Hierarchy

  • class \Drupal\default_content\Event\ExportEvent extends \Symfony\Component\EventDispatcher\Event

Expanded class hierarchy of ExportEvent

See also

\Drupal\default_content\Event\DefaultContentEvents

1 file declares its use of ExportEvent
Exporter.php in src/Exporter.php

File

src/Event/ExportEvent.php, line 13

Namespace

Drupal\default_content\Event
View source
class ExportEvent extends Event {

  /**
   * The entity we're exporting.
   *
   * @var \Drupal\Core\Entity\ContentEntityInterface
   */
  protected $entity;

  /**
   * Constructs a new export event.
   *
   * @param \Drupal\Core\Entity\ContentEntityInterface $entity
   *   The exported content entity.
   */
  public function __construct(ContentEntityInterface $entity) {
    $this->entity = $entity;
  }

  /**
   * Get the entity we've exported.
   *
   * @return \Drupal\Core\Entity\ContentEntityInterface
   *   The exported content entity.
   */
  public function getExportedEntity() {
    return $this->entity;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
ExportEvent::$entity protected property The entity we're exporting.
ExportEvent::getExportedEntity public function Get the entity we've exported.
ExportEvent::__construct public function Constructs a new export event.