Class yii\twig\Profile

Inheritanceyii\twig\Profile » Twig\Extension\ProfilerExtension
Source Code https://github.com/yiisoft/yii2-twig/blob/master/Profile.php

Protected Properties

Hide inherited properties

Property Type Description Defined By

Public Methods

Hide inherited methods

Method Description Defined By
__construct() yii\twig\Profile

Property Details

Hide inherited properties

$profiler protected property
protected $profiler null
$view protected property
protected $view null

Method Details

Hide inherited methods

__construct() public method

public void __construct ( \Twig\Profiler\Profile $profile )
$profile

                public function __construct(TwigProfile $profile)
{
    $profile = new TwigProfile();
    $dumper = new TextDumper();
    parent::__construct($profile);
    $view = \Yii::$app->getView();
    $view->on(View::EVENT_AFTER_RENDER, function () use ($profile, $dumper) {
        \Yii::trace($dumper->dump($profile));
    });
}