public function getReplace() { if (is_numeric($this->_key)) { $depth = ControllerModuleHtmlBlock::getDepth(); $args = array('html_block_id' => (int) $this->_key, 'depth' => $depth + 1); $action = new Action('module/html_block', $args); $file = $action->getFile(); $class = $action->getClass(); if (file_exists($file)) { require_once $file; $controller = new $class(app::registry()->get()); $controller->index($args); $this->_replace = $controller->getOutput(); } } return $this->_replace; }