PHP Class Sonata\CustomerBundle\Controller\CustomerController

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

Public Methods

Method 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.

Protected Methods

Method 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 method

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

addressesAction() public method

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

checkAddress() protected method

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

deleteAddressAction() public method

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

editAddressAction() public method

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

getAddressManager() protected method

protected getAddressManager ( ) : Sonata\Component\Customer\AddressManagerInterface
return Sonata\Component\Customer\AddressManagerInterface

getCustomer() protected method

protected getCustomer ( ) : Sonata\Component\Customer\CustomerInterface
return Sonata\Component\Customer\CustomerInterface

getCustomerManager() protected method

protected getCustomerManager ( ) : Sonata\Component\Customer\CustomerManagerInterface
return Sonata\Component\Customer\CustomerManagerInterface

setCurrentAddressAction() public method

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

updateAddress() protected method

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