Sunnysideup\Ecommerce\ProductsAndGroups\Builders\FinalProductList
A wrapper for a paginated of products which can be filtered and sorted.
This list is linked to a controller and can be changed (the base group list is usually the same)
- Author: : Nicolaas [at] Sunny Side Up .co.nz
Synopsis
class FinalProductList
extends AbstractProductsAndGroupsList
{
- // members
- protected BaseProductList $baseProductList;
- protected ProductGroupController $rootGroupController;
- protected array $filterForCandidateCategoryIdsFiltered = ;
- protected array $alsoShowParentIdsFiltered = ;
- protected array $alsoShowProductsIdsFiltered = ;
- protected static FinalProductList $singleton_cache;
- protected $rawCountCachedCache;
- private static array $group_filter_candidates_sort = ;
- // Inherited members from AbstractProductsAndGroupsList
- protected DataList $products;
- protected ProductGroup $rootGroup;
- // methods
- public void __construct()
- public static FinalProductList inst()
- public void setRootGroupController()
- public void getBuyableClassName()
- public void setExtraFilter()
- public void setAlternativeSort()
- public BaseProductList getBaseProductList()
- public void apply()
- public void applySearchFilter()
- public void applyGroupFilter()
- public void applyFilter()
- public void applySorter()
- public void applyDisplayer()
- public void getAlsoShowProductsIds()
- public void getAlsoShowProductsIdsFiltered()
- public void getAlsoShowProducts()
- public void getAlsoShowProductsFiltered()
- public void getFilterForCandidateCategoryIds()
- public void getFilterForCandidateCategoryIdsFiltered()
- public void getFilterForCandidateCategories()
- public void getFilterForCandidateCategoriesFiltered()
- public void getAlsoShowParentIdsFiltered()
- public void getAlsoShowProductsProductGroupInclusiveFiltered()
- public void getParentGroupsBasedOnProductsFiltered()
- public void getParentGroupIds()
- public void getParentGroups()
- public void getAlsoShowParentIds()
- public void getAlsoShowParents()
- public void getAlsoShowParentsFiltered()
- public void getRawCountCached()
- // Inherited methods from AbstractProductsAndGroupsList
- public final void setRootGroup()
- public final void setProducts()
- public final ProductGroup getRootGroup()
- public final SS_List getProducts()
- public final void getProductIds()
- public final void getRawCount()
- public final void hasMoreThanOne()
- public final void getDirectProducts()
- public final void getDirectProductsExclusingAlsoShow()
- public final void getDirectProductsWithAlsoShow()
- public final void getAlsoShowProductsFromRootGroupExclusive()
- public final void getChildProductsInclusive()
- public final void getChildProductsExclusive()
- public abstract void getAlsoShowProductsIds()
- public abstract void getAlsoShowProducts()
- public final void getAlsoShowProductsExclusive()
- public abstract void getFilterForCandidateCategoryIds()
- public abstract void getFilterForCandidateCategories()
- public final void getParentGroupIdsBasedOnProducts()
- public final void getParentGroupsBasedOnProducts()
- public final void getParentGroupsBasedOnProductsExcludingRootGroup()
- public final void getDirectParentGroupsInclusive()
- public final void getDirectParentGroupsExclusive()
- public abstract void getParentGroupIds()
- public abstract void getParentGroups()
- public final void getParentGroupsExclusive()
- public abstract void getAlsoShowParentIds()
- public abstract void getAlsoShowParents()
- public final void getAlsoShowProductsProductGroupInclusive()
- public final void getAlsoShowProductsProductGroupsExclusive()
- public void getApplyerClassName()
- public BaseApplyer getApplyer()
- protected ProductGroupSchema getProductGroupSchema()
- protected final void getBuyableTableNameName()
- protected string getStage()
- protected void turnIdListIntoProductGroups()
Hierarchy
Tasks
Line | Task |
---|---|
257+ | use EcommerceCache |
275+ | use EcommerceCache |
96+ | : EcommerceCache candidate |
111+ | : EcommerceCache candidate |
191+ | : EcommerceCache candidate |
213+ | : EcommerceCache candidate |
224+ | : EcommerceCache candidate |
288+ | : EcommerceCache candidate |
319+ | : EcommerceCache candidate |
Members
private
- $group_filter_candidates_sort
protected
- $alsoShowParentIdsFiltered — array
- $alsoShowProductsIdsFiltered — array
- $baseProductList — Sunnysideup\Ecommerce\ProductsAndGroups\Builders\BaseProductList
- $filterForCandidateCategoryIdsFiltered — array
- $products — SilverStripe\ORM\DataList
- $rawCountCachedCache
- $rootGroup — Sunnysideup\Ecommerce\Pages\ProductGroup
- $rootGroupController — Sunnysideup\Ecommerce\Pages\ProductGroupController
- $singleton_cache
—
Sunnysideup\Ecommerce\ProductsAndGroups\Builders\FinalProductList
singleton_cache.
Methods
public
- __construct()
- apply()
- applyDisplayer()
- applyFilter()
- applyGroupFilter()
- applySearchFilter()
- applySorter()
- getAlsoShowParentIds()
- getAlsoShowParentIdsFiltered()
- getAlsoShowParents()
- getAlsoShowParentsFiltered()
- getAlsoShowProducts()
- getAlsoShowProductsFiltered()
- getAlsoShowProductsIds()
- getAlsoShowProductsIdsFiltered()
- getAlsoShowProductsProductGroupInclusiveFiltered()
- getBaseProductList() — returns the associated BaseProductList.
- getBuyableClassName()
- getFilterForCandidateCategories()
- getFilterForCandidateCategoriesFiltered()
- getFilterForCandidateCategoryIds()
- getFilterForCandidateCategoryIdsFiltered()
- getParentGroupIds() — required for SubGroups.
- getParentGroups()
- getParentGroupsBasedOnProductsFiltered()
- getRawCountCached()
- inst() — create instances.
- setAlternativeSort()
- setExtraFilter()
- setRootGroupController() — Set the root {@link ProductGroup} to display the products from.
Inherited from Sunnysideup\Ecommerce\ProductsAndGroups\Builders\AbstractProductsAndGroupsList
protected
- getBuyableTableNameName()
- getProductGroupSchema()
- getStage() — Returns a versioned record stage table suffix (i.e "" or "_Live").
- turnIdListIntoProductGroups()
public
- getAlsoShowParentIds()
- getAlsoShowParents()
- getAlsoShowProducts()
- getAlsoShowProductsExclusive() — like getAlsoShowProductsInclusive, but then without the Children from all groups i.e. exclude ones that have one of the groups as Parent.
- getAlsoShowProductsFromRootGroupExclusive()
- getAlsoShowProductsIds()
- getAlsoShowProductsProductGroupInclusive() — List of All Also Show Product Parents Excluding the Root Group INCLUDING any other Direct Parent Groups.
- getAlsoShowProductsProductGroupsExclusive() — List of All Also Show Product Parents Excluding the Root Group AND EXCLUDING any Parent Groups.
- getApplyer()
- getApplyerClassName()
- getChildProductsExclusive() — child products (including indirect children, but also show excluded).
- getChildProductsInclusive() — child products (including indirect children).
- getDirectParentGroupsExclusive() — With the current product list, return all the {@link ProductGroup} instances that the products are displayed under. This only returns the direct parents.
- getDirectParentGroupsInclusive() — This is the inverse of ProductGroupsFromAlsoShowProducts.
- getDirectProducts()
- getDirectProductsExclusingAlsoShow()
- getDirectProductsWithAlsoShow()
- getFilterForCandidateCategories()
- getFilterForCandidateCategoryIds()
- getParentGroupIds() — ids for getParentGroups.
- getParentGroupIdsBasedOnProducts()
- getParentGroups() — parent groups that come from the natural hierarchy the baselist knows about these.
- getParentGroupsBasedOnProducts() — KEY METHOD!
- getParentGroupsBasedOnProductsExcludingRootGroup() — Given the products for this page, retrieve the parent groups excluding the current one.
- getParentGroupsExclusive() — hierarchy parent groups excluding any parent groups that are included in AlsoShow.
- getProductIds() — IDs of all the products.
- getProducts() — Key Method! Returns a raw list of all the matching products without any pagination.
- getRawCount() — Returns the total number of products available before pagination is applied.
- getRootGroup()
- hasMoreThanOne() — Is there more than x products.
- setProducts() — Key Method! Returns a raw list of all the matching products without any pagination.
- setRootGroup() — Set the root {@link ProductGroup} to display the products from.