How to use "content entity" type in a View? I have used the &quot;content entity example&quot; coming from the example project.
This example module/:

defines a &quot;Contact&quot; entity; it can have extra fields, displays can be configured (web/admin/structure/content_entity_example_contact_settings),
gives the user the form to add content (contact info) to it. (/web/content_entity_example_contact/add)
shows a list of the contacts (/web/content_entity_example_contact/list)

I want to make my list as a View, but this content entity type &quot;Contact&quot; is not there to select it. (I see only the node content types, users, taxonomy etcI
How can I use this content in a View ? What do I have to do to make this content available in the Views UI ? Where can I find the content entity types to create a view ? Or how can I add those ?
Add a views_data handler to the entity type. Either the core standard EntityViewsData
content_entity_example/src/Entity/Contact.php
  *   handlers = {
  *     &quot;views_data&quot; = &quot;Drupal\views\EntityViewsData&quot;,

or a custom handler:
content_entity_example/src/Entity/Contact.php
  *   handlers = {
  *     &quot;views_data&quot; = &quot;Drupal\content_entity_example\Entity\ContactViewsData&quot;,

content_entity_example/src/Entity/ContactViewsData.php
&lt;?php

namespace Drupal\content_entity_example\Entity;

use Drupal\views\EntityViewsData;

/**
 * Makes the content_entity_example entity available to Views
 *
 * @ingroup content_entity_example
 */
class ContactViewsData extends EntityViewsData {

  /**
   * {@inheritdoc}
   */
  public function getViewsData() {
    $data = parent::getViewsData();

    // $data from the parent is enough to make it work but modify as required.

    // Give it a more description name in the dropdown when creating a new view.
    $data['contact']['table']['base']['title'] = $this-&gt;t('Content Entity Example Contact');

    // Make the Name field appear to Views as Last Name
    $data['contact']['name']['title'] = $this-&gt;t('Last Name');

    return $data;
  }

}

To apply this code to the example module use the patch from this issue https://www.drupal.org/project/examples/issues/2725833