SilverCart\Control\ActionHandler
Central handler for form actions.
- Author: Sebastian Diel <sdiel@pixeltricks.de>
- Copyright: 2017 pixeltricks GmbH
- License: see license file in modules root directory
Synopsis
class ActionHandler
extends Controller
{
- // members
- private static array $allowed_actions = ;
- private static string $url_segment = 'sc-action';
- // methods
- public static Page|null PageByIdentifierCode()
- public static string PageByIdentifierCodeLink()
- public void addToCart()
- public void decrementPositionQuantity()
- public void incrementPositionQuantity()
- public void changePositionQuantity()
- public HTTPResponse|null redirectBack()
- public void doSearch()
- public void doLogin()
- public DBHTMLText loadSubNavigation()
- public HTTPResponse cookieManager()
- public string getAcceptAllCookiesLink()
- public bool isAjaxRequest()
Hierarchy
Extends
- SilverStripe\Control\Controller
Members
private
- $allowed_actions
—
array
Allowed actions - $url_segment
—
string
URL segment
Methods
public
- PageByIdentifierCode() — returns a single page by IdentifierCode used to retrieve links dynamically
- PageByIdentifierCodeLink() — returns a page link by IdentifierCode
- addToCart() — Action to add a product to cart.
- changePositionQuantity() — Decrements the shopping cart position quantity by 1.
- decrementPositionQuantity() — Decrements the shopping cart position quantity by 1.
- doLogin() — Action to do a login
- doSearch() — Action to execute a search query
- getAcceptAllCookiesLink() — Returns the link to accept all cookies.
- incrementPositionQuantity() — Increments the shopping cart position quantity by 1.
- isAjaxRequest() — Returns whether the current request was called via AJAX.
- redirectBack() — Executes a redirect to the given back link or the referer page.