Security update for Core, with self-updated composer
[yaffs-website] / web / core / modules / system / tests / modules / entity_test / src / EntityTestViewsData.php
index 3bb0d24c648ee01dc7df7a5d554de1de1a6306b5..27a1186ada6f4f1da6b05a7550e337909b4e6bcd 100644 (file)
@@ -16,6 +16,17 @@ class EntityTestViewsData extends EntityViewsData {
   public function getViewsData() {
     $views_data = parent::getViewsData();
 
+    if ($this->entityType->id() === 'entity_test_computed_field') {
+      $views_data['entity_test_computed_field']['computed_string_field'] = [
+        'title' => $this->t('Computed String Field'),
+        'field' => [
+          'id' => 'field',
+          'default_formatter' => 'string',
+          'field_name' => 'computed_string_field',
+        ],
+      ];
+    }
+
     if ($this->entityType->id() != 'entity_test') {
       return $views_data;
     }