X-Git-Url: http://www.aleph1.co.uk/gitweb/?a=blobdiff_plain;ds=sidebyside;f=web%2Fcore%2Flib%2FDrupal%2FCore%2FEntity%2FContentEntityStorageBase.php;fp=web%2Fcore%2Flib%2FDrupal%2FCore%2FEntity%2FContentEntityStorageBase.php;h=22d9caf2b833ff9448a8f0b2ee486db6a5ca6f5a;hb=9917807b03b64faf00f6a1f29dcb6eafc454efa5;hp=9d6b8d64f5089560d505aa266d850076aec3564f;hpb=aea91e65e895364e460983b890e295aa5d5540a5;p=yaffs-website diff --git a/web/core/lib/Drupal/Core/Entity/ContentEntityStorageBase.php b/web/core/lib/Drupal/Core/Entity/ContentEntityStorageBase.php index 9d6b8d64f..22d9caf2b 100644 --- a/web/core/lib/Drupal/Core/Entity/ContentEntityStorageBase.php +++ b/web/core/lib/Drupal/Core/Entity/ContentEntityStorageBase.php @@ -62,16 +62,6 @@ abstract class ContentEntityStorageBase extends EntityStorageBase implements Con ); } - /** - * {@inheritdoc} - */ - public function hasData() { - return (bool) $this->getQuery() - ->accessCheck(FALSE) - ->range(0, 1) - ->execute(); - } - /** * {@inheritdoc} */ @@ -129,8 +119,12 @@ abstract class ContentEntityStorageBase extends EntityStorageBase implements Con */ public function createTranslation(ContentEntityInterface $entity, $langcode, array $values = []) { $translation = $entity->getTranslation($langcode); - $definitions = array_filter($translation->getFieldDefinitions(), function(FieldDefinitionInterface $definition) { return $definition->isTranslatable(); }); - $field_names = array_map(function(FieldDefinitionInterface $definition) { return $definition->getName(); }, $definitions); + $definitions = array_filter($translation->getFieldDefinitions(), function (FieldDefinitionInterface $definition) { + return $definition->isTranslatable(); + }); + $field_names = array_map(function (FieldDefinitionInterface $definition) { + return $definition->getName(); + }, $definitions); $values[$this->langcodeKey] = $langcode; $values[$this->getEntityType()->getKey('default_langcode')] = FALSE; $this->initFieldValues($translation, $values, $field_names); @@ -141,32 +135,32 @@ abstract class ContentEntityStorageBase extends EntityStorageBase implements Con /** * {@inheritdoc} */ - public function onFieldStorageDefinitionCreate(FieldStorageDefinitionInterface $storage_definition) { } + public function onFieldStorageDefinitionCreate(FieldStorageDefinitionInterface $storage_definition) {} /** * {@inheritdoc} */ - public function onFieldStorageDefinitionUpdate(FieldStorageDefinitionInterface $storage_definition, FieldStorageDefinitionInterface $original) { } + public function onFieldStorageDefinitionUpdate(FieldStorageDefinitionInterface $storage_definition, FieldStorageDefinitionInterface $original) {} /** * {@inheritdoc} */ - public function onFieldStorageDefinitionDelete(FieldStorageDefinitionInterface $storage_definition) { } + public function onFieldStorageDefinitionDelete(FieldStorageDefinitionInterface $storage_definition) {} /** * {@inheritdoc} */ - public function onFieldDefinitionCreate(FieldDefinitionInterface $field_definition) { } + public function onFieldDefinitionCreate(FieldDefinitionInterface $field_definition) {} /** * {@inheritdoc} */ - public function onFieldDefinitionUpdate(FieldDefinitionInterface $field_definition, FieldDefinitionInterface $original) { } + public function onFieldDefinitionUpdate(FieldDefinitionInterface $field_definition, FieldDefinitionInterface $original) {} /** * {@inheritdoc} */ - public function onFieldDefinitionDelete(FieldDefinitionInterface $field_definition) { } + public function onFieldDefinitionDelete(FieldDefinitionInterface $field_definition) {} /** * {@inheritdoc} @@ -210,7 +204,7 @@ abstract class ContentEntityStorageBase extends EntityStorageBase implements Con /** * {@inheritdoc} */ - public function finalizePurge(FieldStorageDefinitionInterface $storage_definition) { } + public function finalizePurge(FieldStorageDefinitionInterface $storage_definition) {} /** * {@inheritdoc}