| Conditions | 4 |
| Paths | 2 |
| Total Lines | 13 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 16 | public function renderTemplate(Plates\Template $template, Plates\RenderTemplate $rt = null) { |
||
| 17 | $ref = $template->reference; |
||
| 18 | $contents = $this->render->renderTemplate($template, $rt ?: $this); |
||
| 19 | |||
| 20 | if ($ref()->get('layout') || $ref()->get('is_default_layout')) { |
||
| 21 | return $contents; |
||
| 22 | } |
||
| 23 | |||
| 24 | $layout = $ref()->fork($this->layout_path, [], ['is_default_layout' => true]); |
||
| 25 | $ref()->with('layout', $layout->reference); |
||
| 26 | |||
| 27 | return $contents; |
||
| 28 | } |
||
| 29 | |||
| 38 |