You are here

function faqfield_theme in FAQ Field 8

Same name and namespace in other branches
  1. 7 faqfield.module \faqfield_theme()
  2. 2.0.x faqfield.module \faqfield_theme()

Implements hook_theme().

File

./faqfield.module, line 30
Defines a field for frequently asked questions.

Code

function faqfield_theme() {
  return [
    // Simple text field formatter template.
    'faqfield_simple_text_formatter' => [
      'variables' => [
        'question' => NULL,
        'answer' => NULL,
        'answer_format' => NULL,
        'delta' => NULL,
      ],
      'template' => 'faqfield-simple-text-formatter',
    ],
    // Definition list field formatter template.
    'faqfield_definition_list_formatter' => [
      'variables' => [
        'items' => [],
      ],
      'template' => 'faqfield-definition-list-formatter',
    ],
    // Anchor list field formatter template.
    'faqfield_anchor_list_formatter' => [
      'variables' => [
        'items' => [],
        'list_type' => 'ul',
      ],
      'template' => 'faqfield-anchor-list-formatter',
    ],
    // jQuery Accordion field formatter template.
    'faqfield_jquery_accordion_formatter' => [
      'variables' => [
        'items' => [],
        'id' => NULL,
      ],
      'template' => 'faqfield-jquery-accordion-formatter',
    ],
    // Details field formatter template.
    'faqfield_details_formatter' => [
      'variables' => [
        'question' => NULL,
        'answer' => NULL,
        'answer_format' => NULL,
        'delta' => NULL,
      ],
      'template' => 'faqfield-details-formatter',
    ],
  ];
}