ProductsShowable() public méthode

Retrieve a set of products, based on the given parameters. Checks get query for sorting and pagination.
public ProductsShowable ( boolean $recursive = true ) : PaginatedList
$recursive boolean include sub-categories
Résultat PaginatedList
 public function testZeroPriceWithVariations()
 {
     Config::inst()->update('ProductCategory', 'must_have_price', true);
     $products = $this->electronics->ProductsShowable();
     $this->assertEquals(0, $products->count(), 'No product should be returned as there\'s no price set');
     // Create a variation for HDTV
     ProductVariation::create(array('InternalItemID' => '50-Inch', 'Price' => 1200, 'ProductID' => $this->hdtv->ID))->write();
     $products = $this->electronics->ProductsShowable();
     $this->assertDOSEquals(array(array('URLSegment' => 'hdtv')), $products, 'HDTV has a priced extension and should now show up in the list of products');
 }