public function getAdminFormValue() { $view = new View(__DIR__ . '/confirmation_code.tpl'); $view->set('name', $this->fieldName); $view->set('value', $this->value); return $view->render(); }
public function getAdminFormValue() { $view = new View(__DIR__ . DIRECTORY_SEPARATOR . 'HasMany/admin.tpl'); $view->set('name', $this->szFieldName); $view->set('values', $this->loadLinkedData()); return $view->render(); }
public function getAdminFormValue() { $view = new View(__DIR__ . DIRECTORY_SEPARATOR . 'time_access.tpl'); $view->set('name', $this->szFieldName); $view->set('value', $this->aValue); return $view->render(); }
public function getAdminFormValue() { $view = new View(__DIR__ . '/email.tpl'); $view->set('name', $this->szFieldName); $view->set('value', $this->aValue); return $view->render(); }
public function testGetNameHelper() { $view = new View($this->viewPath); $helper = new basicHelper(); $view->addHelper($helper, 'CoolName'); $this->assertEquals($helper, $view->CoolName); }
public function generate() { $parseData = \EventController::callFilter(self::EventName, $this->data->getValue()); $view = new View($this->tpl->getValue()); $view->addHelper(new ViewHelper()); $view->set($parseData); $content = $view->render(); $writer = new Writer($this->url->getValue()); $writer->write($content); }
public function main() { $title = 'Средства аудита'; $begin = array($title => '#'); $view = new View(__DIR__ . '/../Views/index.tpl'); $this->outputHeader($begin, $title); print $view->render(); $this->outputFooter(); $this->output(); }
public function testAutoRender() { // $this->expectOutputString(self::ViewParamValue); $view = new View($this->viewPath); $view->set(self::ViewParamName, self::ViewParamValue); // $view->set(self::ViewParamName, self::ViewParamValue); $controller = new TestController(); $controller->setView($view); $controller->afterAction(); }
/** * @param array $vars * * @return string */ public function render() { // $this->beforeRender(); // $oldContents = ob_get_contents(); // if (sizeof(ob_list_handlers()) > 0) { ob_clean(); } else { ob_start(); } // $content = $this->renderFile($this->viewVars, $this->filePath); // if (!empty($this->layout)) { $vars = $this->viewVars; $vars['content_for_layout'] = $content; $this->layout->set($vars); $content = $this->layout->render(); } // print $oldContents; // $this->rendered = true; // return $content; }
public function set($key, $value) { if (!empty($this->view)) { $this->view->set($key, $value); } else { throw new Exception('View not defined'); } }
public function testIsRendered() { // $view = new View($this->viewPath); // $this->assertFalse($view->isRendered()); // $view->set('msg', 'hello world!'); // $result = $view->render(); $this->assertTrue($view->isRendered()); }
/** * * Enter description here ... * * @param unknown_type $tpl */ public function render($tpl = '') { ini_set('include_path', VIEW_PATH); $tpl = $this->detectTplFileName($tpl); $view = new View($tpl); $view->setViewVars($this->aParse); foreach ($this->viewHelpers as $name => $object) { $view->addHelper($object, $name); } $content = $view->render(); return $content; }