Documentation

Mage_Customer_Model_Customer extends Mage_Core_Model_Abstract
in package

Customer model

Table of Contents

Constants

CACHE_TAG  : mixed = 'customer'
EXCEPTION_2FA_INVALID  : mixed = 6
EXCEPTION_EMAIL_EXISTS  : mixed = 3
EXCEPTION_EMAIL_NOT_CONFIRMED  : mixed = 1
Codes of exceptions related to customer model
EXCEPTION_INVALID_EMAIL_OR_PASSWORD  : mixed = 2
EXCEPTION_INVALID_RESET_PASSWORD_LINK_CUSTOMER_ID  : mixed = 5
EXCEPTION_INVALID_RESET_PASSWORD_LINK_TOKEN  : mixed = 4
MAXIMUM_PASSWORD_LENGTH  : mixed = 256
Maximum Password Length
SUBSCRIBED_NO  : mixed = 'no'
SUBSCRIBED_YES  : mixed = 'yes'
Subscriptions
XML_PATH_CHANGED_PASSWORD_OR_EMAIL_IDENTITY  : mixed = 'customer/changed_account/password_or_email_ide...
XML_PATH_CHANGED_PASSWORD_OR_EMAIL_TEMPLATE  : mixed = 'customer/changed_account/password_or_email_tem...
XML_PATH_CONFIRM_EMAIL_TEMPLATE  : mixed = 'customer/create_account/email_confirmation_tem...
XML_PATH_CONFIRMED_EMAIL_TEMPLATE  : mixed = 'customer/create_account/email_confirmed_template'
XML_PATH_DEFAULT_EMAIL_DOMAIN  : mixed = 'customer/create_account/email_domain'
XML_PATH_FORGOT_EMAIL_IDENTITY  : mixed = 'customer/password/forgot_email_identity'
XML_PATH_FORGOT_EMAIL_TEMPLATE  : mixed = 'customer/password/forgot_email_template'
XML_PATH_GENERATE_HUMAN_FRIENDLY_ID  : mixed = 'customer/create_account/generate_human_friendl...
XML_PATH_IS_CONFIRM  : mixed = 'customer/create_account/confirm'
XML_PATH_MAGIC_LINK_EMAIL_IDENTITY  : mixed = 'customer/login/magic_link_email_identity'
XML_PATH_MAGIC_LINK_EMAIL_TEMPLATE  : mixed = 'customer/login/magic_link_email_template'
XML_PATH_MIN_PASSWORD_LENGTH  : mixed = 'customer/password/min_password_length'
Configuration path for minimum length of password
XML_PATH_PASSWORD_LINK_ACCOUNT_NEW_EMAIL_TEMPLATE  : mixed = 'customer/password_link/account_new_email_templ...
XML_PATH_PASSWORD_LINK_EMAIL_IDENTITY  : mixed = 'customer/password_link/email_identity'
XML_PATH_PASSWORD_LINK_EMAIL_TEMPLATE  : mixed = 'customer/password_link/email_template'
XML_PATH_REGISTER_EMAIL_IDENTITY  : mixed = 'customer/create_account/email_identity'
XML_PATH_REGISTER_EMAIL_TEMPLATE  : mixed = 'customer/create_account/email_template'
Configuration paths for email templates and identities
XML_PATH_REMIND_EMAIL_TEMPLATE  : mixed = 'customer/password/remind_email_template'

Properties

$_addresses  : array<string|int, Mage_Customer_Model_Address>|null
Customer addresses array
$_addressesCollection  : Mage_Customer_Model_Resource_Address_Collection|null
Customer addresses collection
$_attributes  : array<string|int, mixed>|null
Assoc array of customer attributes
$_cacheTag  : string|bool|array<string|int, mixed>
Model cache tag for clear cache in after save and after delete
$_data  : array<string|int, mixed>|null
Object attributes
$_dataSaveAllowed  : bool
Flag which can stop data saving after before save Can be used for next sequence: we check data in _beforeSave, if data are not valid - we can set this flag to false value and save process will be stopped
$_dirty  : array<string|int, mixed>
$_errors  : array<string|int, mixed>
List of errors
$_eventObject  : string
Name of the event object
$_eventPrefix  : string
Model event prefix
$_hasDataChanges  : bool
Data changes flag (true after setData|unsetData call)
$_idFieldName  : string
Name of object id field
$_isDeleteable  : bool
Is model deleteable
$_isDeleted  : bool
Object delete flag
$_isObjectNew  : bool|null
Flag which allow detect object state: is it new object (without id) or existing one (with id)
$_isReadonly  : bool
Is model readonly
$_isSubscribed  : bool|null
Customer subscription status
$_oldFieldsMap  : array<string|int, mixed>
Map short fields names to its full names
$_origData  : array<string|int, mixed>|null
Original data that was loaded
$_resource  : Mage_Core_Model_Resource_Db_Abstract
Resource model instance
$_resourceCollectionName  : string
Name of the resource collection model
$_resourceName  : string
Name of the resource model
$_syncFieldsMap  : mixed
Map of fields to sync to other fields upon changing their data
$_underscoreCache  : array<string|int, mixed>
Setter/Getter underscore transformation cache
$_isConfirmationRequired  : bool
Confirmation requirement flag

Methods

