Back to PhocacartTag class

Method getAllTagsList

public static
getAllTagsList
(mixed $order = 'id', mixed $type = 0)

Method getAllTagsList - Source code

public static function getAllTagsList($order = 'id', $type = 0)
{
    $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();
    return $tags;
}