Back to PhocacartTag class

Method getAllTagsSelectBox

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

Method getAllTagsSelectBox - Source code

public static function getAllTagsSelectBox($name, $id, $activeArray, $javascript = NULL, $order = 'id', $type = 0, $attributes = '')
{
    $db = Factory::getDBO();
    $query = 'SELECT a.id AS value, a.title AS text' . ' FROM #__phocacart_tags AS a' . ' WHERE a.type =' . (int) $type . ' ORDER BY ' . $order;
    $db->setQuery($query);
    $tags = $db->loadObjectList();
    $tagsO = HTMLHelper::_('select.genericlist', $tags, $name, $attributes, 'value', 'text', $activeArray, $id);
    return $tagsO;
}