| Conditions | 4 |
| Paths | 2 |
| Total Lines | 8 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 16 | public function renderTemplate(Plates\Template $template, Plates\RenderTemplate $rt = null) { |
||
| 17 | $path = $template->get('path'); |
||
| 18 | if (!$path || ($this->file_exists)($path)) { |
||
| 19 | return $this->render->renderTemplate($template, $rt ?: null); |
||
| 20 | } |
||
| 21 | |||
| 22 | throw new Plates\Exception\RenderTemplateException('Template path ' . $path . ' is not a valid path for template: ' . $template->name); |
||
| 23 | } |
||
| 24 | } |
||
| 25 |