SilverCart\Model\Widgets\BargainProductsWidget
Provides the a view of the bargain products.
You can define the number of products to be shown.
- Author: Sebastian Diel <sdiel@pixeltricks.de>
- Copyright: 2018 pixeltricks GmbH
- License: see license file in modules root directory
Synopsis
class BargainProductsWidget
extends Widget
{
- // members
- private static array $db = ;
- private static array $has_many = ;
- private static array $defaults = ;
- private static array $casting = ;
- private static string $table_name = 'SilvercartBargainProductsWidget';
- protected ArrayList $products = NULL;
- protected ArrayList $elements = NULL;
- // Inherited members from Widget
- public bool $useWidgetContainer;
- public static bool $use_product_pages_for_slider;
- public static bool $use_anything_slider;
- public static array $registeredFilterPlugins;
- // methods
- public string getFrontTitle()
- public string getFrontContent()
- public FieldList getCMSFields()
- public array fieldLabels()
- public ArrayList getElements()
- public void setElements()
- public SS_List Elements()
- public string ElementsContent()
- public ArrayList getProducts()
- public string WidgetCacheKey()
- // Inherited methods from Widget
- public array fieldLabels()
- public FieldList getCMSFields()
- public string getTitle()
- public bool DoUseWidgetContainer()
- public WidgetSet WidgetSet()
- public static void registerFilterPlugin()
Hierarchy
Extends
Members
private
- $casting
—
array
Casted Attributes. - $db
—
array
DB attributes of this widget - $defaults
—
array
Set default values. - $has_many
—
array
1:1 or 1:n relationships. - $table_name
—
string
DB table name
protected
public
- $registeredFilterPlugins
—
array
Contains a list of all registered filter plugins. - $useWidgetContainer
—
SilverCart\Model\Widgets\bool
Set whether to use the widget container divs or not. - $use_anything_slider
—
SilverCart\Model\Widgets\bool
Set this to false to disable anything slider. - $use_product_pages_for_slider
—
SilverCart\Model\Widgets\bool
Set this to false to use single elements for product slider
Methods
public
- Elements() — Returns a number of bargain products.
- ElementsContent() — Returns the content for non slider widgets
- WidgetCacheKey() — Creates the cache key for this widget.
- fieldLabels() — Field labels for display in tables.
- getCMSFields() — Returns the input fields for this widget.
- getElements() — Returns the elements
- getFrontContent() — Getter for the FrontContent depending on the set language
- getFrontTitle() — Getter for the front title depending on the set language
- getProducts() — Returns the products to inject into a product group
- setElements() — Sets the elements
Inherited from SilverCart\Model\Widgets\Widget
public
- DoUseWidgetContainer() — Indicate whether to use the widget container divs or not.
- WidgetSet() — Returns the related WidgetSet.
- fieldLabels() — Field labels for display in tables.
- getCMSFields() — Returns the input fields for this widget.
- getTitle() — Returns the title of this widget.
- registerFilterPlugin() — Registers an object as a filter plugin. Before getting the result set the method 'filter' is called on the plugin. It has to return an array with filters to deploy on the query.