class ContentHubPublishEntitiesEvent in Acquia Content Hub 8.2
Event fired for publishing of entities.
Hierarchy
- class \Drupal\acquia_contenthub\Event\ContentHubPublishEntitiesEvent extends \Symfony\Component\EventDispatcher\Event
Expanded class hierarchy of ContentHubPublishEntitiesEvent
See also
\Drupal\acquia_contenthub_publisher\ContentHubPublisherEvents
2 files declare their use of ContentHubPublishEntitiesEvent
- ContentHubCommonActions.php in src/
ContentHubCommonActions.php - RemoveUnmodifiedEntities.php in modules/
acquia_contenthub_publisher/ src/ EventSubscriber/ PublishEntities/ RemoveUnmodifiedEntities.php
File
- src/
Event/ ContentHubPublishEntitiesEvent.php, line 13
Namespace
Drupal\acquia_contenthub\EventView source
class ContentHubPublishEntitiesEvent extends Event {
/**
* The key eneity uuid from which this set of entities was calculated.
*
* @var string
*/
protected $keyEntityUuid;
/**
* The dependency wrappers.
*
* @var \Drupal\depcalc\DependentEntityWrapperInterface[]
*/
protected $dependencies;
/**
* ContentHubPublishEntitiesEvent constructor.
*
* @param string $key_entity_uuid
* The key entity that this set of entities was calculated from.
* @param \Drupal\depcalc\DependentEntityWrapperInterface[] $dependencies
* The dependency wrappers.
*/
public function __construct($key_entity_uuid, DependentEntityWrapperInterface ...$dependencies) {
//@codingStandardsIgnoreLine
$this->keyEntityUuid = $key_entity_uuid;
foreach ($dependencies as $dependency) {
$this->dependencies[$dependency
->getUuid()] = $dependency;
}
}
/**
* Get the dependencies.
*
* @return \Drupal\depcalc\DependentEntityWrapperInterface[]
* The dependencies.
*/
public function getDependencies() {
return $this->dependencies;
}
/**
* Remove a specific dependency.
*
* @param string $uuid
* The uuid of the dependency to remove.
*/
public function removeDependency($uuid) {
// Don't allow the key entity to be removed.
if ($uuid != $this->keyEntityUuid) {
unset($this->dependencies[$uuid]);
}
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
ContentHubPublishEntitiesEvent:: |
protected | property | The dependency wrappers. | |
ContentHubPublishEntitiesEvent:: |
protected | property | The key eneity uuid from which this set of entities was calculated. | |
ContentHubPublishEntitiesEvent:: |
public | function | Get the dependencies. | |
ContentHubPublishEntitiesEvent:: |
public | function | Remove a specific dependency. | |
ContentHubPublishEntitiesEvent:: |
public | function | ContentHubPublishEntitiesEvent constructor. |