I always forget this and search for getDefinition on the entity storage class. What about a few words so we don't forget it? Yes I know it's doc'd on the entity manager interface but still this is so not clear from the naming.

CommentFileSizeAuthor
entitytype_is_def.patch569 byteschx
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jhodgdon’s picture

Status: Needs review » Reviewed & tested by the community

Sure!

Beta: Unfrozen docs-only change

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Committed 0a4aeec and pushed to 8.0.x. Thanks!

Thanks @jhodgdon for including a beta evaluation in #1.

diff --git a/core/lib/Drupal/Core/Entity/EntityStorageBase.php b/core/lib/Drupal/Core/Entity/EntityStorageBase.php
index 3915562..d4daa67 100644
--- a/core/lib/Drupal/Core/Entity/EntityStorageBase.php
+++ b/core/lib/Drupal/Core/Entity/EntityStorageBase.php
@@ -32,7 +32,7 @@
   /**
    * Information about the entity type.
    *
-   * The following code would return the same object:
+   * The following code returns the same object:
    * @code
    * \Drupal::entityManager()->getDefinition($this->entityTypeId)
    * @endcode

Fixed on commit.

  • alexpott committed 0a4aeec on 8.0.x
    Issue #2388863 by chx: Entity type is definition
    

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.