protected function EntityCdfSerializer::entityIsProcessable in Acquia Content Hub 8.2
Checks dependencies of a CDF entry to determine if it can be processed.
CDF entries are turned into Drupal entities. This can only be done when all the dependencies of an entry have been created. This method checks dependencies to ensure they've been properly converted into Drupal entities before proceeding with processing an entry.
Parameters
\Acquia\ContentHubClient\CDF\CDFObject $object: The CDF Object.
\Drupal\depcalc\DependencyStack $stack: The dependency stack.
Return value
bool Whether a CDF entry is processable or is not.
1 call to EntityCdfSerializer::entityIsProcessable()
- EntityCdfSerializer::processCdf in src/
EntityCdfSerializer.php - Processes incoming CDF.
File
- src/
EntityCdfSerializer.php, line 191
Class
- EntityCdfSerializer
- Serialize an entity to a CDF format.
Namespace
Drupal\acquia_contenthubCode
protected function entityIsProcessable(CDFObject $object, DependencyStack $stack) {
foreach (array_keys($object
->getDependencies()) as $dependency_uuid) {
if (!$stack
->hasDependency($dependency_uuid)) {
return FALSE;
}
}
return TRUE;
}