/** * Renders a view in the block's folder. * <code> * public function view() { // The view() method is automatically run when a block is viewed * $this->render("other_special_view"); // don't use .php * } * </code> * @param string $view * @return void */ function render($view) { $bv = new BlockView(); $bv->setController($this); // sometimes we need the block type available in here if (is_object($this->getBlockObject())) { $bt = BlockType::getByID($this->getBlockObject()->getBlockTypeID()); $a = $this->getBlockObject()->getBlockAreaObject(); } $this->renderOverride = $view; }
/** * Renders a particular view of a block type, using the public $controller variable as the block type's controller * @param string template 'view' for the default * @return void */ public function render($view = 'view') { $bv = new BlockView(); $bv->setController($this->controller); $bv->render($this, $view); }