PHP Class Sonata\CustomerBundle\Controller\CustomerController

Author: Hugo Briand ([email protected])
Inheritance: extends Symfony\Bundle\FrameworkBundle\Controller\Controller
Afficher le fichier Open project: sonata-project/ecommerce

Méthodes publiques

Méthode Description
addAddressAction ( ) : Response Adds an address to current customer.
addressesAction ( ) : Response Lists customer's addresses.
deleteAddressAction ( $id ) : RedirectResponse Deletes address $id.
editAddressAction ( $id ) : RedirectResponse | Response Controller action to edit address $id.
setCurrentAddressAction ( $id ) : RedirectResponse Sets address $id to current.

Méthodes protégées

Méthode Description
checkAddress ( Sonata\Component\Customer\AddressInterface $address = null ) Checks if $address is valid.
getAddressManager ( ) : Sonata\Component\Customer\AddressManagerInterface
getCustomer ( ) : Sonata\Component\Customer\CustomerInterface
getCustomerManager ( ) : Sonata\Component\Customer\CustomerManagerInterface
updateAddress ( integer $id = null ) : RedirectResponse | Response Updates or create an address.

Method Details

addAddressAction() public méthode

Adds an address to current customer.
public addAddressAction ( ) : Response
Résultat Symfony\Component\HttpFoundation\Response

addressesAction() public méthode

Lists customer's addresses.
public addressesAction ( ) : Response
Résultat Symfony\Component\HttpFoundation\Response

checkAddress() protected méthode

Checks if $address is valid.
protected checkAddress ( Sonata\Component\Customer\AddressInterface $address = null )
$address Sonata\Component\Customer\AddressInterface

deleteAddressAction() public méthode

Deletes address $id.
public deleteAddressAction ( $id ) : RedirectResponse
$id The address to delete
Résultat Symfony\Component\HttpFoundation\RedirectResponse

editAddressAction() public méthode

Controller action to edit address $id.
public editAddressAction ( $id ) : RedirectResponse | Response
$id
Résultat Symfony\Component\HttpFoundation\RedirectResponse | Symfony\Component\HttpFoundation\Response

getAddressManager() protected méthode

protected getAddressManager ( ) : Sonata\Component\Customer\AddressManagerInterface
Résultat Sonata\Component\Customer\AddressManagerInterface

getCustomer() protected méthode

protected getCustomer ( ) : Sonata\Component\Customer\CustomerInterface
Résultat Sonata\Component\Customer\CustomerInterface

getCustomerManager() protected méthode

protected getCustomerManager ( ) : Sonata\Component\Customer\CustomerManagerInterface
Résultat Sonata\Component\Customer\CustomerManagerInterface

setCurrentAddressAction() public méthode

Sets address $id to current.
public setCurrentAddressAction ( $id ) : RedirectResponse
$id
Résultat Symfony\Component\HttpFoundation\RedirectResponse

updateAddress() protected méthode

Updates or create an address.
protected updateAddress ( integer $id = null ) : RedirectResponse | Response
$id integer Address id
Résultat Symfony\Component\HttpFoundation\RedirectResponse | Symfony\Component\HttpFoundation\Response