diff --git a/core/modules/file/lib/Drupal/file/Plugin/field/formatter/FileFormatterBase.php b/core/modules/file/lib/Drupal/file/Plugin/field/formatter/FileFormatterBase.php index 358648b..ccf28d3 100644 --- a/core/modules/file/lib/Drupal/file/Plugin/field/formatter/FileFormatterBase.php +++ b/core/modules/file/lib/Drupal/file/Plugin/field/formatter/FileFormatterBase.php @@ -22,9 +22,9 @@ public function prepareView(array $entities, $langcode, array &$items) { $fids = array(); foreach ($entities as $id => $entity) { foreach ($items[$id] as $delta => $item) { - if ($this->isDisplayed($item) && !empty($item['fid'])) { + if ($this->isDisplayed($item) && !empty($item['target_id'])) { // Load the files from the files table. - $fids[] = $item['fid']; + $fids[] = $item['target_id']; } } } @@ -35,8 +35,8 @@ public function prepareView(array $entities, $langcode, array &$items) { foreach ($entities as $id => $entity) { foreach ($items[$id] as $delta => $item) { // If the file does not exist, mark the entire item as empty. - if (!empty($item['fid'])) { - $items[$id][$delta]['entity'] = isset($files[$item['fid']]) ? $files[$item['fid']] : NULL; + if (!empty($item['target_id'])) { + $items[$id][$delta]['entity'] = isset($files[$item['target_id']]) ? $files[$item['target_id']] : NULL; } } } diff --git a/core/modules/rdf/lib/Drupal/rdf/Tests/FileFieldAttributesTest.php b/core/modules/rdf/lib/Drupal/rdf/Tests/FileFieldAttributesTest.php index 91845ca..11176dc 100644 --- a/core/modules/rdf/lib/Drupal/rdf/Tests/FileFieldAttributesTest.php +++ b/core/modules/rdf/lib/Drupal/rdf/Tests/FileFieldAttributesTest.php @@ -73,7 +73,7 @@ public function setUp() { $nid = $this->uploadNodeFile($test_file, $this->fieldName, $type_name); $this->node = node_load($nid, TRUE); - $this->file = file_load($this->node->{$this->fieldName}[Language::LANGCODE_NOT_SPECIFIED][0]['fid']); + $this->file = file_load($this->node->{$this->fieldName}[Language::LANGCODE_NOT_SPECIFIED][0]['target_id']); } diff --git a/core/modules/rdf/lib/Drupal/rdf/Tests/ImageFieldAttributesTest.php b/core/modules/rdf/lib/Drupal/rdf/Tests/ImageFieldAttributesTest.php index 72bf85a..338ddfb 100644 --- a/core/modules/rdf/lib/Drupal/rdf/Tests/ImageFieldAttributesTest.php +++ b/core/modules/rdf/lib/Drupal/rdf/Tests/ImageFieldAttributesTest.php @@ -73,7 +73,7 @@ public function setUp() { // Save a node with the image. $nid = $this->uploadNodeImage($image, $this->fieldName, 'article'); $this->node = node_load($nid); - $this->file = file_load($this->node->{$this->fieldName}[Language::LANGCODE_NOT_SPECIFIED][0]['fid']); + $this->file = file_load($this->node->{$this->fieldName}[Language::LANGCODE_NOT_SPECIFIED][0]['target_id']); } /** diff --git a/core/modules/taxonomy/lib/Drupal/taxonomy/Type/TaxonomyTermReferenceItem.php b/core/modules/taxonomy/lib/Drupal/taxonomy/Type/TaxonomyTermReferenceItem.php index 082ed5d..21c210b 100644 --- a/core/modules/taxonomy/lib/Drupal/taxonomy/Type/TaxonomyTermReferenceItem.php +++ b/core/modules/taxonomy/lib/Drupal/taxonomy/Type/TaxonomyTermReferenceItem.php @@ -7,7 +7,6 @@ namespace Drupal\taxonomy\Type; -use Drupal\Core\Entity\Field\Type\EntityReferenceItem; use Drupal\field\Plugin\Type\FieldType\ConfigEntityReferenceItemBase; /**