Browse Source

Allow single items to set their encoding option

tags/2.0.0-rc
Alex-Code 10 years ago
parent
commit
7e06edd191
  1. 3
      Dropdown.php

3
Dropdown.php

@ -80,7 +80,8 @@ class Dropdown extends Widget
if (!isset($item['label'])) {
throw new InvalidConfigException("The 'label' option is required.");
}
$label = $this->encodeLabels ? Html::encode($item['label']) : $item['label'];
$encodeLabel = isset($item['encode']) ? $item['encode'] : $this->encodeLabels;
$label = $encodeLabel ? Html::encode($item['label']) : $item['label'];
$options = ArrayHelper::getValue($item, 'options', []);
$linkOptions = ArrayHelper::getValue($item, 'linkOptions', []);
$linkOptions['tabindex'] = '-1';

Loading…
Cancel
Save