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
- class \Drupal\yaml_content\Event\PreImportEvent
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\EventView 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
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. | |
PreImportEvent:: |
protected | property | The list of content files to be imported in the batch about to begin. | |
PreImportEvent:: |
public | function | Gets the list of files to be imported in the batch about to begin. | |
PreImportEvent:: |
public | function |
Constructs a yaml content pre-import event object. Overrides EventBase:: |