class PostNodeSaveEvent in GatherContent 8.4
Same name and namespace in other branches
- 8.3 src/Event/PostNodeSaveEvent.php \Drupal\gathercontent\Event\PostNodeSaveEvent
Wraps a post node save event for event listeners.
Hierarchy
- class \Drupal\gathercontent\Event\PostNodeSaveEvent extends \Symfony\Component\EventDispatcher\Event
Expanded class hierarchy of PostNodeSaveEvent
2 files declare their use of PostNodeSaveEvent
- Importer.php in src/
Import/ Importer.php - MockGcEventSubscriber.php in tests/
modules/ gathercontent_test/ src/ EventSubscriber/ MockGcEventSubscriber.php
File
- src/
Event/ PostNodeSaveEvent.php, line 11
Namespace
Drupal\gathercontent\EventView source
class PostNodeSaveEvent extends Event {
/**
* Node object.
*
* @var \Drupal\node\NodeInterface
*/
protected $node;
/**
* Source fields.
*
* @var object
*/
protected $sourceValues;
/**
* Files fetched from GatherContent.
*
* @var array
*/
protected $files;
/**
* Constructs a post node save event object.
*
* @param \Drupal\node\NodeInterface $node
* Map plugin.
* @param object $sourceValues
* Source fields representing object in GatherContent.
* @param array $files
* Array of files fetched from GatherContent.
*/
public function __construct(NodeInterface $node, $sourceValues, array $files) {
$this->node = $node;
$this->sourceValues = $sourceValues;
$this->files = $files;
}
/**
* Gets the node object.
*
* @return \Drupal\node\NodeInterface
* The node object.
*/
public function getNode() {
return $this->node;
}
/**
* Gets the object of source fields.
*
* @return object
* Source fields.
*/
public function getSourceValues() {
return $this->sourceValues;
}
/**
* Gets the array of source files.
*
* @return array
* Source files.
*/
public function getFiles() {
return $this->files;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
PostNodeSaveEvent:: |
protected | property | Files fetched from GatherContent. | |
PostNodeSaveEvent:: |
protected | property | Node object. | |
PostNodeSaveEvent:: |
protected | property | Source fields. | |
PostNodeSaveEvent:: |
public | function | Gets the array of source files. | |
PostNodeSaveEvent:: |
public | function | Gets the node object. | |
PostNodeSaveEvent:: |
public | function | Gets the object of source fields. | |
PostNodeSaveEvent:: |
public | function | Constructs a post node save event object. |