Loading core/lib/Drupal/Core/Entity/EntityFieldManager.php +5 −5 Original line number Diff line number Diff line Loading @@ -277,7 +277,7 @@ protected function buildBaseFieldDefinitions($entity_type_id) { $provider = $entity_type->getProvider(); foreach ($base_field_definitions as $definition) { // @todo Remove this check once FieldDefinitionInterface exposes a proper // provider setter. See https://www.drupal.org/node/2225961. // provider setter. See https://www.drupal.org/node/2346329. if ($definition instanceof BaseFieldDefinition) { $definition->setProvider($provider); } Loading @@ -292,7 +292,7 @@ function (callable $hook, string $module) use (&$base_field_definitions, $entity // defining the field. foreach ($module_definitions as $field_name => $definition) { // @todo Remove this check once FieldDefinitionInterface exposes a // proper provider setter. See https://www.drupal.org/node/2225961. // proper provider setter. See https://www.drupal.org/node/2346329. if ($definition instanceof BaseFieldDefinition && $definition->getProvider() == NULL) { $definition->setProvider($module); } Loading Loading @@ -402,7 +402,7 @@ protected function buildBundleFieldDefinitions($entity_type_id, $bundle, array $ $provider = $entity_type->getProvider(); foreach ($bundle_field_definitions as $definition) { // @todo Remove this check once FieldDefinitionInterface exposes a proper // provider setter. See https://www.drupal.org/node/2225961. // provider setter. See https://www.drupal.org/node/2346329. if ($definition instanceof BaseFieldDefinition) { $definition->setProvider($provider); } Loading @@ -417,7 +417,7 @@ function (callable $hook, string $module) use (&$bundle_field_definitions, $enti // defining the field. foreach ($module_definitions as $field_name => $definition) { // @todo Remove this check once FieldDefinitionInterface exposes a // proper provider setter. See https://www.drupal.org/node/2225961. // proper provider setter. See https://www.drupal.org/node/2346329. if ($definition instanceof BaseFieldDefinition) { $definition->setProvider($module); } Loading Loading @@ -594,7 +594,7 @@ function (callable $hook, string $module) use (&$field_definitions, $entity_type // defining the field. foreach ($module_definitions as $field_name => $definition) { // @todo Remove this check once FieldDefinitionInterface exposes a // proper provider setter. See https://www.drupal.org/node/2225961. // proper provider setter. See https://www.drupal.org/node/2346329. if ($definition instanceof BaseFieldDefinition) { $definition->setProvider($module); $definition->setName($field_name); Loading core/tests/Drupal/Tests/Core/Entity/EntityFieldManagerTest.php +1 −1 Original line number Diff line number Diff line Loading @@ -548,7 +548,7 @@ public function testGetFieldDefinitionsProvider() { $module = 'entity_field_manager_test_module'; // @todo Mock FieldDefinitionInterface once it exposes a proper provider // setter. See https://www.drupal.org/node/2225961. // setter. See https://www.drupal.org/node/2346329. $field_definition = $this->prophesize(BaseFieldDefinition::class); // We expect two calls as the field definition will be returned from both Loading Loading
core/lib/Drupal/Core/Entity/EntityFieldManager.php +5 −5 Original line number Diff line number Diff line Loading @@ -277,7 +277,7 @@ protected function buildBaseFieldDefinitions($entity_type_id) { $provider = $entity_type->getProvider(); foreach ($base_field_definitions as $definition) { // @todo Remove this check once FieldDefinitionInterface exposes a proper // provider setter. See https://www.drupal.org/node/2225961. // provider setter. See https://www.drupal.org/node/2346329. if ($definition instanceof BaseFieldDefinition) { $definition->setProvider($provider); } Loading @@ -292,7 +292,7 @@ function (callable $hook, string $module) use (&$base_field_definitions, $entity // defining the field. foreach ($module_definitions as $field_name => $definition) { // @todo Remove this check once FieldDefinitionInterface exposes a // proper provider setter. See https://www.drupal.org/node/2225961. // proper provider setter. See https://www.drupal.org/node/2346329. if ($definition instanceof BaseFieldDefinition && $definition->getProvider() == NULL) { $definition->setProvider($module); } Loading Loading @@ -402,7 +402,7 @@ protected function buildBundleFieldDefinitions($entity_type_id, $bundle, array $ $provider = $entity_type->getProvider(); foreach ($bundle_field_definitions as $definition) { // @todo Remove this check once FieldDefinitionInterface exposes a proper // provider setter. See https://www.drupal.org/node/2225961. // provider setter. See https://www.drupal.org/node/2346329. if ($definition instanceof BaseFieldDefinition) { $definition->setProvider($provider); } Loading @@ -417,7 +417,7 @@ function (callable $hook, string $module) use (&$bundle_field_definitions, $enti // defining the field. foreach ($module_definitions as $field_name => $definition) { // @todo Remove this check once FieldDefinitionInterface exposes a // proper provider setter. See https://www.drupal.org/node/2225961. // proper provider setter. See https://www.drupal.org/node/2346329. if ($definition instanceof BaseFieldDefinition) { $definition->setProvider($module); } Loading Loading @@ -594,7 +594,7 @@ function (callable $hook, string $module) use (&$field_definitions, $entity_type // defining the field. foreach ($module_definitions as $field_name => $definition) { // @todo Remove this check once FieldDefinitionInterface exposes a // proper provider setter. See https://www.drupal.org/node/2225961. // proper provider setter. See https://www.drupal.org/node/2346329. if ($definition instanceof BaseFieldDefinition) { $definition->setProvider($module); $definition->setName($field_name); Loading
core/tests/Drupal/Tests/Core/Entity/EntityFieldManagerTest.php +1 −1 Original line number Diff line number Diff line Loading @@ -548,7 +548,7 @@ public function testGetFieldDefinitionsProvider() { $module = 'entity_field_manager_test_module'; // @todo Mock FieldDefinitionInterface once it exposes a proper provider // setter. See https://www.drupal.org/node/2225961. // setter. See https://www.drupal.org/node/2346329. $field_definition = $this->prophesize(BaseFieldDefinition::class); // We expect two calls as the field definition will be returned from both Loading