Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / vendor / chi-teck / drupal-code-generator / templates / d7 / hook / stream_wrappers.twig
1 /**
2  * Implements hook_stream_wrappers().
3  */
4 function {{ machine_name }}_stream_wrappers() {
5   return array(
6     'public' => array(
7       'name' => t('Public files'),
8       'class' => 'DrupalPublicStreamWrapper',
9       'description' => t('Public local files served by the webserver.'),
10       'type' => STREAM_WRAPPERS_LOCAL_NORMAL,
11     ),
12     'private' => array(
13       'name' => t('Private files'),
14       'class' => 'DrupalPrivateStreamWrapper',
15       'description' => t('Private local files served by Drupal.'),
16       'type' => STREAM_WRAPPERS_LOCAL_NORMAL,
17     ),
18     'temp' => array(
19       'name' => t('Temporary files'),
20       'class' => 'DrupalTempStreamWrapper',
21       'description' => t('Temporary local files for upload and previews.'),
22       'type' => STREAM_WRAPPERS_LOCAL_HIDDEN,
23     ),
24     'cdn' => array(
25       'name' => t('Content delivery network files'),
26       'class' => 'MyModuleCDNStreamWrapper',
27       'description' => t('Files served by a content delivery network.'),
28       // 'type' can be omitted to use the default of STREAM_WRAPPERS_NORMAL
29     ),
30     'youtube' => array(
31       'name' => t('YouTube video'),
32       'class' => 'MyModuleYouTubeStreamWrapper',
33       'description' => t('Video streamed from YouTube.'),
34       // A module implementing YouTube integration may decide to support using
35       // the YouTube API for uploading video, but here, we assume that this
36       // particular module only supports playing YouTube video.
37       'type' => STREAM_WRAPPERS_READ_VISIBLE,
38     ),
39   );
40 }