/** * Render a view for a bind * @param string $view The requested view * @return string The rendered view */ protected function bindView($view) { // Render the view $view = $this->partialRenderer->renderPartial($view, $this->model); // Reset the partialRenderer's view tree $this->partialRenderer->resetTree(); return $view; }
/** * Render an button * @param array $params An array containing the text and href of the button * @return string The rendered button */ protected function getButton($params = array()) { $text = isset($params[0]) ? $params[0] : ''; $link = isset($params[1]) ? $params[1] : ''; $button = $this->partialRenderer->renderPartial('components/button', array('text' => $text, 'link' => $link)); // Reset the tree so we can render the same view again $this->partialRenderer->resetTree(); return $button; }