public function EntityUpdateManager::addTopLevelSource in Entity Usage 8.3
Adds a new top-level source to be tracked at the end of the request.
Parameters
\Drupal\Core\Entity\EntityInterface $entity: The entity we are tracking as top-level source entity.
string $operation: The operation being performed.
\Drupal\Core\Entity\EntityInterface $original: In update operations, the original entity.
File
- src/
EntityUpdateManager.php, line 115
Class
- EntityUpdateManager
- Class EntityUpdateManager.
Namespace
Drupal\entity_usageCode
public function addTopLevelSource(EntityInterface $entity, $operation, EntityInterface $original = NULL) {
$this->topLevelSources[] = [
'entity' => $entity,
'operation' => $operation,
'original' => $original,
];
}