SilverCart\Forms\RegisterRegularCustomerForm
Form for registration of a regular customer.
- Author: Sebastian Diel <sdiel@pixeltricks.de>
- Copyright: 2017 pixeltricks GmbH
- License: see license file in modules root directory
Synopsis
class RegisterRegularCustomerForm
extends CustomForm
{
- // Inherited constants from CustomForm
- const DEFAULT_NAME = 'CustomForm';
- // members
- private static array $requiredFields = ;
- protected string $backLink = '';
- protected Member $customer = '';
- // Inherited members from CustomForm
- protected array $customExtraClasses;
- protected boolean $securityTokenEnabled;
- // methods
- public array getRequiredFields()
- public array getCustomFields()
- protected array getBirthdayFields()
- protected array getBusinessFields()
- public array getCustomActions()
- public void doSubmit()
- public void handleOptIn()
- public Member handleAnonymousCustomer()
- public void handleNewsletterRecipient()
- public boolean EnableBusinessCustomers()
- public boolean demandBirthdayDate()
- public boolean UseMinimumAgeToOrder()
- public boolean MinimumAgeToOrder()
- public Group getTargetCustomerGroup()
- public string getBackLink()
- public Member|null getCustomer()
- public void setBackLink()
- public RegisterRegularCustomerForm setCustomer()
- public bool getIsInCheckout()
- public RegisterRegularCustomerForm setIsInCheckout()
- // Inherited methods from CustomForm
- public void __construct()
- public $this addErrorClass()
- public array getRequiredFields()
- public $this clearFormState()
- public CustomForm loadMessagesFrom()
- public Controller|null setErrorMessage()
- public Controller|null setSuccessMessage()
- public void setDefaultSuccessMessage()
- public void setDefaultSuccessMessageSent()
- public void markFieldValidationError()
- public void setTemplateBySuffix()
- protected void beforeUpdateFields()
- public FieldList Fields()
- public CustomForm fillWithPostedValues()
- protected void beforeUpdateActions()
- public FieldList Actions()
- protected void beforeUpdateCustomFields()
- public array getCustomFields()
- protected void beforeUpdateCustomActions()
- public array getCustomActions()
- protected void beforeOnBeforeSubmit()
- protected void beforeOnAfterSubmit()
- public void submit()
- public void doSubmit()
- protected void beforeUpdateFieldLabels()
- public array fieldLabels()
- public string fieldLabel()
- public void prepareSubmittedData()
- public DBHTMLText getRenderedUpdatedCustomFields()
- public DBHTMLText getCustomFormSpecialFields()
- public DBHTMLText getAfterFormContent()
- public DBHTMLText getBeforeFormContent()
- public string getRequiredFieldMarker()
- public DBHTMLText renderForTemplate()
- public void getEncType()
Hierarchy
Extends
Constants
Name | Value |
---|---|
DEFAULT_NAME | 'CustomForm' |
Members
private
- $requiredFields
—
array
List of required fields.
protected
- $backLink
—
string
Optional backlink to overwrite the default redirection after a successful submission. - $customExtraClasses
—
array
Custom extra CSS classes. - $customer
—
SilverStripe\Security\Member
Holds the registered Member. - $securityTokenEnabled
—
boolean
Don't enable Security token for this type of form because we'll run into caching problems when using it.
Methods
protected
- getBirthdayFields() — Returns the birthday fields if enabled.
- getBusinessFields() — Returns the business fields if enabled.
public
- EnableBusinessCustomers() — Indicates wether the registration fields specific to business customers should be shown.
- MinimumAgeToOrder() — Returns the minimum age to order.
- UseMinimumAgeToOrder() — Returns whether there is a minimum age to order.
- demandBirthdayDate() — Indicates wether the birthday date has to be entered.
- doSubmit() — Submits the form.
- getBackLink() — Returns the backlink.
- getCustomActions() — Returns the static form fields.
- getCustomFields() — Returns the static form fields.
- getCustomer() — Returns the customer or NULL.
- getIsInCheckout() — Returns whether the customer is in checkout process while going through the registration process.
- getRequiredFields() — Returns the required fields.
- getTargetCustomerGroup() — Returns the target customer group.
- handleAnonymousCustomer() — Handles the anonymous customer object if exists.
- handleNewsletterRecipient() — Handles the newsletter recipient data.
- handleOptIn() — Handles the opt in part.
- setBackLink() — Sets the backlink.
- setCustomer() — Sets the customer.
- setIsInCheckout() — Sets whether the customer is in checkout process while going through the registration process.
Inherited from SilverCart\Forms\CustomForm
protected
- beforeOnAfterSubmit() — Allows user code to hook into CustomForm::submit() prior to onAfterSubmit being called on extensions
- beforeOnBeforeSubmit() — Allows user code to hook into CustomForm::submit() prior to onBeforeSubmit being called on extensions
- beforeUpdateActions() — Allows user code to hook into CustomForm::Actions prior to updateActions being called on extensions
- beforeUpdateCustomActions() — Allows user code to hook into CustomForm::getCustomActions prior to updateCustomActions being called on extensions
- beforeUpdateCustomFields() — Allows user code to hook into CustomForm::getCustomFields prior to updateCustomFields being called on extensions
- beforeUpdateFieldLabels() — Allows user code to hook into CustomForm::fieldLabels() prior to updateFieldLabels being called on extensions
- beforeUpdateFields() — Allows user code to hook into CustomForm::Fields prior to updateFields being called on extensions
public
- Actions() — Returns the form actions.
- Fields() — Returns the form fields.
- addErrorClass() — Adds a CSS class to the form if an error occured.
- clearFormState() — Flush persistant form state details
- doSubmit() — Method to use for a CustomForm extensions submission.
- fieldLabel() — Returns the field label for the given field name.
- fieldLabels() — Returns the field labels for this form.
- fillWithPostedValues() — Fills the form fields with the posted data.
- getAfterFormContent() — Returns the rendered content injected by extensions to insert after the form fields right before the closing </form> tag.
- getBeforeFormContent() — Returns the rendered content injected by extensions to insert before the form fields right after the hidden fields and form messages.
- getCustomActions() — Returns the static form fields.
- getCustomFields() — Returns the static form fields.
- getCustomFormSpecialFields() — Returns the rendered form fields injected by extensions.
- getEncType() — Returns the encoding type for the form.
- getRenderedUpdatedCustomFields() — Returns the rendered form fields injected by extensions.
- getRequiredFieldMarker() — Returns the required field marker.
- getRequiredFields() — Returns the required fields.
- loadMessagesFrom() — Populate this form with messages from the given ValidationResult.
- markFieldValidationError() — Marks the field with the given name as validation error field.
- prepareSubmittedData() — Prepares the submitted data.
- renderForTemplate() — Returns the rendered position.
- setDefaultSuccessMessage() — Sets the default success message.
- setDefaultSuccessMessageSent() — Sets the default success message.
- setErrorMessage() — Sets a manual error message.
- setSuccessMessage() — Sets the success message.
- setTemplateBySuffix() — Sets the form template by the given suffix.
- submit() — Submits the form.