public function EntityEmbedCollector::onCalculateDependencies in Dependency Calculation 8
Calculates entities embedded into the text areas of other entities.
Parameters
\Drupal\depcalc\Event\CalculateEntityDependenciesEvent $event: The CalculateEntityDependenciesEvent event.
Throws
\Drupal\Component\Plugin\Exception\InvalidPluginDefinitionException
\Drupal\Component\Plugin\Exception\PluginNotFoundException
File
- src/
EventSubscriber/ DependencyCollector/ EntityEmbedCollector.php, line 37
Class
- EntityEmbedCollector
- Class EntityEmbedCollector.
Namespace
Drupal\depcalc\EventSubscriber\DependencyCollectorCode
public function onCalculateDependencies(CalculateEntityDependenciesEvent $event) {
if (!\Drupal::moduleHandler()
->moduleExists('entity_embed')) {
return;
}
$this
->extractEmbeddedEntities($event
->getEntity(), $event);
}