diff options
author | Alex Pott | 2018-05-01 08:37:14 (GMT) |
---|---|---|
committer | Alex Pott | 2018-05-01 08:37:14 (GMT) |
commit | 52fdfaa5f8d6bf6891a36ae03c2797750331014e (patch) | |
tree | 606b46951030de1d1e9287487e3cc435b0111bfa | |
parent | 8f8942bd66f388eb3cd8e834a8b6e8dab55dac81 (diff) |
Issue #2962304 by Sam152: EntityPublishedTrait should use getEntityKey for better performance
-rw-r--r-- | core/lib/Drupal/Core/Entity/EntityPublishedTrait.php | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/core/lib/Drupal/Core/Entity/EntityPublishedTrait.php b/core/lib/Drupal/Core/Entity/EntityPublishedTrait.php index eb4d82e..1f36625 100644 --- a/core/lib/Drupal/Core/Entity/EntityPublishedTrait.php +++ b/core/lib/Drupal/Core/Entity/EntityPublishedTrait.php @@ -45,8 +45,7 @@ trait EntityPublishedTrait { * {@inheritdoc} */ public function isPublished() { - $key = $this->getEntityType()->getKey('published'); - return (bool) $this->get($key)->value; + return (bool) $this->getEntityKey('published'); } /** |