setQuery( $query ); $messages = $db->loadObjectList(); $options = array(); if ($messages) { foreach($messages as $message) { $options[] = HTMLHelper::_('select.option', $message->id, $message->title); } } $attr = ''; $attr .= $this->required ? ' required aria-required="true"' : ''; $attr .= ' class="form-control"'; array_unshift($options, HTMLHelper::_('select.option', '', '- '.Text::_('COM_PHOCADOWNLOAD_SELECT_FILE').' -', 'value', 'text')); return HTMLHelper::_('select.genericlist', $options, $this->name, trim($attr), 'value', 'text', $this->value, $this->id ); } } ?>