You are here

class PreImportEvent in YAML Content 8.2

Wraps a yaml content pre-import event for event listeners.

Hierarchy

  • class \Drupal\yaml_content\Event\EventBase extends \Symfony\Component\EventDispatcher\Event

Expanded class hierarchy of PreImportEvent

1 file declares its use of PreImportEvent
ContentLoaderBase.php in src/ContentLoader/ContentLoaderBase.php

File

src/Event/PreImportEvent.php, line 10

Namespace

Drupal\yaml_content\Event
View source
class PreImportEvent extends EventBase {

  /**
   * The list of content files to be imported in the batch about to begin.
   *
   * @var array
   */
  protected $importFiles;

  /**
   * Constructs a yaml content pre-import event object.
   *
   * @param \Drupal\yaml_content\ContentLoader\ContentLoaderInterface $loader
   *   The active Content Loader that triggered the event.
   * @param array $import_files
   *   An array of files to be imported in the batch about to begin.
   */
  public function __construct(ContentLoaderInterface $loader, array &$import_files) {
    parent::__construct($loader);
    $this->importFiles = $import_files;
  }

  /**
   * Gets the list of files to be imported in the batch about to begin.
   *
   * @return array
   *   The list of content files to be imported in the batch about to begin.
   */
  public function getImportFiles() {
    return $this->importFiles;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
EventBase::$contentLoader protected property The ContentLoader being actively executed and triggering the event.
EventBase::getContentLoader public function Gets the ContentLoader object that triggered the event.
PreImportEvent::$importFiles protected property The list of content files to be imported in the batch about to begin.
PreImportEvent::getImportFiles public function Gets the list of files to be imported in the batch about to begin.
PreImportEvent::__construct public function Constructs a yaml content pre-import event object. Overrides EventBase::__construct