1 {% extends "base/file.php.twig" %}
3 {% block file_path %}{{ module }}\{{ module }}.views.inc.{% endblock %}
5 {% block extra_info %} * Provide a custom views field data that isn't tied to any other module.{% endblock %}
8 use Drupal\Component\Utility\NestedArray;
9 use Drupal\Core\Entity\EntityStorageInterface;
10 use Drupal\Core\Entity\Sql\SqlContentEntityStorage;
11 use Drupal\Core\Render\Markup;
12 use Drupal\field\FieldConfigInterface;
13 use Drupal\field\FieldStorageConfigInterface;
14 use Drupal\system\ActionConfigEntityInterface;
17 {% block file_methods %}
19 * Implements hook_views_data().
21 function {{module}}_views_data() {
23 $data['views']['table']['group'] = t('Custom Global');
24 $data['views']['table']['join'] = [
25 // #global is a special flag which allows a table to appear all the time.
30 $data['views']['{{ class_machine_name }}'] = [
31 'title' => t('{{ title }}'),
32 'help' => t('{{ description }}'),
34 'id' => '{{ class_machine_name }}',