template = $template; $this->model = $viewModel; $this->allowTags = (bool)$allowTags; } /** * @param array $fieldValues * @return bool */ protected function _validateFieldData(array $fieldValues) { return true; } public function insertData() { $path = $this->template->getPHTMLPath(); if(file_exists(realpath($path))) { ob_start(); include($path); $content = ob_get_clean(); } else { throw new \InvalidArgumentException("No file under '" . $path . "'."); } $this->template->setRenderedContent($content); } }