Pathologic was missing because of a .git folder inside.
[yaffs-website] / web / modules / contrib / video_embed_field / video_embed_field.module
1 <?php
2
3 /**
4  * @file
5  * Module file for video_embed_field.
6  */
7
8 use Drupal\Core\Routing\RouteMatchInterface;
9 use Drupal\Core\Url;
10
11 /**
12  * Implements hook_theme().
13  */
14 function video_embed_field_theme() {
15   return [
16     'video_embed_iframe' => [
17       'variables' => [
18         'url' => '',
19         'query' => [],
20         'attributes' => [],
21         'fragment' => '',
22       ],
23     ],
24     'video_embed_field_missing_provider' => [
25       'variables' => [],
26     ],
27   ];
28 }
29
30 /**
31  *  Implements hook_help().
32  */
33 function video_embed_field_help($route_name, RouteMatchInterface $route_match) {
34   if ($route_name !== 'help.page.video_embed_field') {
35     return;
36   }
37   $links = [
38     ':field_help' => \Drupal::moduleHandler()->moduleExists('field_ui') ? Url::fromRoute('help.page', ['name' => 'field_ui'])->toString() : '#',
39     ':field_ui_help' => Url::fromRoute('help.page', ['name' => 'field'])->toString(),
40     ':video_embed_field_docs' => 'https://www.drupal.org/node/2322455',
41     ':project_page' => 'http://drupal.org/project/video_embed_field',
42   ];
43   $output = '';
44   $output .= '<h3>' . t('About') . '</h3>';
45   $output .= '<p>' . t('The Video Embed Field module provides a simple field type you can use to embed videos and their preview thumbnails from YouTube, Vimeo and other providers. See the <a href=":field_help">Field module help</a> and the <a href=":field_ui_help">Field UI help</a> pages for general information on fields and how to create and manage them. For more Video Embed Field help, see the <a href=":video_embed_field_docs">online community documentation</a> or the <a href=":project_page">module project page</a>.', $links) . '</p>';
46   return $output;
47 }