__call()  : mixed
Set/Get attribute wrapper
__clone()  : mixed
Clone current object
__construct()  : mixed
Constructor
__get()  : mixed
Attribute getter (deprecated)
__set()  : mixed
Attribute setter (deprecated)
__toArray()  : array<string|int, mixed>
Convert object attributes to array
_getResource()  : Mage_Customer_Model_Resource_Customer
Get resource instance
addAddress()  : $this
Add address to address collection
addData()  : $this
Add data to the object.
addError()  : $this
Add error
afterCommitCallback()  : $this
Callback function which called after transaction commit in resource model
afterLoad()  : $this
Object after load processing. Implemented as public interface for supporting objects after load in collections
authenticate()  : true
Authenticate customer
canSkipConfirmation()  : bool
Check whether confirmation may be skipped when registering using certain email address
changePassword()  : $this
Change customer password
changeResetPasswordLinkCustomerId()  : $this
Change reset password link customer Id
changeResetPasswordLinkToken()  : $this
Change reset password link token
cleanAllAddresses()  : mixed
Clean all addresses
cleanModelCache()  : $this
Remove model object related cache
cleanPasswordsValidationData()  : $this
Clean password's validation data (password, password_confirmation)
clearInstance()  : $this
Clearing object for correct deleting by garbage collector
clearMagicLinkToken()  : self
Clear magic link token (reuses rp_token)
completePasswordReset()  : self
Invalidate the password reset link once the new password is set, and mark the email address as confirmed, since the customer received the link there. The caller saves.
dataHasChangedFor()  : bool
Compare object data with original data
debug()  : string|array<string|int, mixed>
Present object data as string in debug mode
decryptPassword()  : string
Decrypt password
delete()  : $this
Delete object from database
encryptPassword()  : string
Encrypt password
flagDirty()  : $this
generateMagicLinkToken()  : string
Generate magic link token (reuses password reset token)
generatePassword()  : string
Retrieve random password
getAdditionalAddresses()  : array<string|int, Mage_Customer_Model_Address>
Retrieve not default addresses
getAddressById()  : Mage_Customer_Model_Address
Retrieve customer address by address id
getAddressCollection()  : Mage_Customer_Model_Resource_Address_Collection
Retrieve not loaded address collection
getAddresses()  : array<string|int, Mage_Customer_Model_Address>
Retrieve customer address array
getAddressesCollection()  : Mage_Customer_Model_Resource_Address_Collection
Customer addresses collection
getAddressItemById()  : Mage_Customer_Model_Address
Getting customer address object from collection by identifier
getAttribute()  : Mage_Customer_Model_Customer|null
Get customer attribute model object
getAttributes()  : array<string|int, mixed>
Retrieve all customer attributes
getBillingAddress()  : Mage_Customer_Model_Address_Abstract|null
getCacheIdTags()  : array<string|int, mixed>|false
Get cache tags associated with object id
getCacheTags()  : array<string|int, mixed>|false
Get list of cache tags applied to model object.
getCollection()  : Mage_Customer_Model_Resource_Customer_Collection
getCompany()  : string|null
getConfirmation()  : string|null
getCreatedAt()  : string|null
getCreatedAtTimestamp()  : int|null
Get customer created at date timestamp
getCustomerId()  : int|null
getData()  : mixed
Object data getter
getDataByKey()  : mixed
Get object data by particular key
getDataByPath()  : mixed
Get object data by path
getDataSetDefault()  : mixed
Fast get data or set default if value is not available
getDataUsingMethod()  : mixed
Get object data by key with calling getter method
getDefaultBilling()  : int|null
getDefaultBillingAddress()  : Mage_Customer_Model_Address
Get customer default billing address
getDefaultShipping()  : int|null
getDefaultShippingAddress()  : Mage_Customer_Model_Address
Get default customer shipping address
getDisableAutoGroupChange()  : bool|null
getDob()  : string|null
getEmail()  : string|null
getEntityId()  : int
getEntityType()  : Mage_Eav_Model_Entity_Type
Return Entity Type instance
getEntityTypeId()  : int
Return Entity Type ID
getErrors()  : array<string|int, mixed>
Retrieve errors
getFirstname()  : string|null
getForceConfirmed()  : bool|null
getGender()  : int|null
getGroupId()  : int
Retrieve customer group identifier
getId()  : int|string|null
Retrieve model object identifier
getIdFieldName()  : string
Retrieve identifier field name for model
getImportMode()  : bool|null
getIncrementId()  : string|null
getIsChangeEmail()  : bool|null
getIsChangePassword()  : bool|null
getIsJustConfirmed()  : bool|null
getIsSubscribed()  : bool|null
getLastname()  : string|null
getMiddlename()  : string|null
getMinPasswordLength()  : int
Retrieve minimum length of password
getMode()  : string|null
getName()  : string
Get full customer name
getOldEmail()  : string|null
getOrigData()  : mixed
Get object loaded data (original data)
getPassword()  : string
getPasswordConfirm()  : string|null
getPasswordConfirmation()  : string|null
getPasswordCreatedAt()  : int|null
getPasswordHash()  : string|null
getPrefix()  : string|null
getPrimaryAddress()  : Mage_Customer_Model_Address|false
Retrieve default address by type(attribute)
getPrimaryAddresses()  : array<string|int, Mage_Customer_Model_Address>
Retrieve all customer default addresses
getPrimaryAddressIds()  : array<string|int, mixed>
Retrieve ids of default addresses
getPrimaryBillingAddress()  : Mage_Customer_Model_Address
Get customer default billing address
getPrimaryShippingAddress()  : Mage_Customer_Model_Address
Get default customer shipping address
getRandomConfirmationKey()  : string
Generate random confirmation key
getResource()  : Mage_Customer_Model_Resource_Customer
Retrieve model resource
getResourceCollection()  : Mage_Core_Model_Resource_Db_Collection_Abstract
Get collection instance
getResourceName()  : string
Retrieve model resource name
getRpToken()  : string|null
getRpTokenCreatedAt()  : string|null
getSendemailStoreId()  : int|null
getSharedStoreIds()  : array<string|int, mixed>
Retrieve shared store ids
getSharedWebsiteIds()  : array<string|int, mixed>
Retrieve shared website ids
getSharingConfig()  : Mage_Customer_Model_Config_Share
Retrieve customer sharing configuration model
getShippingAddress()  : Mage_Customer_Model_Address_Abstract|null
getSkipConfirmationIfEmail()  : string|null
getStore()  : Mage_Core_Model_Store
Retrieve store where customer was created
getStoreId()  : int|null
getSuffix()  : string|null
getTagId()  : int|null
getTaxClassId()  : int
Retrieve customer tax class identifier
getTaxvat()  : string|null
getTwofaEnabled()  : bool|null
getTwofaSecret()  : string|null
Return the decrypted TOTP secret, tolerating legacy plaintext values.
getWebsiteId()  : int|null
hasData()  : bool
If $key is empty, checks whether there's any data in the object Otherwise checks if the specified attribute is set.
hasDataChanges()  : bool
Get data change status
hasErrors()  : bool
hashPassword()  : string
Hash customer password
hasIsSubscribed()  : bool
hasSkipConfirmationIfEmail()  : bool
hasStoreId()  : bool
importFromTextArray()  : $this|null
Import customer data from text array
isAddressPrimary()  : bool
Check if address is primary
isConfirmationRequired()  : bool
Check if accounts confirmation is required in config
isDeleteable()  : bool
Checks model is deleteable
isDeleted()  : bool
Set _isDeleted flag value (if $isDeleted param is defined) and return current flag value
isDirty()  : bool
isEmpty()  : bool
checks whether the object is empty
isInStore()  : bool
Check store availability for customer
isMagicLinkTokenExpired()  : bool
Check if magic link token is expired
isModuleEnabled()  : bool
isObjectNew()  : bool
Check object state (true - if it is object without id on object just created) This method can help detect if object just created in _afterSave method problem is what in after save object has id and we can't detect what object was created in this transaction
isReadonly()  : bool
Checks model is readonly
isResetPasswordLinkTokenExpired()  : bool
Check if current reset password link token is expired
jsonSerialize()  : array<string|int, mixed>
Implementation of JsonSerializable::jsonSerialize()
load()  : $this
Load object data
loadByEmail()  : $this
Load customer by email
offsetExists()  : bool
Implementation of ArrayAccess::offsetExists()
offsetGet()  : mixed
Implementation of ArrayAccess::offsetGet()
offsetSet()  : void
Implementation of ArrayAccess::offsetSet()
offsetUnset()  : void
Implementation of ArrayAccess::offsetUnset()
printError()  : false|void
Print error
reset()  : $this
Reset all model data
resetErrors()  : $this
Reset errors array
save()  : $this
Save object data
sendChangedPasswordOrEmail()  : $this
Send info email about changed password or email
sendMagicLinkEmail()  : self
Send email with magic login link
sendNewAccountEmail()  : $this
Send email with new account related information
sendPasswordLinkEmail()  : $this
Send email with link to set password
sendPasswordReminderEmail()  : $this
Send email with new customer password
sendPasswordResetConfirmationEmail()  : $this
Send email with reset password confirmation link
sendPasswordResetLinkEmail()  : self
Generate a new password reset link and send it in the reset password confirmation email
serialize()  : string
serialize object attributes
setAttribute()  : $this
setChangePassword()  : static
setConfirmation()  : static
setCreatedAt()  : static
setCustomerId()  : static
setData()  : $this
Overwrite data in the object.
setDataChanges()  : $this
Clears data changes status
setDataUsingMethod()  : $this
Set object data with calling setter method
setDefaultBilling()  : static
setDefaultShipping()  : static
setDob()  : static
setEmail()  : static
setFirstname()  : static
setForceConfirmed()  : static
setGroupId()  : static
setId()  : $this
Declare model object identifier value
setIdFieldName()  : $this
set name of object id field
setImportMode()  : static
setIsChangeEmail()  : static
setIsChangePassword()  : static
setIsDeleteable()  : $this
Set is deleteable flag
setIsJustConfirmed()  : static
setIsReadonly()  : $this
Set is readonly flag
setIsSubscribed()  : static
setLastname()  : static
setMode()  : static
setOldEmail()  : static
setOrigData()  : $this
Initialize object original data
setPassword()  : $this
Set plain and hashed password
setPasswordConfirmation()  : static
setPasswordCreatedAt()  : $this
Set time when password was changed to invalidate other sessions
setPasswordHash()  : static
setRpCustomerId()  : static
setRpToken()  : static
setRpTokenCreatedAt()  : static
setSendemailStoreId()  : static
setStore()  : $this
Set store to customer
setStoreId()  : static
setTaxClassId()  : static
setTwofaEnabled()  : static
setTwofaSecret()  : self
Store the TOTP secret encrypted at rest.
setUpdatedAt()  : static
setWebsiteId()  : static
toArray()  : array<string|int, mixed>
Public wrapper for __toArray
toJson()  : string
Public wrapper for __toJson
toString()  : string
Public wrapper for __toString
toXml()  : string
Public wrapper for __toXml
unsetData()  : $this
Unset data from the object.
unsetDefaultBilling()  : $this
unsetDefaultShipping()  : $this
unsetOldData()  : $this
Unset old fields data from the object.
unsetSubscription()  : $this
Unset subscription
validate()  : array<string|int, mixed>|true
Validate customer attribute values.
validateAddress()  : bool
Validate address
validateMagicLinkToken()  : bool
Validate magic link token
validatePassword()  : bool
Validate password with salted hash
validateResetPassword()  : array<string|int, mixed>|true
Validate customer password on reset
__toJson()  : string
Convert object attributes to JSON
__toXml()  : string
Convert object attributes to XML
_addFullNames()  : mixed
_afterDelete()  : $this
Processing object after delete data
_afterDeleteCommit()  : $this
Processing manipulation after main transaction commit
_afterLoad()  : $this
Processing object after load data
_afterSave()  : $this
Processing object after save data
_beforeDelete()  : $this
Prepare customer for delete
_beforeLoad()  : $this
Processing object before load data
_beforeSave()  : $this
Processing object before save data
_camelize()  : string
_clearData()  : $this
Clearing object's data
_clearReferences()  : $this
Clearing cyclic references
_construct()  : void
Initialize customer model
_getData()  : mixed
Get value from _data array without parse key
_getEventData()  : array<string|int, mixed>
Get array of objects transferred to default events processing
_getWebsiteStoreId()  : int
Get either first store ID from a set website or the provided as default
_hasModelChanged()  : bool
Check whether model has changed data.
_init()  : mixed
Standard model initialization
_initOldFieldsMap()  : mixed
Inits mapping array of object's previously used fields to new fields.
_prepareArray()  : array<string|int, mixed>
Set required array elements
_prepareSyncFieldsMap()  : $this
Called after old fields are inited. Forms synchronization map to sync old fields and new fields between each other.
_protectFromNonAdmin()  : mixed
Safeguard func that will check, if we are in admin area
_sendEmailTemplate()  : $this
Send corresponding email template
_setResourceModel()  : mixed
Set resource names
_underscore()  : string
Converts field names for setters and getters

