public function ContentHubEntityDependency::appendDependencyChain in Acquia Content Hub 8
Tracks dependencies as a flat chain to combat dependency loops.
Parameters
\Drupal\acquia_contenthub\ContentHubEntityDependency $content_hub_entity: An entity to add to the chain.
Return value
$this The position of the entity in the chain or FALSE.
File
- src/
ContentHubEntityDependency.php, line 119
Class
- ContentHubEntityDependency
- Content Hub Dependency Class.
Namespace
Drupal\acquia_contenthubCode
public function appendDependencyChain(ContentHubEntityDependency $content_hub_entity) {
if (!in_array($content_hub_entity
->getUuid(), $this->dependencyChain)) {
$this->dependencyChain[] = $content_hub_entity
->getUuid();
}
return $this;
}