devel_wizard-2.x-dev/devel_wizard.module

devel_wizard.module
<?php

/**
 * @file
 * Devel Wizard hook implementations.
 */

declare(strict_types=1);

/**
 * Implements hook_theme().
 */
function devel_wizard_theme() {
  return [
    'devel_wizard_spell_definition' => [
      'template' => 'devel-wizard-spell-definition',
      'variables' => [
        'spell_definition' => NULL,
      ],
    ],
    'devel_wizard_spell_definition_list' => [
      'template' => 'devel-wizard-spell-definition-list',
      'variables' => [
        'children' => NULL,
        'attributes' => [
          'class' => ['devel-wizard-spell-definition-list'],
        ],
        'search_attributes' => [
          'class' => ['controls'],
        ],
        'content_attributes' => [
          'class' => ['items'],
        ],
      ],
    ],
  ];
}

/**
 * Implements hook_preprocess_HOOK().
 */
function devel_wizard_preprocess_devel_wizard_spell_definition_list(&$variables) {
  $variables['attributes'] = new \Drupal\Core\Template\Attribute($variables['attributes']);
  $variables['search_attributes'] = new \Drupal\Core\Template\Attribute($variables['search_attributes']);
  $variables['content_attributes'] = new \Drupal\Core\Template\Attribute($variables['content_attributes']);
}

Главная | Обратная связь

drupal hosting | друпал хостинг | it patrol .inc