Lines Matching refs:val
23 * This is intended to be only called from within DropdownElement::val()
27 * @see DropdownElement::val()
62 foreach ($options as $key => $val) {
63 if (is_array($val)) {
64 if (!array_key_exists('label', $val)) {
70 array_key_exists('attrs', $val) &&
71 is_array($val['attrs']) &&
72 array_key_exists('selected', $val['attrs'])
75 'Please use function "DropdownElement::val()" to set the selected option'
78 $this->options[$key] = $val;
80 $this->options[$val] = ['label' => (string)$val];
82 $this->options[$key] = ['label' => (string)$val];
110 foreach ($this->options as $key => $val) {
113 if (!empty($val['attrs']) && is_array($val['attrs'])) {
114 $attrs = buildAttributes($val['attrs']);
117 $html .= hsc($val['label']);