diff --git a/core/modules/file/lib/Drupal/file/Entity/File.php b/core/modules/file/lib/Drupal/file/Entity/File.php index 0aea1ee..8564127 100644 --- a/core/modules/file/lib/Drupal/file/Entity/File.php +++ b/core/modules/file/lib/Drupal/file/Entity/File.php @@ -258,10 +258,8 @@ public static function baseFieldDefinitions(EntityTypeInterface $entity_type) { $fields['filesize'] = FieldDefinition::create('integer') ->setLabel(t('File size')) ->setDescription(t('The size of the file in bytes.')) - ->setSettings(array( - 'unsigned' => TRUE, - 'size' => 'big', - )); + ->setSetting('unsigned', TRUE) + ->setSetting('size', 'big'); $fields['status'] = FieldDefinition::create('boolean') ->setLabel(t('Status')) diff --git a/core/modules/node/lib/Drupal/node/Entity/Node.php b/core/modules/node/lib/Drupal/node/Entity/Node.php index 71474a9..7fb33e6 100644 --- a/core/modules/node/lib/Drupal/node/Entity/Node.php +++ b/core/modules/node/lib/Drupal/node/Entity/Node.php @@ -356,10 +356,8 @@ public static function baseFieldDefinitions(EntityTypeInterface $entity_type) { $fields['type'] = FieldDefinition::create('entity_reference') ->setLabel(t('Type')) ->setDescription(t('The node type.')) - ->setSettings(array( - 'target_type' => 'node_type', - 'max_length' => EntityTypeInterface::BUNDLE_MAX_LENGTH, - )) + ->setSetting('target_type', 'node_type') + ->setSetting('max_length', EntityTypeInterface::BUNDLE_MAX_LENGTH) ->setReadOnly(TRUE); $fields['langcode'] = FieldDefinition::create('language') @@ -373,10 +371,8 @@ public static function baseFieldDefinitions(EntityTypeInterface $entity_type) { ->setRequired(TRUE) ->setTranslatable(TRUE) ->setRevisionable(TRUE) - ->setSettings(array( - 'default_value' => '', - 'max_length' => 255, - )) + ->setSetting('default_value', '') + ->setSetting('max_length', 255) ->setDisplayOptions('view', array( 'label' => 'hidden', 'type' => 'string', @@ -392,9 +388,7 @@ public static function baseFieldDefinitions(EntityTypeInterface $entity_type) { ->setLabel(t('Author')) ->setDescription(t('The user that is the node author.')) ->setRevisionable(TRUE) - ->setSettings(array( - 'target_type' => 'user', - )) + ->setSetting('target_type', 'user') ->setTranslatable(TRUE); $fields['status'] = FieldDefinition::create('boolean') @@ -436,7 +430,7 @@ public static function baseFieldDefinitions(EntityTypeInterface $entity_type) { $fields['revision_uid'] = FieldDefinition::create('entity_reference') ->setLabel(t('Revision user ID')) ->setDescription(t('The user ID of the author of the current revision.')) - ->setSettings(array('target_type' => 'user')) + ->setSetting('target_type', 'user') ->setQueryable(FALSE) ->setRevisionable(TRUE); diff --git a/core/modules/shortcut/src/Entity/Shortcut.php b/core/modules/shortcut/src/Entity/Shortcut.php index 06d9e6d..65325ed 100644 --- a/core/modules/shortcut/src/Entity/Shortcut.php +++ b/core/modules/shortcut/src/Entity/Shortcut.php @@ -167,10 +167,8 @@ public static function baseFieldDefinitions(EntityTypeInterface $entity_type) { $fields['shortcut_set'] = FieldDefinition::create('entity_reference') ->setLabel(t('Shortcut set')) ->setDescription(t('The bundle of the shortcut.')) - ->setSettings(array( - 'target_type' => 'shortcut_set', - 'max_length' => EntityTypeInterface::BUNDLE_MAX_LENGTH, - )) + ->setSetting('target_type', 'shortcut_set') + ->setSetting('max_length', EntityTypeInterface::BUNDLE_MAX_LENGTH) ->setRequired(TRUE); $fields['title'] = FieldDefinition::create('string') @@ -178,10 +176,8 @@ public static function baseFieldDefinitions(EntityTypeInterface $entity_type) { ->setDescription(t('The name of the shortcut.')) ->setRequired(TRUE) ->setTranslatable(TRUE) - ->setSettings(array( - 'default_value' => '', - 'max_length' => 255, - )) + ->setSetting('default_value', '') + ->setSetting('max_length', 255) ->setDisplayOptions('form', array( 'type' => 'string', 'weight' => -10,