You are here

function styles_containers_available_styles in Styles 7

Same name and namespace in other branches
  1. 6 styles.module \styles_containers_available_styles()

Grab all styles available to a specific field type/container.

Parameters

$field_type: The field type name. @param $container_name The name of the container to fetch for that field type. @param $style_name (optional) The name of the specific style for the field/container to return. If not specified, then return all styles for the combination.

3 calls to styles_containers_available_styles()
styles_containers in ./styles.module
Get an array of all defined style containers.
styles_presets in ./styles.module
Return an array of all style presets.
theme_file_styles_video in contrib/file_styles/file_styles.theme.inc
Support for HTML5 videos out of the box.

File

./styles.module, line 272
Bundles similar display formatters together.

Code

function styles_containers_available_styles($field_type, $container_name, $style_name = NULL) {
  $styles = styles_styles();
  if (isset($style_name)) {
    return isset($styles[$field_type]['containers'][$container_name]['styles'][$style_name]) ? $styles[$field_type]['containers'][$container_name]['styles'][$style_name] : FALSE;
  }
  return isset($styles[$field_type]) ? isset($styles[$field_type]['containers'][$container_name]['styles']) ? $styles[$field_type]['containers'][$container_name]['styles'] : FALSE : FALSE;
}