annotate vendor/chi-teck/drupal-code-generator/templates/d7/hook/stream_wrappers.twig @ 5:12f9dff5fda9 tip

Update to Drupal core 8.7.1
author Chris Cannam
date Thu, 09 May 2019 15:34:47 +0100
parents c75dbcec494b
children
rev   line source
Chris@0 1 /**
Chris@0 2 * Implements hook_stream_wrappers().
Chris@0 3 */
Chris@0 4 function {{ machine_name }}_stream_wrappers() {
Chris@0 5 return array(
Chris@0 6 'public' => array(
Chris@0 7 'name' => t('Public files'),
Chris@0 8 'class' => 'DrupalPublicStreamWrapper',
Chris@0 9 'description' => t('Public local files served by the webserver.'),
Chris@0 10 'type' => STREAM_WRAPPERS_LOCAL_NORMAL,
Chris@0 11 ),
Chris@0 12 'private' => array(
Chris@0 13 'name' => t('Private files'),
Chris@0 14 'class' => 'DrupalPrivateStreamWrapper',
Chris@0 15 'description' => t('Private local files served by Drupal.'),
Chris@0 16 'type' => STREAM_WRAPPERS_LOCAL_NORMAL,
Chris@0 17 ),
Chris@0 18 'temp' => array(
Chris@0 19 'name' => t('Temporary files'),
Chris@0 20 'class' => 'DrupalTempStreamWrapper',
Chris@0 21 'description' => t('Temporary local files for upload and previews.'),
Chris@0 22 'type' => STREAM_WRAPPERS_LOCAL_HIDDEN,
Chris@0 23 ),
Chris@0 24 'cdn' => array(
Chris@0 25 'name' => t('Content delivery network files'),
Chris@0 26 'class' => 'MyModuleCDNStreamWrapper',
Chris@0 27 'description' => t('Files served by a content delivery network.'),
Chris@0 28 // 'type' can be omitted to use the default of STREAM_WRAPPERS_NORMAL
Chris@0 29 ),
Chris@0 30 'youtube' => array(
Chris@0 31 'name' => t('YouTube video'),
Chris@0 32 'class' => 'MyModuleYouTubeStreamWrapper',
Chris@0 33 'description' => t('Video streamed from YouTube.'),
Chris@0 34 // A module implementing YouTube integration may decide to support using
Chris@0 35 // the YouTube API for uploading video, but here, we assume that this
Chris@0 36 // particular module only supports playing YouTube video.
Chris@0 37 'type' => STREAM_WRAPPERS_READ_VISIBLE,
Chris@0 38 ),
Chris@0 39 );
Chris@0 40 }