Back to PhocacartCountry class

Method getAllCountries

public static
getAllCountries
(mixed $order = 'id')

Method getAllCountries - Source code

public static function getAllCountries($order = 'id')
{
    $db = Factory::getDBO();
    $query = 'SELECT a.id AS value, a.title AS text' . ' FROM #__phocacart_countries AS a' . ' ORDER BY ' . $order;
    $db->setQuery($query);
    $countries = $db->loadObjectList();
    return $countries;
}