CategoryModel::getAll PHP Method

getAll() public method

Get list of categories (disregarding user permission for admins).
Since: 2.0.0
public getAll ( ) : object
return object SQL results.
    public function getAll()
    {
        $CategoryData = $this->SQL->select('c.*')->from('Category c')->orderBy('TreeLeft', 'asc')->get();
        $this->AddCategoryColumns($CategoryData);
        return $CategoryData;
    }

Usage Example

 public function indexAction()
 {
     $View = new View('category/list');
     $View->assign('_title_', _('Categories'));
     $categories = CategoryModel::getAll();
     $View->assign('categories', $categories);
     $View->display();
 }
All Usage Examples Of CategoryModel::getAll