SilverShop\Page\ProductCategory
Product Category provides a way to hierartically categorise products.
It contains functions for versioning child products
Synopsis
class ProductCategory
extends Page
implements
i18nEntityProvider
{
- // members
- private static array $belongs_many_many = ;
- private static string $singular_name = 'Category';
- private static string $plural_name = 'Categories';
- private static string $icon = 'silvershop/core: client/dist/images/icons/folder.gif';
- private static string $table_name = 'SilverShop_ProductCategory';
- private static string $default_child = 'Product';
- private static boolean $include_child_groups = true;
- private static integer $page_length = 12;
- private static boolean $must_have_price = true;
- private static array $sort_options = ;
- // methods
- public DataList ProductsShowable()
- public void AllChildCategoryIDs()
- public DataList ChildCategories()
- public DataList GroupsMenu()
- public void NestedTitle()
- public void provideI18nEntities()
Hierarchy
Extends
- Page
Implements
- SilverStripe\i18n\i18nEntityProvider
Members
private
- $belongs_many_many
- $default_child
- $icon
- $include_child_groups
- $must_have_price
- $page_length
- $plural_name
- $singular_name
- $sort_options
- $table_name
Methods
public
- AllChildCategoryIDs() — Loop down each level of children to get all ids.
- ChildCategories() — Return children ProductCategory pages of this category.
- GroupsMenu() — Recursively generate a product menu, starting from the topmost category.
- NestedTitle() — Override the nested title defaults, to show deeper nesting in the CMS.
- ProductsShowable() — Retrieve a set of products, based on the given parameters. Checks get query for sorting and pagination.
- provideI18nEntities()