Class yii\twig\Profile
Inheritance | yii\twig\Profile » Twig\Extension\ProfilerExtension |
---|---|
Source Code | https://github.com/yiisoft/yii2-twig/blob/master/Profile.php |
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));
});
}