class PreNodeSaveEvent in GatherContent 8.3
Same name and namespace in other branches
- 8.4 src/Event/PreNodeSaveEvent.php \Drupal\gathercontent\Event\PreNodeSaveEvent
Wraps a pre node save event for event listeners.
Hierarchy
- class \Drupal\gathercontent\Event\PreNodeSaveEvent extends \Symfony\Component\EventDispatcher\Event
Expanded class hierarchy of PreNodeSaveEvent
1 file declares its use of PreNodeSaveEvent
- gathercontent.module in ./
gathercontent.module - Main module file for GatherContent module.
File
- src/
Event/ PreNodeSaveEvent.php, line 11
Namespace
Drupal\gathercontent\EventView source
class PreNodeSaveEvent 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 pre 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 array 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 |
---|---|---|---|---|
PreNodeSaveEvent:: |
protected | property | Files fetched from GatherContent. | |
PreNodeSaveEvent:: |
protected | property | Node object. | |
PreNodeSaveEvent:: |
protected | property | Source fields. | |
PreNodeSaveEvent:: |
public | function | Gets the array of source files. | |
PreNodeSaveEvent:: |
public | function | Gets the node object. | |
PreNodeSaveEvent:: |
public | function | Gets the array of source fields. | |
PreNodeSaveEvent:: |
public | function | Constructs a pre node save event object. |