Security update to Drupal 8.4.6
[yaffs-website] / web / core / modules / content_moderation / content_moderation.views.inc
1 <?php
2
3 /**
4  * @file
5  * Provide views data for content_moderation.module.
6  *
7  * @ingroup views_module_handlers
8  */
9
10 use Drupal\content_moderation\ViewsData;
11
12 /**
13  * Implements hook_views_data().
14  */
15 function content_moderation_views_data() {
16   return _content_moderation_views_data_object()->getViewsData();
17 }
18
19 /**
20  * Creates a ViewsData object to respond to views hooks.
21  *
22  * @return \Drupal\content_moderation\ViewsData
23  *   The content moderation ViewsData object.
24  */
25 function _content_moderation_views_data_object() {
26   return new ViewsData(
27     \Drupal::service('entity_type.manager'),
28     \Drupal::service('content_moderation.moderation_information')
29   );
30 }