service->config->design->is_custom) { $this->template = $this->composeFromPartials(json_decode(json_encode($this->service->config->design->design), true)); } else { $this->template = file_get_contents(config('ninja.designs.base_path') . strtolower($this->service->config->design->name) . '.html'); } return $this; } /** * If the user has implemented a custom design, then we need to rebuild the design at this point */ /** * Returns the custom HTML design as * a string * * @param array * @return string * */ private function composeFromPartials(array $partials) :string { $html = ''; $html .= $partials['includes']; $html .= $partials['header']; $html .= $partials['body']; $html .= $partials['footer']; return $html; } }