Working with Customers
As already described in the installation chapter, customers are simple data objects that need to implement certain interfaces or extend certain abstract classes.
As a result, working with customers is pretty much like working with Pimcore data objects. But there are three aspects to consider:
It is recommended to use
Customeras class name. If another name should be used, this has to be configured. For details see Configuration chapter.
CustomerProviderInterface: An implementation of the
CustomerProviderInterfaceis registered as service
CustomerManagementFrameworkBundle\CustomerProvider\CustomerProviderInterfaceand provides an abstraction for CRUD operations on customer data objects. This is especially handy since it considers the configured class name for the customer class.
CustomerSaveManageris responsible for all actions/hooks which are executed when a customer object is saved and can be configured in configuration. Its main components are
- Customer Save Handlers
- Automatic Object Naming Scheme
- Customer Save Validator
- Save Customer with Disabled Hooks
For Details see Customer Save Manager Chapter of the docs.
Other than that - just use the customer object like every other data object in Pimcore.
In addition to customers, there are two additional data entities provided by the CMF