Update to Drupal 8.1.0. For more information, see https://www.drupal.org/drupal-8.1.0-release-notes
This commit is contained in:
parent
b11a755ba8
commit
c0a0d5a94c
6920 changed files with 64395 additions and 57312 deletions
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\views\EntityViewsData.
|
||||
*/
|
||||
|
||||
namespace Drupal\views;
|
||||
|
||||
use Drupal\Core\Entity\ContentEntityType;
|
||||
|
|
@ -182,6 +177,16 @@ class EntityViewsData implements EntityHandlerInterface, EntityViewsDataInterfac
|
|||
);
|
||||
}
|
||||
|
||||
if ($this->entityType->hasViewBuilderClass()) {
|
||||
$data[$base_table]['rendered_entity'] = [
|
||||
'field' => [
|
||||
'title' => $this->t('Rendered entity'),
|
||||
'help' => $this->t('Renders an entity in a view mode.'),
|
||||
'id' => 'rendered_entity',
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
// Setup relations to the revisions/property data.
|
||||
if ($data_table) {
|
||||
$data[$base_table]['table']['join'][$data_table] = [
|
||||
|
|
@ -230,7 +235,7 @@ class EntityViewsData implements EntityHandlerInterface, EntityViewsDataInterfac
|
|||
// Load all typed data definitions of all fields. This should cover each of
|
||||
// the entity base, revision, data tables.
|
||||
$field_definitions = $this->entityManager->getBaseFieldDefinitions($this->entityType->id());
|
||||
if ($table_mapping = $this->storage->getTableMapping()) {
|
||||
if ($table_mapping = $this->storage->getTableMapping($field_definitions)) {
|
||||
// Fetch all fields that can appear in both the base table and the data
|
||||
// table.
|
||||
$entity_keys = $this->entityType->getKeys();
|
||||
|
|
|
|||
Reference in a new issue