Follow-up to #2319671: ViewsDataController: Step1: Move entity views data into controllers

Problem/Motivation

In all multilingual entities are converted to use EntityViewsDataInterface

Proposed resolution

Move the rest of entities' views integrations into a views data handler.
Examples could be found in node, comment, user, taxonomy and in original #2319671: ViewsDataController: Step1: Move entity views data into controllers

Remaining tasks

file a patch

User interface changes

no

API changes

no

Comments

andypost’s picture

Issue tags: +Novice
undertext’s picture

Assigned: Unassigned » undertext
undertext’s picture

Assigned: Unassigned » undertext
undertext’s picture

Status: Active » Needs review
StatusFileSize
new19.18 KB

Hmm? Should it work with config entities? (FieldStorageConfig) Let's see.

undertext’s picture

dawehner’s picture

Status: Needs review » Needs work
+++ b/core/modules/field/field.views.inc
@@ -12,33 +12,6 @@
- */
-function field_views_data() {
-  $data = array();
-  $module_handler = \Drupal::moduleHandler();
-
-  foreach (\Drupal::entityManager()->getStorage('field_storage_config')->loadMultiple() as $field) {

+++ b/core/modules/field/src/Entity/FieldStorageConfig.php
@@ -22,7 +22,8 @@
  *   id = "field_storage_config",
...
+ *     "views_data" = "Drupal\field\FieldStorageConfigViewsData"

Nope, even if this works, technically this is not the same. This is the FieldStorage entity vs. the generic views integration for fields on any kind of entities. I would like to separate this, as it is not the views integration for the field_storage_config entity itself.

undertext’s picture

Status: Needs work » Needs review
StatusFileSize
new15.98 KB

Okay.

dawehner’s picture

Status: Needs review » Reviewed & tested by the community

Thank you for taken this into account!

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Committed 6cffdfa and pushed to 8.0.x. Thanks!

  • alexpott committed 6cffdfa on 8.0.x
    Issue #2322255 by undertext | andypost: Move the rest of core entities...
jibran’s picture

Title: Move the rest of core entities to use EntityViewsDataInterface » Move the remaining core entities to use EntityViewsDataInterface

More sane title :/ rest == REST

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.