class PruneCdfEntitiesEvent in Acquia Content Hub 8.2
Use to remove entities a subscriber does not want to import.
This event has some technical ramifications and requires a deep understanding of your dependencies. Removal of stand alone entities within the CDF object is completely ok and normal with this process, but is seldom necessary. If you are looking to replace an item slated for import with an existing local entity, look at the EntityDataTamperEvent instead.
Hierarchy
- class \Drupal\acquia_contenthub\Event\PruneCdfEntitiesEvent extends \Symfony\Component\EventDispatcher\Event
Expanded class hierarchy of PruneCdfEntitiesEvent
2 files declare their use of PruneCdfEntitiesEvent
- EntityCdfSerializer.php in src/
EntityCdfSerializer.php - HandleChannelLanguages.php in src/
EventSubscriber/ PruneCdf/ HandleChannelLanguages.php
File
- src/
Event/ PruneCdfEntitiesEvent.php, line 17
Namespace
Drupal\acquia_contenthub\EventView source
class PruneCdfEntitiesEvent extends Event {
/**
* The CDF object.
*
* @var \Acquia\ContentHubClient\CDF\CDFObject[]
*/
protected $cdf;
/**
* PruneCdfEntitiesEvent constructor.
*
* @param \Acquia\ContentHubClient\CDFDocument $cdf
* The CDF document.
*/
public function __construct(CDFDocument $cdf) {
$this->cdf = $cdf;
}
/**
* The CDF Objects to consider pruning.
*
* @return \Acquia\ContentHubClient\CDFDocument
* The CDF document.
*/
public function getCdf() {
return $this->cdf;
}
/**
* The list of pruned CDF objects.
*
* @param \Acquia\ContentHubClient\CDFDocument $cdf
* The CDF document.
*/
public function setCdf(CDFDocument $cdf) {
$this->cdf = $cdf;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
PruneCdfEntitiesEvent:: |
protected | property | The CDF object. | |
PruneCdfEntitiesEvent:: |
public | function | The CDF Objects to consider pruning. | |
PruneCdfEntitiesEvent:: |
public | function | The list of pruned CDF objects. | |
PruneCdfEntitiesEvent:: |
public | function | PruneCdfEntitiesEvent constructor. |