protected function ContentEntityStorage::has in MongoDB 8
Determines if this entity already exists in storage.
Parameters
int|string $id: The original entity ID.
\Drupal\Core\Entity\EntityInterface $entity: The entity being saved.
Return value
bool
Overrides EntityStorageBase::has
File
- src/
Entity/ ContentEntityStorage.php, line 382 - Contains Drupal\mongodb\Entity\ContentEntityStorage.
Class
Namespace
Drupal\mongodb\EntityCode
protected function has($id, EntityInterface $entity) {
return !$entity
->isNew();
}