| Conditions | 2 |
| Paths | 2 |
| Total Lines | 13 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 17 | protected function renderItem($item) |
||
| 18 | { |
||
| 19 | if (isset($item['url'])) { |
||
| 20 | $template = ArrayHelper::getValue($item, 'template', $this->linkTemplate); |
||
| 21 | return strtr($template, [ |
||
| 22 | '{url}' => Html::encode(Url::to($item['url'])), |
||
| 23 | '{label}' => $item['label'], |
||
| 24 | '{options}' => trim(Html::renderTagAttributes(ArrayHelper::getValue($item, 'linkOptions', []))) |
||
| 25 | ]); |
||
| 26 | } |
||
| 27 | $template = ArrayHelper::getValue($item, 'template', $this->labelTemplate); |
||
| 28 | return strtr($template, [ |
||
| 29 | '{label}' => $item['label'], |
||
| 30 | ]); |
||
| 32 | } |