removed id property from Block widget

fixes #2196
This commit is contained in:
Carsten Brandt
2014-01-28 18:05:47 +01:00
parent f26dcafbed
commit 32b9f87bdf

View File

@@ -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;
}
}