Skip to content

Commit 9379f98

Browse files
authored
Clarify contract of EntityDocument::isEmpty (#743)
1 parent d0e42ae commit 9379f98

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/Entity/EntityDocument.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,11 @@ public function getId();
4747
public function setId( $id );
4848

4949
/**
50-
* Returns true if the entity has no content. Having an id set does not count as having content.
50+
* An entity is considered empty if it does not contain any content that can be removed. Having
51+
* an ID set never counts as having content.
52+
*
53+
* Knowing if an entity is empty is relevant when, for example, moving or merging entities and
54+
* code wants to make sure all content is transferred from the old to the new entity.
5155
*
5256
* @since 4.3
5357
*

0 commit comments

Comments
 (0)