class EntityDataTamperEvent in Acquia Content Hub 8.2
The event dispatched to populate the DependencyStack without using CDF data.
Often times, objects may exist locally after the initial import. Data Tamper event subscribers can do a local lookup, and reference pre-existing content on a subscribing site. Likewise they can build maps to sane defaults, or event alter the content before it is imported.
Hierarchy
- class \Drupal\acquia_contenthub\Event\EntityDataTamperEvent extends \Symfony\Component\EventDispatcher\Event
Expanded class hierarchy of EntityDataTamperEvent
5 files declare their use of EntityDataTamperEvent
- AnonymousUser.php in src/
EventSubscriber/ EntityDataTamper/ AnonymousUser.php - AnonymousUserTest.php in tests/
src/ Kernel/ EventSubscriber/ EntityDataTamper/ AnonymousUserTest.php - DisabledEntity.php in modules/
acquia_contenthub_subscriber/ src/ EventSubscriber/ EntityDataTamper/ DisabledEntity.php - EntityCdfSerializer.php in src/
EntityCdfSerializer.php - ExistingEntity.php in modules/
acquia_contenthub_subscriber/ src/ EventSubscriber/ EntityDataTamper/ ExistingEntity.php
File
- src/
Event/ EntityDataTamperEvent.php, line 17
Namespace
Drupal\acquia_contenthub\EventView source
class EntityDataTamperEvent extends Event {
/**
* The CDF Array.
*
* @var \Acquia\ContentHubClient\CDFDocument
*/
protected $cdf;
/**
* The dependency stack.
*
* @var \Drupal\depcalc\DependencyStack
*/
protected $stack;
/**
* EntityDataTamperEvent constructor.
*
* @param \Acquia\ContentHubClient\CDFDocument $cdf
* The CDF array.
* @param \Drupal\depcalc\DependencyStack $stack
* The dependency stack.
*/
public function __construct(CDFDocument $cdf, DependencyStack $stack) {
$this->cdf = $cdf;
$this->stack = $stack;
}
/**
* Get the current CDF document.
*
* @return \Acquia\ContentHubClient\CDFDocument
* The CDF document.
*/
public function getCdf() {
return $this->cdf;
}
/**
* Set the CDF document.
*
* @param \Acquia\ContentHubClient\CDFDocument $cdf
* The CDF document.
*/
public function setCdf(CDFDocument $cdf) {
$this->cdf = $cdf;
}
/**
* Get the dependency stack.
*
* @return \Drupal\depcalc\DependencyStack
* The dependency stack.
*/
public function getStack() {
return $this->stack;
}
}
Members
Name![]() |
Modifiers | Type | Description | Overrides |
---|---|---|---|---|
EntityDataTamperEvent:: |
protected | property | The CDF Array. | |
EntityDataTamperEvent:: |
protected | property | The dependency stack. | |
EntityDataTamperEvent:: |
public | function | Get the current CDF document. | |
EntityDataTamperEvent:: |
public | function | Get the dependency stack. | |
EntityDataTamperEvent:: |
public | function | Set the CDF document. | |
EntityDataTamperEvent:: |
public | function | EntityDataTamperEvent constructor. |