Class yii\twig\Profile
Inheritance | yii\twig\Profile » Twig_Extension_Profiler |
---|---|
Source Code | https://github.com/yiisoft/yii2-twig/blob/master/src/Profile.php |
Property Details
Method Details
public void __construct ( \Twig_Profiler_Profile $profile ) | ||
$profile |
public function __construct(Twig_Profiler_Profile $profile)
{
$profile = new \Twig_Profiler_Profile();
$dumper = new \Twig_Profiler_Dumper_Text();
parent::__construct($profile);
$view = \Yii::$app->getView();
$view->on(View::EVENT_AFTER_RENDER, function () use ($profile, $dumper) {
\Yii::trace($dumper->dump($profile));
});
}