Unverified Commit 52fdfaa5 authored by Alex Pott's avatar Alex Pott
Browse files

Issue #2962304 by Sam152: EntityPublishedTrait should use getEntityKey for better performance

parent 8f8942bd
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -45,8 +45,7 @@ public static function publishedBaseFieldDefinitions(EntityTypeInterface $entity
   * {@inheritdoc}
   */
  public function isPublished() {
    $key = $this->getEntityType()->getKey('published');
    return (bool) $this->get($key)->value;
    return (bool) $this->getEntityKey('published');
  }

  /**