TestProfilerExtension.php

Same filename in this branch
  1. 11.x core/modules/system/tests/modules/sdc_other_node_visitor/src/Twig/Extension/TestProfilerExtension.php
Same filename in other branches
  1. 10 core/modules/sdc/tests/modules/sdc_other_node_visitor/src/Twig/Extension/TestProfilerExtension.php
  2. 10 core/modules/system/tests/modules/sdc_other_node_visitor/src/Twig/Extension/TestProfilerExtension.php

Namespace

Drupal\sdc_other_node_visitor\Twig\Extension

File

core/modules/sdc/tests/modules/sdc_other_node_visitor/src/Twig/Extension/TestProfilerExtension.php

View source
<?php

namespace Drupal\sdc_other_node_visitor\Twig\Extension;

use Drupal\sdc_other_node_visitor\Twig\NodeVisitor\TestNodeVisitor;
use Twig\Extension\AbstractExtension;

/**
 * Twig extension to add a test node visitor.
 */
class TestProfilerExtension extends AbstractExtension {
    
    /**
     * {@inheritdoc}
     */
    public function getNodeVisitors() : array {
        return [
            new TestNodeVisitor(static::class),
        ];
    }
    
    /**
     * Dummy function called when a Twig template is entered.
     */
    public function enter() {
        // NOOP.
    }
    
    /**
     * Dummy function called when a Twig template is left.
     */
    public function leave() {
        // NOOP.
    }

}

Classes

Title Deprecated Summary
TestProfilerExtension Twig extension to add a test node visitor.

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