class PostImportEvent in YAML Content 8.2
Wraps a yaml content post-import event for event listeners.
Hierarchy
- class \Drupal\yaml_content\Event\EventBase extends \Symfony\Component\EventDispatcher\Event
- class \Drupal\yaml_content\Event\PostImportEvent
Expanded class hierarchy of PostImportEvent
1 file declares its use of PostImportEvent
- ContentLoaderBase.php in src/
ContentLoader/ ContentLoaderBase.php
File
- src/
Event/ PostImportEvent.php, line 10
Namespace
Drupal\yaml_content\EventView source
class PostImportEvent extends EventBase {
/**
* The list of content files imported in the completed batch.
*
* @var array
*/
protected $importFiles;
/**
* An associative array of imported content entities keyed by file name.
*
* @var array
*/
protected $loadedContent;
/**
* Constructs a yaml content post-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 imported in the completed batch.
* @param array $loaded_content
* An associative array of imported content entities keyed by file name.
*/
public function __construct(ContentLoaderInterface $loader, array $import_files, array $loaded_content) {
parent::__construct($loader);
$this->importFiles = $import_files;
}
/**
* Gets the list of files imported in the completed batch.
*
* @return array
* The list of content files imported in the completed batch.
*/
public function getImportFiles() {
return $this->importFiles;
}
/**
* Gets the list of imported content entities.
*
* @return array
* An associative array of imported content entities keyed by file name.
*/
public function getLoadedContent() {
return $this->loadedContent;
}
}
Members
Name![]() |
Modifiers | Type | Description | Overrides |
---|---|---|---|---|
EventBase:: |
protected | property | The ContentLoader being actively executed and triggering the event. | |
EventBase:: |
public | function | Gets the ContentLoader object that triggered the event. | |
PostImportEvent:: |
protected | property | The list of content files imported in the completed batch. | |
PostImportEvent:: |
protected | property | An associative array of imported content entities keyed by file name. | |
PostImportEvent:: |
public | function | Gets the list of files imported in the completed batch. | |
PostImportEvent:: |
public | function | Gets the list of imported content entities. | |
PostImportEvent:: |
public | function |
Constructs a yaml content post-import event object. Overrides EventBase:: |