/** * Initialize the block instance and set the layout and other parameters * * @param string $block * @param string $blockName * @return Core_Block_Abstract */ public function createBlock($type, $name = '', array $attributes = array()) { try { $block = $this->_getBlockInstance($type, $attributes); } catch (Exception $e) { App_Main::logException($e); return false; } $block->setType($type); $block->setNameInLayout($name); $block->addData($attributes); $block->setLayout($this); $this->_blocks[$name] = $block; return $this->_blocks[$name]; }