public
|
#
__construct( CI_DB_query_builder $db, LanguageTextManager $languageTextManager )
CustomerConfigurationProvider constructor.
CustomerConfigurationProvider constructor.
Parameters
- $db
- Database access, required to fetch configurations.
- $languageTextManager
- Text manager to fetch error messages.
|
public
integer
|
#
minLength( StringType $configField )
Minimum length of provided configuration field.
Allowed fields are 'firstName', 'lastName', 'dateOfBirth', 'dob', 'email', 'street', 'houseNumber', 'company',
'postcode', 'city', 'countryZone', 'suburb', 'state', 'telephone', 'password'.
Minimum length of provided configuration field.
Allowed fields are 'firstName', 'lastName', 'dateOfBirth', 'dob', 'email', 'street', 'houseNumber', 'company',
'postcode', 'city', 'countryZone', 'suburb', 'state', 'telephone', 'password'.
Parameters
- $configField
- Determines for which configuration field the minimum length should be provided.
Returns
integer Minimum length of provided configuration field.
|
public
boolean
|
#
display( StringType $configField )
Should the provided configuration field be displayed?
Allowed fields are 'gender', 'dob', 'dateOfBirth', 'company', 'state', 'telephone', 'fax', 'suburb'.
Should the provided configuration field be displayed?
Allowed fields are 'gender', 'dob', 'dateOfBirth', 'company', 'state', 'telephone', 'fax', 'suburb'.
Parameters
- $configField
- Determines for which configuration field the display check should be performed.
Returns
boolean True if provided configuration field should be displayed and false otherwise.
|
public
string
|
#
errorMessage( StringType $configField )
Error message for provided configuration field.
Allowed fields are 'gender', 'firstName', 'lastName', 'dateOfBirth', 'company', 'vatNumber', 'email',
'emailAddressCheck', 'emailConfirmation', 'emailExists', 'street', 'houseNumber', 'postcode', 'city', 'country',
'countryZone', 'countryZoneSelection', 'telephone', 'password', 'passwordMismatch', 'privacy', 'invalidInput'.
Error message for provided configuration field.
Allowed fields are 'gender', 'firstName', 'lastName', 'dateOfBirth', 'company', 'vatNumber', 'email',
'emailAddressCheck', 'emailConfirmation', 'emailExists', 'street', 'houseNumber', 'postcode', 'city', 'country',
'countryZone', 'countryZoneSelection', 'telephone', 'password', 'passwordMismatch', 'privacy', 'invalidInput'.
Parameters
- $configField
- Determines for which configuration field the error message should be provided.
Returns
string Error message of provided configuration field.
|
public
boolean
|
#
configuration( StringType $configField )
Checks if given configuration is enabled.
Allowed fields are 'acceptPrivacy', 'optionalNames', 'splitStreetInformation'.
Checks if given configuration is enabled.
Allowed fields are 'acceptPrivacy', 'optionalNames', 'splitStreetInformation'.
Parameters
- $configField
- Determines for which configuration field should be checked.
Returns
boolean True if configuration is enabled and false otherwise.
|
public
integer
|
#
defaultStatusId( StringType $configField )
Provides the default status id for customers and guests.
Allowed fields are 'customer' and 'guest'.
Provides the default status id for customers and guests.
Allowed fields are 'customer' and 'guest'.
Parameters
- $configField
- Either 'guest' or 'customer'.
Returns
integer Default status id of given config field.
|
protected
|
#
checkIfFieldExists( StringType $configField, array $fields )
Checks if given configuration field exists.
Checks if given configuration field exists.
Parameters
- $configField
- Expected configuration field.
- $fields
- Allowed configuration fields.
Returns
$this|\CustomerConfigurationProvider Same instance for chained method calls.
Throws
InvalidArgumentException If provided config field do not exist.
|