Constants

CACHE_TAG

public mixed CACHE_TAG = 'customer'

EXCEPTION_2FA_INVALID

public mixed EXCEPTION_2FA_INVALID = 6

EXCEPTION_EMAIL_EXISTS

public mixed EXCEPTION_EMAIL_EXISTS = 3

EXCEPTION_EMAIL_NOT_CONFIRMED

Codes of exceptions related to customer model

public mixed EXCEPTION_EMAIL_NOT_CONFIRMED = 1

EXCEPTION_INVALID_EMAIL_OR_PASSWORD

public mixed EXCEPTION_INVALID_EMAIL_OR_PASSWORD = 2
public mixed EXCEPTION_INVALID_RESET_PASSWORD_LINK_CUSTOMER_ID = 5
public mixed EXCEPTION_INVALID_RESET_PASSWORD_LINK_TOKEN = 4

MAXIMUM_PASSWORD_LENGTH

Maximum Password Length

public mixed MAXIMUM_PASSWORD_LENGTH = 256

SUBSCRIBED_NO

public mixed SUBSCRIBED_NO = 'no'

SUBSCRIBED_YES

Subscriptions

public mixed SUBSCRIBED_YES = 'yes'

XML_PATH_CHANGED_PASSWORD_OR_EMAIL_IDENTITY

