Sunnysideup\Ecommerce\Config\EcommerceConfigAjax
This class returns the Ajax Definitions class.
The Ajax Definitions class is an object that contains all the values
for ajax references in the templates.
We need to have one per classname (e.g. Product)and requestor (Product A with ID = 1)
Synopsis
class EcommerceConfigAjax
{
- // members
- private static array $singleton = ;
- private static string $definitions_class_name = EcommerceConfigAjaxDefinitions::class;
- private static string $cart_js_file_location = 'client/javascript/EcomCart.js';
- private static string $dialogue_js_file_location = 'client/javascript/jquery.colorbox-min.js';
- private static string $quantity_field_js_location = 'client/javascript/EcomQuantityField.js';
- // methods
- public static EcommerceConfigAjaxDefinitions get_one()
Hierarchy
Uses
- SilverStripe\Core\Extensible
- SilverStripe\Core\Injector\Injectable
- SilverStripe\Core\Config\Configurable
Members
private
- $cart_js_file_location — string
- $definitions_class_name — string
- $dialogue_js_file_location — string
- $quantity_field_js_location — string
-
$singleton
implements singleton pattern so that there is only ever one instance of this class.
Methods
public
- get_one() — Returns the singleton instance of the Ajax Config definitions class.