Back to PhocaDownloadTag class

Method getAllTagsSelectBox

public static
getAllTagsSelectBox
(mixed $name, mixed $id, mixed $activeArray, mixed $javascript = NULL, mixed $order = 'id')

Method getAllTagsSelectBox - Source code

public static function getAllTagsSelectBox($name, $id, $activeArray, $javascript = NULL, $order = 'id')
{
    $db = Factory::getDBO();
    $query = 'SELECT a.id AS value, a.title AS text' . ' FROM #__phocadownload_tags AS a' . ' ORDER BY ' . $order;
    //. ' ORDER BY a.id';
    $db->setQuery($query);
    /*if (!$db->execute()) {
    			echo PhocaDownloadException::renderErrorInfo('Database Error - Getting All Tags');
    			return false;
    		}*/
    $tags = $db->loadObjectList();
    $tagsO = HTMLHelper::_('select.genericlist', $tags, $name, 'class="form-select" size="4" multiple="multiple"' . $javascript, 'value', 'text', $activeArray, $id);
    return $tagsO;
}