You are here

public function ProfilerExtension::enter in Devel 4.x

Same name and namespace in other branches
  1. 8.3 webprofiler/src/Twig/Extension/ProfilerExtension.php \Drupal\webprofiler\Twig\Extension\ProfilerExtension::enter()
  2. 8 webprofiler/src/Twig/Extension/ProfilerExtension.php \Drupal\webprofiler\Twig\Extension\ProfilerExtension::enter()
  3. 8.2 webprofiler/src/Twig/Extension/ProfilerExtension.php \Drupal\webprofiler\Twig\Extension\ProfilerExtension::enter()

File

webprofiler/src/Twig/Extension/ProfilerExtension.php, line 38

Class

ProfilerExtension
Class ProfilerExtension.

Namespace

Drupal\webprofiler\Twig\Extension

Code

public function enter(\Twig_Profiler_Profile $profile) {
  if ($this->stopwatch && $profile
    ->isTemplate()) {
    $this->events[$profile] = $this->stopwatch
      ->start($profile
      ->getName(), 'template');
  }
  parent::enter($profile);
}