| Conditions | 6 |
| Paths | 6 |
| Total Lines | 13 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 21 | public function display(array $properties): string |
||
| 22 | { |
||
| 23 | $title = !empty($properties['title']) ? $properties['title'] : ''; |
||
| 24 | if ((!$this->hasPermission('Templateblock::', $title . '::', ACCESS_OVERVIEW)) |
||
| 25 | || (!$this->hasPermission('Templateblock::bid', '::' . $properties['bid'], ACCESS_OVERVIEW))) { |
||
| 26 | return ''; |
||
| 27 | } |
||
| 28 | $path = $properties['path'] ?? ''; |
||
| 29 | if (empty($path) || !$this->twig->getLoader()->exists($path)) { |
||
| 30 | return ''; |
||
| 31 | } |
||
| 32 | |||
| 33 | return $this->renderView($path); |
||
| 34 | } |
||
| 41 |