public mixed XML_PATH_CHANGED_PASSWORD_OR_EMAIL_IDENTITY = 'customer/changed_account/password_or_email_identity'

XML_PATH_CHANGED_PASSWORD_OR_EMAIL_TEMPLATE

public mixed XML_PATH_CHANGED_PASSWORD_OR_EMAIL_TEMPLATE = 'customer/changed_account/password_or_email_template'

XML_PATH_CONFIRM_EMAIL_TEMPLATE

public mixed XML_PATH_CONFIRM_EMAIL_TEMPLATE = 'customer/create_account/email_confirmation_template'

XML_PATH_CONFIRMED_EMAIL_TEMPLATE

public mixed XML_PATH_CONFIRMED_EMAIL_TEMPLATE = 'customer/create_account/email_confirmed_template'

XML_PATH_DEFAULT_EMAIL_DOMAIN

public mixed XML_PATH_DEFAULT_EMAIL_DOMAIN = 'customer/create_account/email_domain'

XML_PATH_FORGOT_EMAIL_IDENTITY

public mixed XML_PATH_FORGOT_EMAIL_IDENTITY = 'customer/password/forgot_email_identity'

XML_PATH_FORGOT_EMAIL_TEMPLATE

public mixed XML_PATH_FORGOT_EMAIL_TEMPLATE = 'customer/password/forgot_email_template'

XML_PATH_GENERATE_HUMAN_FRIENDLY_ID

public mixed XML_PATH_GENERATE_HUMAN_FRIENDLY_ID = 'customer/create_account/generate_human_friendly_id'

XML_PATH_IS_CONFIRM

public mixed XML_PATH_IS_CONFIRM = 'customer/create_account/confirm'
public mixed XML_PATH_MAGIC_LINK_EMAIL_IDENTITY = 'customer/login/magic_link_email_identity'
public mixed XML_PATH_MAGIC_LINK_EMAIL_TEMPLATE = 'customer/login/magic_link_email_template'

XML_PATH_MIN_PASSWORD_LENGTH

Configuration path for minimum length of password

public mixed XML_PATH_MIN_PASSWORD_LENGTH = 'customer/password/min_password_length'
public mixed XML_PATH_PASSWORD_LINK_ACCOUNT_NEW_EMAIL_TEMPLATE = 'customer/password_link/account_new_email_template'
public mixed XML_PATH_PASSWORD_LINK_EMAIL_IDENTITY = 'customer/password_link/email_identity'
public mixed XML_PATH_PASSWORD_LINK_EMAIL_TEMPLATE = 'customer/password_link/email_template'

XML_PATH_REGISTER_EMAIL_IDENTITY

public mixed XML_PATH_REGISTER_EMAIL_IDENTITY = 'customer/create_account/email_identity'

XML_PATH_REGISTER_EMAIL_TEMPLATE

Configuration paths for email templates and identities

public mixed XML_PATH_REGISTER_EMAIL_TEMPLATE = 'customer/create_account/email_template'

XML_PATH_REMIND_EMAIL_TEMPLATE

public mixed XML_PATH_REMIND_EMAIL_TEMPLATE = 'customer/password/remind_email_template'

Properties

$_attributes

Assoc array of customer attributes

protected array<string|int, mixed>|null $_attributes

$_cacheTag

Model cache tag for clear cache in after save and after delete

protected string|bool|array<string|int, mixed> $_cacheTag = self::CACHE_TAG
Attributes
#[Override]

$_data

Object attributes

protected array<string|int, mixed>|null $_data = []

$_dataSaveAllowed

Flag which can stop data saving after before save Can be used for next sequence: we check data in _beforeSave, if data are not valid - we can set this flag to false value and save process will be stopped

protected bool $_dataSaveAllowed = \true

$_dirty

protected array<string|int, mixed> $_dirty

$_errors

List of errors

protected array<string|int, mixed> $_errors = []

$_eventObject

Name of the event object

protected string $_eventObject = 'customer'
Attributes
#[Override]

$_eventPrefix

Model event prefix

protected string $_eventPrefix = 'customer'
Attributes
#[Override]

$_hasDataChanges

Data changes flag (true after setData|unsetData call)

protected bool $_hasDataChanges = false

$_idFieldName

Name of object id field

protected string $_idFieldName = null

$_isDeleteable

Is model deleteable

protected bool $_isDeleteable = \true

$_isDeleted

Object delete flag

protected bool $_isDeleted = false

$_isObjectNew

Flag which allow detect object state: is it new object (without id) or existing one (with id)

protected bool|null $_isObjectNew = \null

$_isReadonly

Is model readonly

protected bool $_isReadonly = \false

$_isSubscribed

Customer subscription status

protected bool|null $_isSubscribed

$_oldFieldsMap

Map short fields names to its full names

protected array<string|int, mixed> $_oldFieldsMap = []

$_origData

Original data that was loaded

protected array<string|int, mixed>|null $_origData

$_resourceCollectionName

Name of the resource collection model

protected string $_resourceCollectionName

$_resourceName

Name of the resource model

protected string $_resourceName

$_syncFieldsMap

Map of fields to sync to other fields upon changing their data

protected mixed $_syncFieldsMap = []

$_underscoreCache

Setter/Getter underscore transformation cache

protected static array<string|int, mixed> $_underscoreCache = []

$_isConfirmationRequired

Confirmation requirement flag

private static bool $_isConfirmationRequired

Methods

__call()

Set/Get attribute wrapper

public __call(string $method, array<string|int, mixed> $args) : mixed
Parameters
$method : string
$args : array<string|int, mixed>

__clone()

Clone current object

public __clone() : mixed

__construct()

Constructor

public __construct() : mixed

By default, is looking for first argument as array and assigns it as object attributes This behaviour may change in child classes

__get()

Attribute getter (deprecated)

public __get(string $var) : mixed
Parameters
$var : string

__set()

Attribute setter (deprecated)

public __set(string $var, mixed $value) : mixed
Parameters
$var : string
$value : mixed

__toArray()

Convert object attributes to array

public __toArray([array<string|int, mixed> $arrAttributes = [] ]) : array<string|int, mixed>
Parameters
$arrAttributes : array<string|int, mixed> = []

array of required attributes

Return values
array<string|int, mixed>

addData()

Add data to the object.

public addData(array<string|int, mixed> $arr) : $this

Retains previous data in the object.

Parameters
$arr : array<string|int, mixed>
Return values
$this

addError()

Add error

public addError(string $error) : $this
Parameters
$error : string
Return values
$this

afterCommitCallback()

Callback function which called after transaction commit in resource model

public afterCommitCallback() : $this
Return values
$this

afterLoad()

