Sunnysideup\Ecommerce\ProductsAndGroups\Applyers\ProductSorter
provides data on the user.
Synopsis
class ProductSorter
extends BaseApplyer
{
- // Inherited constants from BaseApplyer
- const DEFAULT_NAME = 'default';
- const SQL_PARAM_PLACEHOLDER = '[[PARAMS_GO_HERE]]';
- // members
- protected static array $defaultSortOrderFromFilter = ;
- private static array $options = ;
- // Inherited members from BaseApplyer
- protected ProductGroup $baseListOwner;
- protected FinalProductList $finalProductList;
- protected DataList $products;
- protected string $selectedOption;
- protected boolean $applied;
- protected array|string $selectedOptionParams;
- // methods
- public static void setDefaultSortOrderFromFilter()
- public void apply()
- public array|string getSql()
- public void getOptions()
- // Inherited methods from BaseApplyer
- public void __construct()
- public abstract BaseApplyer apply()
- public void getOptions()
- public void getProducts()
- public void getSelectedOption()
- public void getSelectedOptionParams()
- public void getOptionsMap()
- public void getTitle()
- public array|string getSql()
- public void getRequiresData()
- public void IsShowFullList()
- public mixed checkOption()
- protected array|string sqlPlaceholderReplacer()
- protected void applyStart()
- protected void applyEnd()
Hierarchy
Tasks
Line | Task |
---|---|
89 | make smarter... |
Constants
Name | Value |
---|---|
DEFAULT_NAME | 'default' |
SQL_PARAM_PLACEHOLDER | '[[PARAMS_GO_HERE]]' |
Members
private
- $options — array
protected
- $applied
- $baseListOwner
—
Sunnysideup\Ecommerce\Pages\ProductGroup
a product group that creates the base list. - $defaultSortOrderFromFilter
- $finalProductList
—
Sunnysideup\Ecommerce\ProductsAndGroups\Builders\FinalProductList
final product list object, always present. - $products — SilverStripe\ORM\DataList
- $selectedOption — string
- $selectedOptionParams — Sunnysideup\Ecommerce\ProductsAndGroups\Applyers\array|string
Methods
public
- apply()
- getOptions() — you can add an extra sort (or two), based on filters (or other stuff.).
- getSql() — if the key is default and you provide a param of IDs then it sort by params.
- setDefaultSortOrderFromFilter()
Inherited from Sunnysideup\Ecommerce\ProductsAndGroups\Applyers\BaseApplyer
protected
- applyEnd()
- applyStart()
- sqlPlaceholderReplacer() — get the sql for an option.
public
- IsShowFullList() — get the sql for an option.
- apply() — manipulates the product lists.
- checkOption() — check for one option. If no return value is specified then all of the options are returned.
- getOptions()
- getOptionsMap() — dropdown list of options.
- getProducts()
- getRequiresData() — get the UsesParamData for an option.
- getSelectedOption()
- getSelectedOptionParams()
- getSql() — get the sql for an option.
- getTitle() — get the title for an option.