You are here

function panels_term_displays in Panels 6.2

Same name and namespace in other branches
  1. 5.2 arguments/term.inc \panels_term_displays()

What additional displays does this argument provide?

1 string reference to 'panels_term_displays'
panels_term_panels_arguments in arguments/term.inc
@file arguments/term.inc

File

arguments/term.inc, line 155
arguments/term.inc

Code

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