You are here

function panels_vid_displays in Panels 5.2

Same name and namespace in other branches
  1. 6.2 arguments/vid.inc \panels_vid_displays()

What additional displays does this argument provide?

1 string reference to 'panels_vid_displays'
panels_vid_panels_arguments in arguments/vid.inc
@file arguments/vid.inc

File

arguments/vid.inc, line 86
arguments/vid.inc

Code

function panels_vid_displays($conf, $id) {
  $displays = array();
  if (is_array($conf['displays'])) {
    $options = array();
    foreach (taxonomy_get_vocabularies() as $vid => $info) {
      $options[$vid] = $info->name;
    }
    foreach (array_keys(array_filter($conf['displays'])) as $vid) {
      $displays[$vid] = array(
        'title' => t('vocabulary ID @id @type', array(
          '@id' => $id,
          '@type' => $options[$vid],
        )),
        // Tell it to base the template for this display off of the default.
        'default' => 'default',
        'context' => 'vocabulary',
      );
    }
  }
  return $displays;
}