Unverified Commit 52fdfaa5 authored by alexpott's avatar alexpott

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

parent 8f8942bd
......@@ -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');
}
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment