TestProfilerExtension.php
Same filename in this branch
Same filename in other branches
Namespace
Drupal\sdc_other_node_visitor\Twig\ExtensionFile
-
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.