Object after load processing. Implemented as public interface for supporting objects after load in collections

public afterLoad() : $this
Return values
$this

authenticate()

Authenticate customer

public authenticate(string $login, string $password[, string|null $twofaVerificationCode = null ]) : true
Parameters
$login : string
$password : string
$twofaVerificationCode : string|null = null
Tags
throws
Mage_Core_Exception
Return values
true

canSkipConfirmation()

Check whether confirmation may be skipped when registering using certain email address

public canSkipConfirmation() : bool
Return values
bool

changePassword()

Change customer password

public changePassword(string $newPassword) : $this
Parameters
$newPassword : string
Return values
$this

changeResetPasswordLinkCustomerId()

Change reset password link customer Id

public changeResetPasswordLinkCustomerId(string $newResetPasswordLinkCustomerId) : $this

Stores new reset password link customer Id

Parameters
$newResetPasswordLinkCustomerId : string
Tags
throws
Mage_Core_Exception
Return values
$this

changeResetPasswordLinkToken()

Change reset password link token

public changeResetPasswordLinkToken(string $newResetPasswordLinkToken) : $this

Stores new reset password link token

Parameters
$newResetPasswordLinkToken : string
Tags
throws
Mage_Core_Exception
Return values
$this

cleanAllAddresses()

Clean all addresses

public cleanAllAddresses() : mixed

cleanModelCache()

Remove model object related cache

public cleanModelCache() : $this
Return values
$this

cleanPasswordsValidationData()

Clean password's validation data (password, password_confirmation)

public cleanPasswordsValidationData() : $this
Return values
$this

clearInstance()

Clearing object for correct deleting by garbage collector

public final clearInstance() : $this
Return values
$this

clearMagicLinkToken()

Clear magic link token (reuses rp_token)

public clearMagicLinkToken() : self
Return values
self

completePasswordReset()

Invalidate the password reset link once the new password is set, and mark the email address as confirmed, since the customer received the link there. The caller saves.

public completePasswordReset() : self
Return values
self

dataHasChangedFor()

Compare object data with original data

public dataHasChangedFor(string $field) : bool
Parameters
$field : string
Return values
bool

debug()

Present object data as string in debug mode

public debug([mixed $data = null ][, array<string|int, mixed> &$objects = [] ]) : string|array<string|int, mixed>
Parameters
$data : mixed = null
$objects : array<string|int, mixed> = []
Return values
string|array<string|int, mixed>

decryptPassword()

Decrypt password

public decryptPassword(string $password) : string
Parameters
$password : string
Return values
string

delete()

Delete object from database

public delete() : $this
Tags
throws
Throwable
Return values
$this

encryptPassword()

Encrypt password

public encryptPassword(string $password) : string
Parameters
$password : string
Return values
string

flagDirty()

public flagDirty(string $field[, bool $flag = true ]) : $this
Parameters
$field : string
$flag : bool = true
Return values
$this

generateMagicLinkToken()

Generate magic link token (reuses password reset token)

public generateMagicLinkToken() : string
Return values
string

generatePassword()

Retrieve random password

public generatePassword([int $length = 8 ]) : string
Parameters
$length : int = 8
Return values
string

getAttributes()

Retrieve all customer attributes

public getAttributes() : array<string|int, mixed>
Tags
throws
Mage_Core_Exception
Return values
array<string|int, mixed>

getCacheIdTags()

Get cache tags associated with object id

public getCacheIdTags() : array<string|int, mixed>|false
Return values
array<string|int, mixed>|false

getCacheTags()

Get list of cache tags applied to model object.

public getCacheTags() : array<string|int, mixed>|false

Return false if cache tags are not supported by model

Return values
array<string|int, mixed>|false

getCompany()

public getCompany() : string|null
Return values
string|null

getConfirmation()

public getConfirmation() : string|null
Return values
string|null

getCreatedAt()

public getCreatedAt() : string|null
Return values
string|null

getCreatedAtTimestamp()

Get customer created at date timestamp

public getCreatedAtTimestamp() : int|null
Return values
int|null

getCustomerId()

public getCustomerId() : int|null
Return values
int|null

getData()

Object data getter

public getData([string $key = '' ][, string|int $index = null ]) : mixed

If $key is not defined will return all the data as an array. Otherwise, it will return value of the element specified by $key. It is possible to use keys like a/b/c for access nested array data

If $index is specified it will assume that attribute data is an array and retrieve corresponding member. If data is the string - it will be explode by new line character and converted to array.

Parameters
$key : string = ''
$index : string|int = null

getDataByKey()

Get object data by particular key

public getDataByKey(string $key) : mixed
Parameters
$key : string

getDataByPath()

Get object data by path

public getDataByPath(string $path) : mixed

Method consider the path as chain of keys: a/b/c => ['a']['b']['c']

Parameters
$path : string

getDataSetDefault()

Fast get data or set default if value is not available

public getDataSetDefault(string $key, mixed $default) : mixed
Parameters
$key : string
$default : mixed

getDataUsingMethod()

Get object data by key with calling getter method

public getDataUsingMethod(string $key[, mixed $args = null ]) : mixed
Parameters
$key : string
$args : mixed = null

getDefaultBilling()

public getDefaultBilling() : int|null
Return values
int|null

getDefaultShipping()

public getDefaultShipping() : int|null
Return values
int|null

getDisableAutoGroupChange()

public getDisableAutoGroupChange() : bool|null
Return values
bool|null

getDob()

public getDob() : string|null
Return values
string|null

getEmail()

public getEmail() : string|null
Return values
string|null

getEntityId()

public getEntityId() : int
Return values
int

getErrors()

Retrieve errors

public getErrors() : array<string|int, mixed>
Return values
array<string|int, mixed>

getFirstname()

public getFirstname() : string|null
Return values
string|null

getForceConfirmed()

public getForceConfirmed() : bool|null
Return values
bool|null

getGender()

public getGender() : int|null
Return values
int|null

getId()

Retrieve model object identifier

public getId() : int|string|null
Attributes
#[Override]
Return values
int|string|null

getIdFieldName()

Retrieve identifier field name for model

public getIdFieldName() : string
Attributes
#[Override]
Return values
string

getImportMode()

public getImportMode() : bool|null
Return values
bool|null

getIncrementId()

public getIncrementId() : string|null
Return values
string|null

getIsChangeEmail()

public getIsChangeEmail() : bool|null
Return values
bool|null

getIsChangePassword()

public getIsChangePassword() : bool|null
Return values
bool|null

getIsJustConfirmed()

public getIsJustConfirmed() : bool|null
Return values
bool|null

getIsSubscribed()

public getIsSubscribed() : bool|null
Return values
bool|null

