| Conditions | 5 |
| Paths | 4 |
| Total Lines | 17 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 28 | public function render() |
||
| 29 | { |
||
| 30 | $iface = '\Aimeos\Base\View\Iface'; |
||
| 31 | $view = $this->templateVariableContainer->get('_aimeos_view'); |
||
| 32 | |||
| 33 | if (!is_object($view) || !($view instanceof $iface)) { |
||
| 34 | throw new Exception('Aimeos view object is missing'); |
||
| 35 | } |
||
| 36 | |||
| 37 | if (!isset($this->arguments['key'])) { |
||
| 38 | throw new Exception('Attribute "key" missing for Aimeos config view helper'); |
||
| 39 | } |
||
| 40 | |||
| 41 | $key = $this->arguments['key']; |
||
| 42 | $default = (isset($this->arguments['default']) ? $this->arguments['default'] : null); |
||
| 43 | |||
| 44 | return $view->config($key, $default); |
||
| 45 | } |
||
| 47 |