You are here

public function ProfilerExtension::enter in Devel 8

Same name and namespace in other branches
  1. 8.3 webprofiler/src/Twig/Extension/ProfilerExtension.php \Drupal\webprofiler\Twig\Extension\ProfilerExtension::enter()
  2. 8.2 webprofiler/src/Twig/Extension/ProfilerExtension.php \Drupal\webprofiler\Twig\Extension\ProfilerExtension::enter()
  3. 4.x 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);
}