Skip to content

Commit

Permalink
finished Behavior - works! hooray!
Browse files Browse the repository at this point in the history
  • Loading branch information
hiqsol committed Apr 20, 2017
1 parent 5d4c9ac commit e7aa4cb
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/Behavior.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

namespace hiqdev\yii2\YandexMetrika;

use Yii;
use yii\web\View;

class Behavior extends \yii\base\Behavior
Expand All @@ -25,6 +26,15 @@ public function events()

public function onEndBody($event)
{
die('here');
echo $this->getBuilder()->render();
}

public function getBuilder()
{
if (!is_object($this->builder)) {
$this->builder = Yii::createObject($this->builder);
}

return $this->builder;
}
}

0 comments on commit e7aa4cb

Please # to comment.