getLastname()

public getLastname() : string|null
Return values
string|null

getMiddlename()

public getMiddlename() : string|null
Return values
string|null

getMinPasswordLength()

Retrieve minimum length of password

public getMinPasswordLength() : int
Return values
int

getMode()

public getMode() : string|null
Return values
string|null

getName()

Get full customer name

public getName() : string
Return values
string

getOldEmail()

public getOldEmail() : string|null
Return values
string|null

getOrigData()

Get object loaded data (original data)

public getOrigData([string $key = null ]) : mixed
Parameters
$key : string = null

getPassword()

public getPassword() : string
Return values
string

getPasswordConfirm()

public getPasswordConfirm() : string|null
Return values
string|null

getPasswordConfirmation()

public getPasswordConfirmation() : string|null
Return values
string|null

getPasswordCreatedAt()

public getPasswordCreatedAt() : int|null
Return values
int|null

getPasswordHash()

public getPasswordHash() : string|null
Return values
string|null

getPrefix()

public getPrefix() : string|null
Return values
string|null

getPrimaryAddressIds()

Retrieve ids of default addresses

public getPrimaryAddressIds() : array<string|int, mixed>
Return values
array<string|int, mixed>

getRandomConfirmationKey()

Generate random confirmation key

public getRandomConfirmationKey() : string
Return values
string

getResourceName()

Retrieve model resource name

public getResourceName() : string
Return values
string

getRpToken()

public getRpToken() : string|null
Return values
string|null

getRpTokenCreatedAt()

public getRpTokenCreatedAt() : string|null
Return values
string|null

getSendemailStoreId()

public getSendemailStoreId() : int|null
Return values
int|null

getSharedStoreIds()

Retrieve shared store ids

public getSharedStoreIds() : array<string|int, mixed>
Tags
throws
Mage_Core_Exception
Return values
array<string|int, mixed>

getSharedWebsiteIds()

Retrieve shared website ids

public getSharedWebsiteIds() : array<string|int, mixed>
Return values
array<string|int, mixed>

getSkipConfirmationIfEmail()

public getSkipConfirmationIfEmail() : string|null
Return values
string|null

getStoreId()

public getStoreId() : int|null
Return values
int|null

getSuffix()

public getSuffix() : string|null
Return values
string|null

getTagId()

public getTagId() : int|null
Return values
int|null

getTaxvat()

public getTaxvat() : string|null
Return values
string|null

getTwofaEnabled()

public getTwofaEnabled() : bool|null
Return values
bool|null

getTwofaSecret()

Return the decrypted TOTP secret, tolerating legacy plaintext values.

public getTwofaSecret() : string|null
Return values
string|null

getWebsiteId()

public getWebsiteId() : int|null
Return values
int|null

hasData()

If $key is empty, checks whether there's any data in the object Otherwise checks if the specified attribute is set.

public hasData([string $key = '' ]) : bool
Parameters
$key : string = ''
Return values
bool

hasDataChanges()

Get data change status

public hasDataChanges() : bool
Return values
bool

hasErrors()

public hasErrors() : bool
Return values
bool

hashPassword()

Hash customer password

public hashPassword(string $password) : string
Parameters
$password : string
Return values
string

hasIsSubscribed()

public hasIsSubscribed() : bool
Return values
bool

hasSkipConfirmationIfEmail()

public hasSkipConfirmationIfEmail() : bool
Return values
bool

hasStoreId()

public hasStoreId() : bool
Return values
bool

isConfirmationRequired()

Check if accounts confirmation is required in config

public isConfirmationRequired() : bool
Return values
bool

isDeleteable()

Checks model is deleteable

public isDeleteable() : bool
Return values
bool

isDeleted()

Set _isDeleted flag value (if $isDeleted param is defined) and return current flag value

public isDeleted([bool $isDeleted = null ]) : bool
Parameters
$isDeleted : bool = null
Return values
bool

isDirty()

public isDirty([string $field = null ]) : bool
Parameters
$field : string = null
Return values
bool

isEmpty()

checks whether the object is empty

public isEmpty() : bool
Return values
bool

isMagicLinkTokenExpired()

Check if magic link token is expired

public isMagicLinkTokenExpired() : bool
Return values
bool

isModuleEnabled()

public isModuleEnabled(string $moduleName[, string $helperAlias = 'core' ]) : bool
Parameters
$moduleName : string
$helperAlias : string = 'core'
Return values
bool

isObjectNew()

Check object state (true - if it is object without id on object just created) This method can help detect if object just created in _afterSave method problem is what in after save object has id and we can't detect what object was created in this transaction

public isObjectNew([bool $flag = null ]) : bool
Parameters
$flag : bool = null
Return values
bool

isReadonly()

Checks model is readonly

public isReadonly() : bool
Return values
bool

isResetPasswordLinkTokenExpired()

Check if current reset password link token is expired

public isResetPasswordLinkTokenExpired() : bool
Return values
bool

jsonSerialize()

Implementation of JsonSerializable::jsonSerialize()

public jsonSerialize() : array<string|int, mixed>

Prepares the object data for JSON serialization. Returns all object data as an array, with special handling for nested DataObject instances:

  • If a nested DataObject has a custom jsonSerialize() implementation, it's preserved as-is
  • If a nested DataObject has a custom toJson() method, it's converted to JSON string
  • If a nested DataObject uses only the base implementations, it's excluded from output

This prevents infinite recursion and circular references when serializing object hierarchies.

Attributes
#[Override]
Return values
array<string|int, mixed>

load()

Load object data

public load(string|null|int $id[, string|null $field = null ]) : $this
Parameters
$id : string|null|int
$field : string|null = null
Return values
$this

loadByEmail()

Load customer by email

public loadByEmail(string $customerEmail) : $this
Parameters
$customerEmail : string
Tags
throws
Mage_Core_Exception
Return values
$this

printError()

Print error

public printError(null|string $error[, string $line = null ]) : false|void
Parameters
$error : null|string
$line : string = null
Return values
false|void

reset()

Reset all model data

public reset() : $this
Return values
$this

resetErrors()

Reset errors array

public resetErrors() : $this
Return values
$this

save()

Save object data

public save() : $this
Tags
throws
Throwable
Return values
$this

sendChangedPasswordOrEmail()

Send info email about changed password or email

public sendChangedPasswordOrEmail() : $this
Tags
throws
Mage_Core_Exception
Return values
$this

sendNewAccountEmail()

Send email with new account related information

