daf921f232caca25d8c55e26f5861bb2895d2d5f
[yaffs-website] / vendor / drupal / console / templates / module / module.views.inc.twig
1 {% extends "base/file.php.twig" %}
2
3 {% block file_path %}{{ module }}\{{ module }}.views.inc.{% endblock %}
4
5 {% block extra_info %} * Provide a custom views field data that isn't tied to any other module.{% endblock %}
6
7 {% block use_class %}
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;
15 {% endblock %}
16
17 {% block file_methods %}
18 /**
19 * Implements hook_views_data().
20 */
21 function {{module}}_views_data() {
22
23     $data['views']['table']['group'] = t('Custom Global');
24     $data['views']['table']['join'] = array(
25       // #global is a special flag which allows a table to appear all the time.
26       '#global' => array(),
27     );
28
29
30     $data['views']['{{ class_machine_name }}'] = array(
31         'title' => t('{{ title }}'),
32         'help' => t('{{ description }}'),
33         'field' => array(
34             'id' => '{{ class_machine_name }}',
35         ),
36     );
37
38     return $data;
39 }
40 {% endblock %}