SilverCart\Model\Pages\ProductGroupHolderController
ProductGroupHolder Controller class.
- Author: Sebastian Diel <sdiel@pixeltricks.de>
- Copyright: 2017 pixeltricks GmbH
- License: see license file in modules root directory
Synopsis
class ProductGroupHolderController
extends PageController
{
- // members
- protected ArrayList $groupProducts;
- protected ArrayList $viewableChildren = NULL;
- // methods
- protected void init()
- public static array getRecursiveProductGroupsForGroupedDropdownAsArray()
- public static array getAllProductGroupsWithChildrenAsArray()
- public PaginatedList getViewableChildren()
- public boolean HasMoreViewableChildrenThan()
- public int getSqlOffsetForProductGroups()
- public string CacheKeyParts()
- public string CacheKey()
Hierarchy
Extends
- PageController
Members
protected
- $groupProducts
—
SilverStripe\ORM\ArrayList
List of the products - $viewableChildren
—
SilverStripe\ORM\ArrayList
Contains the viewable children of this page for caching purposes.
Methods
protected
- init() — statements to be called on oject instantiation
public
- CacheKey() — Returns the cache key for this product group
- CacheKeyParts() — Returns the cache key parts for this product group
- HasMoreViewableChildrenThan() — Indicates wether there are more viewable product groups than the given number.
- getAllProductGroupsWithChildrenAsArray() — Aggregates an array with ID => Title of all product groups that have children.
- getRecursiveProductGroupsForGroupedDropdownAsArray() — Builds an associative array of ProductGroups to use in GroupedDropDownFields.
- getSqlOffsetForProductGroups() — Return the start value for the limit part of the sql query that retrieves the product group list for the current product group page.
- getViewableChildren() — All viewable product groups of this group.