public sendNewAccountEmail([string $type = 'registered' ][, string $backUrl = '' ][, string|int $storeId = '0' ][, string $password = null ]) : $this
Parameters
$type : string = 'registered'
$backUrl : string = ''
$storeId : string|int = '0'
$password : string = null
Tags
throws
Mage_Core_Exception
Return values
$this

sendPasswordLinkEmail()

Send email with link to set password

public sendPasswordLinkEmail([bool $isNew = false ]) : $this
Parameters
$isNew : bool = false
Tags
bool

$isNew Send welcome email?

Return values
$this

sendPasswordReminderEmail()

Send email with new customer password

public sendPasswordReminderEmail() : $this
Tags
throws
Mage_Core_Exception
Return values
$this

serialize()

serialize object attributes

public serialize([array<string|int, mixed> $attributes = [] ][, string $valueSeparator = '=' ][, string $fieldSeparator = ' ' ][, string $quote = '"' ]) : string
Parameters
$attributes : array<string|int, mixed> = []
$valueSeparator : string = '='
$fieldSeparator : string = ' '
$quote : string = '"'
Return values
string

setChangePassword()

public setChangePassword(int|null $value) : static
Parameters
$value : int|null
Return values
static

setConfirmation()

public setConfirmation(string|null $value) : static
Parameters
$value : string|null
Return values
static

setCreatedAt()

public setCreatedAt(string|null $value) : static
Parameters
$value : string|null
Return values
static

setCustomerId()

public setCustomerId(int|null $value) : static
Parameters
$value : int|null
Return values
static

setData()

Overwrite data in the object.

public setData(string|array<string|int, mixed> $key[, mixed $value = null ]) : $this

$key can be string or array. If $key is string, the attribute value will be overwritten by $value

If $key is an array, it will overwrite all the data in the object.

Parameters
$key : string|array<string|int, mixed>
$value : mixed = null
Return values
$this

setDataChanges()

Clears data changes status

public setDataChanges(bool $value) : $this
Parameters
$value : bool
Return values
$this

setDataUsingMethod()

Set object data with calling setter method

public setDataUsingMethod(string $key[, mixed $args = [] ]) : $this
Parameters
$key : string
$args : mixed = []
Return values
$this

setDefaultBilling()

public setDefaultBilling(int|null $value) : static
Parameters
$value : int|null
Return values
static

setDefaultShipping()

public setDefaultShipping(int|null $value) : static
Parameters
$value : int|null
Return values
static

setDob()

public setDob(string|null $value) : static
Parameters
$value : string|null
Return values
static

setEmail()

public setEmail(string|null $value) : static
Parameters
$value : string|null
Return values
static

setFirstname()

public setFirstname(string|null $value) : static
Parameters
$value : string|null
Return values
static

setForceConfirmed()

public setForceConfirmed([bool|null $value = true ]) : static
Parameters
$value : bool|null = true
Return values
static

setGroupId()

public setGroupId(int|null $value) : static
Parameters
$value : int|null
Return values
static

setId()

Declare model object identifier value

public setId(mixed $id) : $this
Parameters
$id : mixed
Attributes
#[Override]
Return values
$this

setIdFieldName()

set name of object id field

public setIdFieldName(string $name) : $this
Parameters
$name : string
Return values
$this

setImportMode()

public setImportMode([bool|null $value = true ]) : static
Parameters
$value : bool|null = true
Return values
static

setIsChangeEmail()

public setIsChangeEmail([bool|null $value = true ]) : static
Parameters
$value : bool|null = true
Return values
static

setIsChangePassword()

public setIsChangePassword([bool|null $value = true ]) : static
Parameters
$value : bool|null = true
Return values
static

setIsDeleteable()

Set is deleteable flag

public setIsDeleteable(bool $value) : $this
Parameters
$value : bool
Return values
$this

setIsJustConfirmed()

public setIsJustConfirmed([bool|null $value = true ]) : static
Parameters
$value : bool|null = true
Return values
static

setIsReadonly()

Set is readonly flag

public setIsReadonly(bool $value) : $this
Parameters
$value : bool
Return values
$this

setIsSubscribed()

public setIsSubscribed([bool|null $value = true ]) : static
Parameters
$value : bool|null = true
Return values
static

setLastname()

public setLastname(string|null $value) : static
Parameters
$value : string|null
Return values
static

setMode()

public setMode(string|null $value) : static
Parameters
$value : string|null
Return values
static

setOldEmail()

public setOldEmail(string|null $value) : static
Parameters
$value : string|null
Return values
static

setOrigData()

Initialize object original data

public setOrigData([string $key = null ][, mixed $data = null ]) : $this
Parameters
$key : string = null
$data : mixed = null
Return values
$this

setPassword()

Set plain and hashed password

public setPassword(string $password) : $this
Parameters
$password : string
Return values
$this

setPasswordConfirmation()

public setPasswordConfirmation(string|null $value) : static
Parameters
$value : string|null
Return values
static

setPasswordCreatedAt()

Set time when password was changed to invalidate other sessions

public setPasswordCreatedAt(int $time) : $this
Parameters
$time : int
Return values
$this

setPasswordHash()

public setPasswordHash(string|null $value) : static
Parameters
$value : string|null
Return values
static

setRpCustomerId()

public setRpCustomerId(string|null $value) : static
Parameters
$value : string|null
Return values
static

setRpToken()

public setRpToken(string|null $value) : static
Parameters
$value : string|null
Return values
static

setRpTokenCreatedAt()

public setRpTokenCreatedAt(string|null $value) : static
Parameters
$value : string|null
Return values
static

setSendemailStoreId()

public setSendemailStoreId(int|null $value) : static
Parameters
$value : int|null
Return values
static

setStoreId()

public setStoreId(int|null $value) : static
Parameters
$value : int|null
Return values
static

setTaxClassId()

public setTaxClassId(int|null $value) : static
Parameters
$value : int|null
Return values
static

setTwofaEnabled()

public setTwofaEnabled([bool|null $value = true ]) : static
Parameters
$value : bool|null = true
Return values
static

setTwofaSecret()

Store the TOTP secret encrypted at rest.

public setTwofaSecret(string|null $secret) : self
Parameters
$secret : string|null
Return values
self

setUpdatedAt()

public setUpdatedAt(string|null $value) : static
Parameters
$value : string|null
Return values
static

setWebsiteId()

public setWebsiteId(int|null $value) : static
Parameters
$value : int|null
Return values
static

toArray()

Public wrapper for __toArray

public toArray([array<string|int, mixed> $arrAttributes = [] ]) : array<string|int, mixed>
Parameters
$arrAttributes : array<string|int, mixed> = []
Return values
array<string|int, mixed>

toJson()

Public wrapper for __toJson

