You are here

function _commerce_file_get_private_stream_wrappers_options in Commerce File 7

Return scheme options for a form element with optional filter

4 calls to _commerce_file_get_private_stream_wrappers_options()
commerce_file_field_settings_form in includes/commerce_file.field.inc
Implements hook_field_settings_form().
commerce_file_field_widget_form in includes/commerce_file.field.inc
Implements hook_field_widget_form().
commerce_file_requirements in ./commerce_file.install
Implements hook_requirements() to check for a private file scheme.
_commerce_file_field_widget_process in includes/commerce_file.field.inc
An element #process callback for the commerce_file_commerce_file field type.

File

./commerce_file.module, line 1222
Provides integration of file licenses with Commerce

Code

function _commerce_file_get_private_stream_wrappers_options(array $filter = array()) {
  $options = array();
  if ($schemes = _commerce_file_get_private_stream_wrappers($filter)) {
    foreach ($schemes as $scheme => $stream_wrapper) {
      $options[$scheme] = $stream_wrapper['name'];
    }
  }
  return $options;
}