Class yii\twig\Profile
| Inheritance | yii\twig\Profile » Twig\Extension\ProfilerExtension | 
|---|---|
| Source Code | https://github.com/yiisoft/yii2-twig/blob/master/src/Profile.php | 
Protected Properties
| Property | Type | Description | Defined By | 
|---|---|---|---|
| $profiler | yii\twig\Profile | ||
| $view | yii\twig\Profile | 
Property Details
Method Details
| 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));
    });
}