TwigExtensionTestHooks.php

Namespace

Drupal\twig_extension_test\Hook

File

core/modules/system/tests/modules/twig_extension_test/src/Hook/TwigExtensionTestHooks.php

View source
<?php

declare (strict_types=1);
namespace Drupal\twig_extension_test\Hook;

use Drupal\Core\Hook\Attribute\Hook;

/**
 * Hook implementations for twig_extension_test.
 */
class TwigExtensionTestHooks {
  
  /**
   * Implements hook_theme().
   */
  public function theme($existing, $type, $theme, $path) : array {
    return [
      'twig_extension_test_filter' => [
        'variables' => [
          'message' => NULL,
          'safe_join_items' => NULL,
        ],
        'template' => 'twig_extension_test.filter',
      ],
      'twig_extension_test_function' => [
        'render element' => 'element',
        'template' => 'twig_extension_test.function',
      ],
    ];
  }

}

Classes

Title Deprecated Summary
TwigExtensionTestHooks Hook implementations for twig_extension_test.

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.