Skip to content

Commit

Permalink
Remove dead D7 hook_stream_wrappers
Browse files Browse the repository at this point in the history
  • Loading branch information
lquessenberry committed Feb 7, 2019
1 parent 503d5c4 commit 69323cb
Showing 1 changed file with 0 additions and 36 deletions.
36 changes: 0 additions & 36 deletions modules/cloudinary_stream_wrapper/cloudinary_stream_wrapper.module
Original file line number Diff line number Diff line change
Expand Up @@ -75,42 +75,6 @@ function cloudinary_stream_wrapper_help($path, $arg) {
return $output;
}

/**
* Implements hook_stream_wrappers().
*/
function cloudinary_stream_wrapper_stream_wrappers() {
// Make sure Cloudinary SDK installed.
$status = cloudinary_sdk_check();

if ($status != CLOUDINARY_SDK_LOADED) {
return;
}

$base = array(
'name' => t('Cloudinary'),
'class' => 'CloudinaryStreamWrapper',
'description' => t('Stream wrapper to access Cloudinary files with read or write method.'),
'type' => STREAM_WRAPPERS_WRITE_VISIBLE,
);

$wrappers = array();
$wrappers['cloudinary'] = $base;

// @FIXME
// Could not extract the default value because it is either indeterminate, or
// not scalar. You'll need to provide a default value in
// config/install/cloudinary_sdk.settings.yml and config/schema/cloudinary_stream_wrapper.schema.yml.
$folders = array_filter(\Drupal::config('cloudinary_sdk.settings')->get('cloudinary_stream_wrapper_folders'));
if (!empty($folders)) {
foreach ($folders as $folder) {
$wrappers['cloudinary.' . $folder] = $base;
$wrappers['cloudinary.' . $folder]['name'] .= ' (/' . $folder . ')';
}
}

return $wrappers;
}

/**
* Implements hook_form_FORM_ID_alter() for cloudinary_sdk_settings().
*
Expand Down

0 comments on commit 69323cb

Please sign in to comment.