From 32b9f87bdfe216e371d258d0e81d732ca768aa40 Mon Sep 17 00:00:00 2001 From: Carsten Brandt Date: Tue, 28 Jan 2014 18:05:47 +0100 Subject: [PATCH] removed id property from Block widget fixes #2196 --- framework/widgets/Block.php | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/framework/widgets/Block.php b/framework/widgets/Block.php index fdd210f4d8..4eec21794c 100644 --- a/framework/widgets/Block.php +++ b/framework/widgets/Block.php @@ -15,10 +15,6 @@ use yii\base\Widget; */ class Block extends Widget { - /** - * @var string the ID of this block. - */ - public $id; /** * @var boolean whether to render the block content in place. Defaults to false, * meaning the captured block content will not be displayed. @@ -36,7 +32,7 @@ class Block extends Widget /** * Ends recording a block. - * This method stops output buffering and saves the rendering result as a named block in the controller. + * This method stops output buffering and saves the rendering result as a named block in the view. */ public function run() { @@ -44,6 +40,6 @@ class Block extends Widget if ($this->renderInPlace) { echo $block; } - $this->view->blocks[$this->id] = $block; + $this->view->blocks[$this->getId()] = $block; } }