diff --git a/core/lib/Drupal/Core/Field/FormatterPluginManager.php b/core/lib/Drupal/Core/Field/FormatterPluginManager.php index 18a7789..ae0b38b 100644 --- a/core/lib/Drupal/Core/Field/FormatterPluginManager.php +++ b/core/lib/Drupal/Core/Field/FormatterPluginManager.php @@ -113,7 +113,7 @@ public function getInstance(array $options) { // Switch back to default formatter if either: // - $type_info doesn't exist (the widget type is unknown), // - the field type is not allowed for the widget. - $definition = $this->getDefinition($configuration['type']); + $definition = $this->getDefinition($configuration['type'], FALSE); if (!isset($definition['class']) || !in_array($field_type, $definition['field_types'])) { // Grab the default widget for the field type. $field_type_definition = $this->fieldTypeManager->getDefinition($field_type); @@ -196,7 +196,7 @@ public function getOptions($field_type = NULL) { * definition, or an empty array if type or settings are undefined. */ public function getDefaultSettings($type) { - $info = $this->getDefinition($type); + $info = $this->getDefinition($type, FALSE); return isset($info['settings']) ? $info['settings'] : array(); } diff --git a/core/lib/Drupal/Core/Field/WidgetPluginManager.php b/core/lib/Drupal/Core/Field/WidgetPluginManager.php index 0a78986..5895e24 100644 --- a/core/lib/Drupal/Core/Field/WidgetPluginManager.php +++ b/core/lib/Drupal/Core/Field/WidgetPluginManager.php @@ -99,7 +99,7 @@ public function getInstance(array $options) { // Switch back to default widget if either: // - $type_info doesn't exist (the widget type is unknown), // - the field type is not allowed for the widget. - $definition = $this->getDefinition($configuration['type']); + $definition = $this->getDefinition($configuration['type'], FALSE); if (!isset($definition['class']) || !in_array($field_type, $definition['field_types'])) { // Grab the default widget for the field type. $field_type_definition = $this->fieldTypeManager->getDefinition($field_type); @@ -200,7 +200,7 @@ public function getOptions($field_type = NULL) { * definition, or an empty array if type or settings are undefined. */ public function getDefaultSettings($type) { - $info = $this->getDefinition($type); + $info = $this->getDefinition($type, FALSE); return isset($info['settings']) ? $info['settings'] : array(); } diff --git a/core/modules/field/lib/Drupal/field/FieldInfo.php b/core/modules/field/lib/Drupal/field/FieldInfo.php index e458c0f..ebe9a15 100644 --- a/core/modules/field/lib/Drupal/field/FieldInfo.php +++ b/core/modules/field/lib/Drupal/field/FieldInfo.php @@ -438,7 +438,7 @@ public function getBundleInstances($entity_type, $bundle) { $fields = array(); // Do not return anything for unknown entity types. - if (\Drupal::entityManager()->getDefinition($entity_type) && !empty($field_map[$entity_type])) { + if (\Drupal::entityManager()->getDefinition($entity_type, FALSE) && !empty($field_map[$entity_type])) { // Collect names of fields and instances involved in the bundle, using the // field map. The field map is already filtered to non-deleted fields and diff --git a/core/modules/system/lib/Drupal/system/Tests/Plugin/Discovery/DiscoveryTestBase.php b/core/modules/system/lib/Drupal/system/Tests/Plugin/Discovery/DiscoveryTestBase.php index 20a574a..577d7bc 100644 --- a/core/modules/system/lib/Drupal/system/Tests/Plugin/Discovery/DiscoveryTestBase.php +++ b/core/modules/system/lib/Drupal/system/Tests/Plugin/Discovery/DiscoveryTestBase.php @@ -56,7 +56,7 @@ function testDiscoveryInterface() { $this->assertIdentical($this->emptyDiscovery->getDefinitions(), array(), 'array() returned if no plugin definitions are found.'); // Ensure that NULL is returned as the definition of a non-existing plugin. - $this->assertIdentical($this->emptyDiscovery->getDefinition('non_existing'), NULL, 'NULL returned as the definition of a non-existing plugin.'); + $this->assertIdentical($this->emptyDiscovery->getDefinition('non_existing', FALSE), NULL, 'NULL returned as the definition of a non-existing plugin.'); } } diff --git a/core/modules/views/lib/Drupal/views/Tests/Plugin/DisplayTest.php b/core/modules/views/lib/Drupal/views/Tests/Plugin/DisplayTest.php index ae96609..163e3a0 100644 --- a/core/modules/views/lib/Drupal/views/Tests/Plugin/DisplayTest.php +++ b/core/modules/views/lib/Drupal/views/Tests/Plugin/DisplayTest.php @@ -246,7 +246,7 @@ public function testInvalidDisplayPlugins() { $this->drupalGet('test_display_invalid'); $this->assertResponse(200); - $this->assertText(t('The plugin (invalid) did not specify an instance class.')); + $this->assertText('The "invalid" plugin does not exist.'); // Rebuild the router, and ensure that the path is not accessible anymore. views_invalidate_cache(); @@ -275,7 +275,7 @@ public function testInvalidDisplayPlugins() { // plugin warning message. $this->drupalGet(''); $this->assertResponse(200); - $this->assertText(t('The plugin (invalid) did not specify an instance class.')); + $this->assertText('The "invalid" plugin does not exist.'); $this->assertNoBlockAppears($block); }