public toJson([array<string|int, mixed> $arrAttributes = [] ]) : string
Parameters
$arrAttributes : array<string|int, mixed> = []
Return values
string

toString()

Public wrapper for __toString

public toString([string $format = '' ]) : string

Will use $format as an template and substitute {{key}} for attributes

Parameters
$format : string = ''
Return values
string

toXml()

Public wrapper for __toXml

public toXml([array<string|int, mixed> $arrAttributes = [] ][, string $rootName = 'item' ][, bool $addOpenTag = false ][, bool $addCdata = true ]) : string
Parameters
$arrAttributes : array<string|int, mixed> = []
$rootName : string = 'item'
$addOpenTag : bool = false
$addCdata : bool = true
Return values
string

unsetData()

Unset data from the object.

public unsetData([string $key = null ]) : $this

$key can be a string only. Array will be ignored.

Parameters
$key : string = null
Return values
$this

unsetDefaultBilling()

public unsetDefaultBilling() : $this
Return values
$this

unsetDefaultShipping()

public unsetDefaultShipping() : $this
Return values
$this

unsetOldData()

Unset old fields data from the object.

public unsetOldData([string $key = null ]) : $this

$key can be a string only. Array will be ignored.

Parameters
$key : string = null
Return values
$this

unsetSubscription()

Unset subscription

public unsetSubscription() : $this
Return values
$this

validate()

Validate customer attribute values.

public validate() : array<string|int, mixed>|true

For existing customer password + confirmation will be validated only when password is set (i.e. its change is requested)

Tags
throws
Mage_Core_Exception
Return values
array<string|int, mixed>|true

validateAddress()

Validate address

public validateAddress(array<string|int, mixed> $data[, string $type = 'billing' ]) : bool
Parameters
$data : array<string|int, mixed>
$type : string = 'billing'
Return values
bool

validateMagicLinkToken()

Validate magic link token

public validateMagicLinkToken(string $token) : bool
Parameters
$token : string
Return values
bool

validatePassword()

Validate password with salted hash

public validatePassword(string $password) : bool
Parameters
$password : string
Return values
bool

validateResetPassword()

Validate customer password on reset

public validateResetPassword() : array<string|int, mixed>|true
Return values
array<string|int, mixed>|true

__toJson()

Convert object attributes to JSON

protected __toJson([array<string|int, mixed> $arrAttributes = [] ]) : string
Parameters
$arrAttributes : array<string|int, mixed> = []

array of required attributes

Return values
string

__toXml()

Convert object attributes to XML

protected __toXml([array<string|int, mixed> $arrAttributes = [] ][, string $rootName = 'item' ][, bool $addOpenTag = false ][, bool $addCdata = true ]) : string
Parameters
$arrAttributes : array<string|int, mixed> = []

array of required attributes

$rootName : string = 'item'

name of the root element

$addOpenTag : bool = false
$addCdata : bool = true
Return values
string

_addFullNames()

protected _addFullNames() : mixed

_afterDelete()

Processing object after delete data

protected _afterDelete() : $this
Return values
$this

_afterDeleteCommit()

Processing manipulation after main transaction commit

protected _afterDeleteCommit() : $this
Return values
$this

_afterLoad()

Processing object after load data

protected _afterLoad() : $this
Return values
$this

_afterSave()

Processing object after save data

protected _afterSave() : $this
Return values
$this

_beforeDelete()

Prepare customer for delete

protected _beforeDelete() : $this
Attributes
#[Override]
Return values
$this

_beforeLoad()

Processing object before load data

protected _beforeLoad(int $id[, string|null $field = null ]) : $this
Parameters
$id : int
$field : string|null = null
Return values
$this

_camelize()

protected _camelize(string $name) : string
Parameters
$name : string
Return values
string

_clearData()

Clearing object's data

protected _clearData() : $this
Return values
$this

_clearReferences()

Clearing cyclic references

protected _clearReferences() : $this
Return values
$this

_construct()

Initialize customer model

protected _construct() : void
Attributes
#[Override]

_getData()

Get value from _data array without parse key

protected _getData(string $key) : mixed
Parameters
$key : string

_getEventData()

Get array of objects transferred to default events processing

protected _getEventData() : array<string|int, mixed>
Return values
array<string|int, mixed>

_getWebsiteStoreId()

Get either first store ID from a set website or the provided as default

protected _getWebsiteStoreId([int|string|null $defaultStoreId = null ]) : int
Parameters
$defaultStoreId : int|string|null = null
Tags
throws
Mage_Core_Exception
Return values
int

_hasModelChanged()

Check whether model has changed data.

protected _hasModelChanged() : bool

Can be overloaded in child classes to perform advanced check whether model needs to be saved e.g. using resourceModel->hasDataChanged() or any other technique

Return values
bool

_init()

Standard model initialization

protected _init(string $resourceModel) : mixed
Parameters
$resourceModel : string

_initOldFieldsMap()

Inits mapping array of object's previously used fields to new fields.

protected _initOldFieldsMap() : mixed

Must be overloaded by descendants to set concrete fields map.

_prepareArray()

Set required array elements

protected _prepareArray(array<string|int, mixed> &$arr[, array<string|int, mixed> $elements = [] ]) : array<string|int, mixed>
Parameters
$arr : array<string|int, mixed>
$elements : array<string|int, mixed> = []
Return values
array<string|int, mixed>

_prepareSyncFieldsMap()

Called after old fields are inited. Forms synchronization map to sync old fields and new fields between each other.

protected _prepareSyncFieldsMap() : $this
Return values
$this

_protectFromNonAdmin()

Safeguard func that will check, if we are in admin area

protected _protectFromNonAdmin() : mixed
Tags
throws
Mage_Core_Exception

_sendEmailTemplate()

Send corresponding email template

protected _sendEmailTemplate(string $template, string $sender[, array<string|int, mixed> $templateParams = [] ][, int|null $storeId = null ][, string|null $customerEmail = null ]) : $this
Parameters
$template : string

configuration path of email template

$sender : string

configuration path of email identity

$templateParams : array<string|int, mixed> = []
$storeId : int|null = null
$customerEmail : string|null = null
Return values
$this

_setResourceModel()

Set resource names

protected _setResourceModel(string $resourceName[, string|null $resourceCollectionName = null ]) : mixed

If collection name is omitted, resource name will be used with _collection appended

Parameters
$resourceName : string
$resourceCollectionName : string|null = null

_underscore()

Converts field names for setters and getters

protected _underscore(string $name) : string

$this->setMyField($value) === $this->setData('my_field', $value) Uses cache to eliminate unnecessary preg_replace

Parameters
$name : string
Return values
string
On this page

Search results