protected function _createOption($optionArray = [], $selected = null)
{
$output = null;
$optionElement = new Element();
$optionElement->init('option');
/* handle selected */
if (is_string($selected)) {
$selected = array_filter(explode(', ', $selected));
}
/* process options */
foreach ($optionArray as $key => $value) {
if ($key || $value) {
$output .= $optionElement->copy()->attr(['selected' => $value === $selected || in_array($value, $selected) ? 'selected' : null, 'value' => $value])->text(is_string($key) ? $key : $value);
}
}
return $output;
}