You are here

class PostImportEvent in GatherContent 8.4

Same name and namespace in other branches
  1. 8.3 src/Event/PostImportEvent.php \Drupal\gathercontent\Event\PostImportEvent

Wraps a post import event for event listeners.

Hierarchy

  • class \Drupal\gathercontent\Event\PostImportEvent extends \Symfony\Component\EventDispatcher\Event

Expanded class hierarchy of PostImportEvent

1 file declares its use of PostImportEvent
gathercontent.module in ./gathercontent.module
Main module file for GatherContent module.

File

src/Event/PostImportEvent.php, line 10

Namespace

Drupal\gathercontent\Event
View source
class PostImportEvent extends Event {

  /**
   * Array of arrays with successfully imported nids and their gc_ids.
   *
   * @var array
   */
  protected $successNodes;

  /**
   * Array of arrays with unsuccessfully imported nids and their gc_ids.
   *
   * @var array
   */
  protected $unsuccessNodes;

  /**
   * ID of operation.
   *
   * You can fetch \Drupal\gathercontent\Entity\Operation using this ID or you
   * can fetch all OperationItems related to Operation.
   *
   * @var int
   */
  protected $operationId;

  /**
   * Constructs a post import event object.
   *
   * @param array $success
   *   Array of arrays with successfully imported nids and their gc_ids.
   * @param array $unsuccess
   *   Array of arrays with unsuccessfully imported nids and their gc_ids.
   * @param string $operationId
   *   UUID of \Drupal\gathercontent\Entity\Operation entity.
   */
  public function __construct(array $success, array $unsuccess, $operationId) {
    $this->successNodes = $success;
    $this->unsuccessNodes = $unsuccess;
    $this->operationId = $operationId;
  }

  /**
   * Get array of arrays with successfully imported nodes.
   *
   * @return array
   *   Array of arrays with successfully imported nids and their gc_ids.
   */
  public function getSuccessNodes() {
    return $this->successNodes;
  }

  /**
   * Get array of arrays with unsuccessfully imported nodes.
   *
   * @return array
   *   Array of arrays with unsuccessfully imported nids and their gc_ids.
   */
  public function getUnsuccessNodes() {
    return $this->unsuccessNodes;
  }

  /**
   * Get operation ID property.
   *
   * @return string
   *   UUID of \Drupal\gathercontent\Entity\Operation entity
   */
  public function getOperationId() {
    return $this->operationId;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
PostImportEvent::$operationId protected property ID of operation.
PostImportEvent::$successNodes protected property Array of arrays with successfully imported nids and their gc_ids.
PostImportEvent::$unsuccessNodes protected property Array of arrays with unsuccessfully imported nids and their gc_ids.
PostImportEvent::getOperationId public function Get operation ID property.
PostImportEvent::getSuccessNodes public function Get array of arrays with successfully imported nodes.
PostImportEvent::getUnsuccessNodes public function Get array of arrays with unsuccessfully imported nodes.
PostImportEvent::__construct public function Constructs a post import event object.