public function AllProducts($sort = [])
    {
        // Setup the default sort for our products
        if (count($sort) == 0) {
            $sort = array(
                "SortOrder" => "ASC",
                "Title" => "ASC"
            );
        }
        
        $ids = array($this->ID);
        $ids = array_merge($ids, $this->getDescendantIDList());

        $products = CatalogueProduct::get()
            ->filter(array(
                "Categories.ID" => $ids,
                "Disabled" => 0
            ))->sort($sort);

        return $products;
    }
public function AllProducts($sort = [])
    {
        // Setup the default sort for our products
        if (count($sort) == 0) {
            $sort = array(
                "SortOrder" => "ASC",
                "Title" => "ASC"
            );
        }
        
        $ids = array($this->ID);
        $ids = array_merge($ids, $this->getDescendantIDList());

        $products = CatalogueProduct::get()
            ->filter(array(
                "Categories.ID" => $ids,
                "Disabled" => 0
            ))->sort($sort);

        return $products;
    }
public function AllProducts ( $ sort = [ ] ) { // Setup the default sort for our products if ( count ( $ sort ) == 0 ) { $ sort = array ( "SortOrder" => "ASC" , "Title" => "ASC" ) ; } $ ids = array ( $ this -> ID ) ; $ ids = array_merge ( $ ids , $ this -> getDescendantIDList ( ) ) ; $ products = CatalogueProduct :: get ( ) -> filter ( array ( "Categories.ID" => $ ids , "Disabled" => 0 ) ) -> sort ( $ sort ) ; return $ products ; }
Get a list of all products from this category and it's children
categories.

@return ArrayList
Get a list of all products from this category and it s children categories .