You are here

function video_embed_field_video_style_options in Video Embed Field 7.2

Get an array of image styles suitable for using as select list options.

Parameters

bool $include_empty: If TRUE a <none> option will be inserted in the options array.

Return value

array Array of image styles both key and value are set to style name.

2 calls to video_embed_field_video_style_options()
video_embed_field_field_formatter_settings_form in ./video_embed_field.field.inc
Implements hook_field_formatter_settings_form().
video_embed_field_field_formatter_settings_summary in ./video_embed_field.field.inc
Implements hook_field_formatter_settings_summary().

File

./video_embed_field.module, line 334
Provides a simple field for easily embedding videos from youtube or vimeo

Code

function video_embed_field_video_style_options($include_empty = TRUE) {
  $styles = video_embed_field_video_styles();
  $options = array();
  if ($include_empty && !empty($styles)) {
    $options[''] = t('<none>');
  }
  foreach ($styles as $style) {
    $options[$style->name] = $style->title;
  }
  if (empty($options)) {
    $options[''] = t('No defined styles');
  }
  return $options;
}