Sunnysideup\Ecommerce\Pages\ProductGroupController
Synopsis
class ProductGroupController
extends PageController
{
- // members
- protected DataList $productList;
- protected FinalProductList $finalProductList;
- protected string $originalTitle = '';
- protected $userPreferencesObject;
- protected ProductSearchForm $searchForm;
- protected bool $isSearchResults = false;
- protected string $secondaryTitle = '';
- protected $hasManyProductsCache;
- protected $totalRawCountCache;
- private static integer $minimum_number_of_pages_to_show_filters_and_sort = 3;
- private static array $allowed_actions = ;
- // methods
- public void index()
- public void CachingRelatedJavascript()
- public SS_List getProductList()
- public PaginatedList Products()
- public void ProductGroupListCachingKey()
- public void ProductGroupListCachingKeyForTemplate()
- public void ProductGroupListAreCacheable()
- public void ProductGroupListAreAjaxified()
- public void OriginalTitle()
- public void SidebarProducts()
- public void MenuChildGroups()
- public void ShowGroupFilterLinks()
- public void ShowSearchFilterLinks()
- public void ShowFilterLinks()
- public void ShowSortLinks()
- public void ShowDisplayLinks()
- public void ShowGroupFilterSortDisplayLinks()
- public void HasManyProducts()
- public void HasSearchFilter()
- public void HasGroupFilter()
- public void HasFilter()
- public void HasSort()
- public void HasDisplay()
- public void HasGroupFilterSortDisplay()
- public void HasSearchFilters()
- public void HasGroupFilters()
- public void HasFilters()
- public void HasSorts()
- public void HasDisplays()
- public void MaxNumberOfProductsPerPage()
- public void TotalCount()
- public void getCurrentPageNumber()
- public void getUserPreferencesTitle()
- public void getCurrentSearchFilterTitle()
- public void getCurrentGroupFilterTitle()
- public void getCurrentFilterTitle()
- public void getCurrentSortTitle()
- public void getCurrentDisplayTitle()
- public void getSearchFilterHeader()
- public void getGroupFilterHeader()
- public void getFilterHeader()
- public void getSortHeader()
- public void getDisplayHeader()
- public string MyDefaultDisplayStyle()
- public ArrayList( SearchFilterLinks()
- public ArrayList( GroupFilterLinks()
- public ArrayList( FilterLinks()
- public void SortLinks()
- public void DisplayLinks()
- public void getLink()
- public void Link()
- public void ResetPreferencesLink()
- public void ListAllLink()
- public void ListAFewLink()
- public DataList SearchResultsChildGroups()
- public ProductSearchForm ProductSearchForm()
- public void HasSearchResults()
- public void ShowSearchFormImmediately()
- public void ShowSearchFormAtAll()
- public void IsSearchResults()
- public void getCurrentUserPreferencesKey()
- public void getCurrentUserPreferencesParams()
- public FinalProductList getFinalProductList()
- public void DebugSearchString()
- public void VardumpMe()
- public void setSecondaryTitle()
- public void getSecondaryTitle()
- protected void saveUserPreferences()
- protected void setSearchString()
- protected void afterHandleRequest()
- protected void getCachedProductList()
- protected void setCachedProductList()
- protected void getLinkTemplate()
- protected void init()
- protected void setIdArrayDefaultSort()
- protected void returnAjaxifiedProductList()
- protected void productListsHTMLCanBeCached()
- protected void paginateList()
- protected void MaxNumberOfProductsPerPageAbsolute()
- protected void IsShowFullList()
- protected ProductSearchFilter getSearchApplyer()
- protected void defaultReturn()
- protected void getUserPreferencesClass()
- protected void addSecondaryTitle()
Hierarchy
Extends
- PageController
Tasks
Line | Task |
---|---|
624+ | : to cleanup |
812 | FIX! |
Members
private
- $allowed_actions
- $minimum_number_of_pages_to_show_filters_and_sort
protected
- $finalProductList
—
Sunnysideup\Ecommerce\ProductsAndGroups\Builders\FinalProductList
the final product list that we use to collect products. - $hasManyProductsCache
- $isSearchResults
—
Sunnysideup\Ecommerce\Pages\bool
Is this a product search? - $originalTitle
—
string
The original Title of this page before filters, etc... - $productList
—
SilverStripe\ORM\DataList
the exact list of products that is going to be shown (excluding pagination). - $searchForm
—
Sunnysideup\Ecommerce\Forms\ProductSearchForm
form for searching. - $secondaryTitle
- $totalRawCountCache
- $userPreferencesObject
Methods
protected
- IsShowFullList()
- MaxNumberOfProductsPerPageAbsolute()
- addSecondaryTitle()
- afterHandleRequest()
- defaultReturn()
- getCachedProductList()
- getLinkTemplate() — returns the current page with get variables. If a type is specified then instead of the value for that type, we add: '[[INSERT_HERE]]'.
- getSearchApplyer()
- getUserPreferencesClass()
- init()
- paginateList() — turns full list into paginated list.
- productListsHTMLCanBeCached() — Overload this function of ProductGroup Extensions.
- returnAjaxifiedProductList() — Overload this function of ProductGroup Extensions.
- saveUserPreferences()
- setCachedProductList()
- setIdArrayDefaultSort()
- setSearchString()
public
- CachingRelatedJavascript() — adds Javascript to the page to make it work when products are cached.
- DebugSearchString()
- DisplayLinks() — Provides a ArrayList for displaying display links.
- FilterLinks() — Provides a ArrayList of links for filters products.
- GroupFilterLinks() — Provides a ArrayList of links for filters products.
- HasDisplay()
- HasDisplays() — Are filters available? we check one at the time so that we do the least amount of DB queries.
- HasFilter()
- HasFilters() — Are filters available? we check one at the time so that we do the least amount of DB queries.
- HasGroupFilter()
- HasGroupFilterSortDisplay()
- HasGroupFilters() — Are group filters available? we check one at the time so that we do the least amount of DB queries.
- HasManyProducts()
- HasSearchFilter()
- HasSearchFilters() — we can use this for pre-set search filters.
- HasSearchResults() — Does this page have any search results? If search was carried out without returns then it returns zero (false).
- HasSort()
- HasSorts() — Are filters available? we check one at the time so that we do the least amount of DB queries.
- IsSearchResults() — Is the current page a display of search results.
- Link()
- ListAFewLink()
- ListAllLink()
- MaxNumberOfProductsPerPage() — Number of entries per page limited by total number of pages available...
- MenuChildGroups() — Returns child product groups for use in 'in this section'. For example the vegetable Product Group may have listed here: Carrot, Cabbage, etc...
- MyDefaultDisplayStyle() — short-cut for getListConfigCalculated("DISPLAY") for use in templtes.
- OriginalTitle() — title without additions.
- ProductGroupListAreAjaxified() — is the product list ajaxified.
- ProductGroupListAreCacheable() — Is the product list cache-able?
- ProductGroupListCachingKey() — Unique caching key for the product list...
- ProductGroupListCachingKeyForTemplate() — Important Unique caching key for the product list...
- ProductSearchForm() — returns a search form to search current products ready to search.
- Products() — Return the products for this group.
- ResetPreferencesLink()
- SearchFilterLinks() — Provides a ArrayList of links for filters products.
- SearchResultsChildGroups() — After a search is conducted you may end up with a bunch of recommended product groups. They will be returned here...
- ShowDisplayLinks()
- ShowFilterLinks()
- ShowGroupFilterLinks()
- ShowGroupFilterSortDisplayLinks()
- ShowSearchFilterLinks()
- ShowSearchFormAtAll() — Show a search form on this page?
- ShowSearchFormImmediately() — Should the product search form be shown immediately?
- ShowSortLinks()
- SidebarProducts() — This method can be extended to show products in the side bar.
- SortLinks() — Provides a ArrayList of links for sorting products.
- TotalCount()
- VardumpMe()
- getCurrentDisplayTitle()
- getCurrentFilterTitle() — returns the current filter applied to the list in a human readable string.
- getCurrentGroupFilterTitle() — returns the current filter applied to the list in a human readable string.
- getCurrentPageNumber()
- getCurrentSearchFilterTitle() — returns the current searcj filter applied to the list in a human readable string.
- getCurrentSortTitle() — returns the current sort applied to the list in a human readable string.
- getCurrentUserPreferencesKey()
- getCurrentUserPreferencesParams()
- getDisplayHeader()
- getFilterHeader()
- getFinalProductList() — Retrieve a list of products, based on the given parameters.
- getGroupFilterHeader()
- getLink()
- getProductList() — get the unpaginated list. Only set once.
- getSearchFilterHeader()
- getSecondaryTitle()
- getSortHeader()
- getUserPreferencesTitle()
- index()
- setSecondaryTitle()