addEntityLinks example

'field' => $entity_keys['langcode'],
          'left_field' => $entity_keys['langcode'],
        ];
        $data[$views_revision_base_table][$entity_id_key]['relationship']['extra'][] = $extra;
        $data[$views_revision_base_table][$entity_revision_key]['relationship']['extra'][] = $extra;
        $data[$revision_table]['table']['join'][$views_base_table]['left_field'] = $entity_revision_key;
        $data[$revision_table]['table']['join'][$views_base_table]['field'] = $entity_revision_key;
      }

    }

    $this->addEntityLinks($data[$base_table]);
    if ($views_revision_base_table) {
      $this->addEntityLinks($data[$views_revision_base_table]);
    }

    // Load all typed data definitions of all fields. This should cover each of     // the entity base, revision, data tables.     $field_definitions = $this->entityFieldManager->getBaseFieldDefinitions($this->entityType->id());
    /** @var \Drupal\Core\Entity\Sql\DefaultTableMapping $table_mapping */
    $table_mapping = $this->storage->getTableMapping($field_definitions);
    // Fetch all fields that can appear in both the base table and the data     // table.
Home | Imprint | This part of the site doesn't use cookies.