You are here

ImportEvent.php in Content Synchronizer 8

Same filename and directory in other branches
  1. 8.2 src/Events/ImportEvent.php
  2. 3.x src/Events/ImportEvent.php

File

src/Events/ImportEvent.php
View source
<?php

namespace Drupal\content_synchronizer\Events;

use Drupal\Core\Entity\Entity;
use Symfony\Component\EventDispatcher\Event;

/**
 * Import event.
 */
class ImportEvent extends Event {
  const ON_ENTITY_IMPORTER = 'content_synchronizer.on_entity_importer';

  /**
   * The imported entity.
   *
   * @var \Drupal\Core\Entity\Entity
   */
  protected $entity;

  /**
   * The entity gid.
   *
   * @var string
   */
  protected $gid;

  /**
   * Return the entity.
   *
   * @return \Drupal\Core\Entity\Entity
   *   THe entity.
   */
  public function getEntity() {
    return $this->entity;
  }

  /**
   * Set the entity.
   *
   * @param \Drupal\Core\Entity\Entity $entity
   *   THe entity.
   */
  public function setEntity(Entity $entity) {
    $this->entity = $entity;
  }

  /**
   * Return the entity gid.
   *
   * @return string
   *   The gid.
   */
  public function getGid() {
    return $this->gid;
  }

  /**
   * Set the gid.
   *
   * @param string $gid
   *   THe gid.
   */
  public function setGid($gid) {
    $this->gid = $gid;
  }

}

Classes

Namesort descending Description
ImportEvent Import event.