Back to PhocaGalleryCategory class

Method getPath

public static
getPath
(mixed $path = array(), mixed $id = 0, mixed $parent_id = 0, mixed $title = '', mixed $alias = '')

Method getPath - Source code

/*
	public static function getChildren($id) {
		$db = Factory::getDBO();
		$query = 'SELECT a.title, a.alias, a.id'
		. ' FROM #__phocagallery_categories AS a'
		. ' WHERE a.parent_id = '.(int)$id
		. ' ORDER BY a.ordering';
		$db->setQuery( $query );
		$categories = $db->loadObjectList();
		return $categories;
	}
*/
public static function getPath($path = array(), $id = 0, $parent_id = 0, $title = '', $alias = '')
{
    if (empty(self::$categoryA[$id])) {
        self::$categoryP[$id] = self::getPathTree($path, $id, $parent_id, $title, $alias);
    }
    return self::$categoryP[$id];
}