SilverCart\View\Printer\PrinterController
Default controller to get the print output for supported DataObjects.
The controller is called by using the URL rewrite rule
silvercart-print/$DataObjectName/$DataObjectID
and requires the methods printDataObject() and CanView() on the given
DataObject.
- Author: Sebastian Diel <sdiel@pixeltricks.de>
- Copyright: 2013 pixeltricks GmbH
- License: see license file in modules root directory
Synopsis
class PrinterController
extends PageController
{
- // Inherited members from PageController
- public static array $instanceMemorizer;
- protected Checkout $checkout;
- protected static array $moduleHtmlInjections;
- // methods
- protected void init()
- // Inherited methods from PageController
- public void __construct()
- public void BlockRequirement()
- public void RequireFullJavaScript()
- public void RequireI18nJavaScript()
- public void RequireCoreJavaScript()
- public void RequireExtendedJavaScript()
- public void RequireCookieBannerJavaScript()
- public bool RequireColorSchemeCSS()
- public DBHTMLText HeadCustomHtmlContent()
- public DBHTMLText HeaderCustomHtmlContent()
- public DBHTMLText BeforeFooterContent()
- public DBHTMLText FooterCustomHtmlContent()
- public bool BrowserIsIE()
- protected void init()
- public ChangeLanguageForm|null ChangeLanguageForm()
- public static ContentController|null error_response_for()
- public string getProtocol()
- public string ModuleHtmlInjections()
- public static void injectHtmlCode()
- public bool isLive()
- public bool isAjaxRequest()
- public bool CurrentMembersHasOrders()
- public DataList|null CurrentMembersOrders()
- public PaginatedList PaginatedCurrentMembersOrders()
- public string OrderSearchFormValue()
- public string ShopErrors()
- public array providePermissions()
- public Member|null CurrentRegisteredCustomer()
- public string logoutURL()
- public static SiteTree|null PageByIdentifierCode()
- public static string PageByIdentifierCodeLink()
- public DBHTMLText getSubNavigation()
- public bool showPrices()
- public bool showPricesGross()
- public bool showPricesNet()
- public ShoppingCart ShoppingCart()
- public ShoppingCart getCart()
- public Checkout getCheckout()
- public static array getRecursivePagesForGroupedDropdownAsArray()
- public DataList PaymentMethods()
- public Country|null ShippingCountry()
- public DataList getFooterColumns()
- public static SiteTree|null getDefaultHomepage()
- public string getYearRangeFrom()
- public void LostPasswordLink()
- public QuickSearchForm QuickSearchForm()
- public QuickLoginForm QuickLoginForm()
- public LoginForm LoginForm()
Hierarchy
Members
protected
- $checkout
—
SilverCart\Checkout\Checkout
Checkout. - $moduleHtmlInjections
—
array
Contains HTML code from modules that shall be inserted on the Page.ss template.
public
- $instanceMemorizer
—
array
Prevents recurring rendering of this page's controller.
Methods
protected
- init() — Executes the print controllers logic
Inherited from SilverCart\Model\Pages\PageController
protected
- init() — standard page controller
public
- BlockRequirement() — Blocks the requirement with the given $fileOrID.
- BrowserIsIE() — Returns whether the customers user agent is the MS Internet Explorer.
- ChangeLanguageForm() — Returns the ChangeLanguageForm.
- CurrentMembersHasOrders() — Returns whether the current member has any orders.
- CurrentMembersOrders() — template function: returns customers orders
- CurrentRegisteredCustomer() — Function similar to Security::getCurrentUser(); Determines if we deal with a registered customer who has opted in. Returns the member object or false.
- HeadCustomHtmlContent() — Returns custom HTML code to place within the <head> tag, injected by extensions.
- HeaderCustomHtmlContent() — Returns custom HTML code to place right after the <body> tag, injected by extensions.
- LoginForm() — Returns the LoginForm.
- LostPasswordLink() — Returns the link to lost password form dependent on the current locale.
- ModuleHtmlInjections() — Returns HTML code that has been created by SilverCart modules.
- OrderSearchFormValue() — Returns the value for the query field of the OrderSeachForm.
- PageByIdentifierCode() — returns a single page by IdentifierCode used to retrieve links dynamically
- PageByIdentifierCodeLink() — returns a page link by IdentifierCode
- PaginatedCurrentMembersOrders() — Returns the CurrentMembersOrders as a PaginatedList.
- PaymentMethods() — Returns all payment methods
- QuickLoginForm() — Returns the QuickLoginForm.
- QuickSearchForm() — Returns the QuickSearchForm.
- RequireColorSchemeCSS() — Requires the color scheme CSS.
- RequireCookieBannerJavaScript() — Loads the SilverCart cookie policy (banner) JS requirements.
- RequireCoreJavaScript() — Loads the SilverCart core (default) JS requirements.
- RequireExtendedJavaScript() — Loads the SilverCart extended JS requirements.
- RequireFullJavaScript() — Loads all PHP side SilverCart JS requirements.
- RequireI18nJavaScript() — Loads SilverStripe framework i18n.js and registers the SilverCart i18n JS folder.
- ShippingCountry() — Returns the current shipping country
- ShopErrors() — Returns the HTML Code of SilverCart errors and clears the error list.
- ShoppingCart() — Returns the shoppingcart of the current user or false if there's no member object registered.
- error_response_for() — Returns the error response for the given status code.
- getCart() — Alias for self::ShoppingCart().
- getCheckout() — Returns the checkout.
- getDefaultHomepage() — Returns the default hoomepage defined by the RootController::default_homepage_link configuration option.
- getProtocol() — Returns the protocol for the current page.
- getRecursivePagesForGroupedDropdownAsArray() — Builds an associative array of ProductGroups to use in GroupedDropDownFields.
- getYearRangeFrom() — Returns the year range starting from the given year to the current year.
- injectHtmlCode() — Saves HTML code for injection on the Page.ss template.
- isAjaxRequest() — Returns whether the current request was called via AJAX.
- isLive() — Indicates wether the site is in live mode.
- logoutURL() — Returns the logout URL.
- providePermissions() — Provide permissions
- showPrices() — Returns whether the prices should be shown with the given type (gross/net).
- showPricesGross() — Returns whether the prices should be shown gross (including taxes).
- showPricesNet() — Returns whether the prices should be shown net (excluding taxes).