PHP 클래스 Sonata\CustomerBundle\Twig\Extension\AddressExtension

저자: Hugo Briand ([email protected])
상속: extends Twig_Extension
파일 보기 프로젝트 열기: sonata-project/ecommerce 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$deliverySelector Sonata\Component\Delivery\ServiceDeliverySelectorInterface

공개 메소드들

메소드 설명
__construct ( Sonata\Component\Delivery\ServiceDeliverySelectorInterface $deliverySelector ) Constructor.
getFunctions ( )
getName ( )
isAddressDeliverable ( Sonata\Component\Customer\AddressInterface $address, Sonata\Component\Basket\BasketInterface $basket ) : boolean Returns if address can deliver the given basket.
renderAddress ( Twig_Environment $environment, mixed $address, boolean $showName = true, boolean $showEdit = false, string $context = null ) : string Gets the HTML of an address.

메소드 상세

__construct() 공개 메소드

Constructor.
public __construct ( Sonata\Component\Delivery\ServiceDeliverySelectorInterface $deliverySelector )
$deliverySelector Sonata\Component\Delivery\ServiceDeliverySelectorInterface

getFunctions() 공개 메소드

public getFunctions ( )

getName() 공개 메소드

public getName ( )

isAddressDeliverable() 공개 메소드

Returns if address can deliver the given basket.
public isAddressDeliverable ( Sonata\Component\Customer\AddressInterface $address, Sonata\Component\Basket\BasketInterface $basket ) : boolean
$address Sonata\Component\Customer\AddressInterface A Sonata e-commerce address instance
$basket Sonata\Component\Basket\BasketInterface A Sonata e-commerce basket instance
리턴 boolean

renderAddress() 공개 메소드

Gets the HTML of an address.
public renderAddress ( Twig_Environment $environment, mixed $address, boolean $showName = true, boolean $showEdit = false, string $context = null ) : string
$environment Twig_Environment A Twig environment
$address mixed An instance of AddressInterface or array with keys: (id, firstname, lastname, address1, postcode, city, country_code and optionally name, address2, address3)
$showName boolean Display address name?
$showEdit boolean Display edit button?
$context string A context for edit link
리턴 string

프로퍼티 상세

$deliverySelector 보호되어 있는 프로퍼티

protected ServiceDeliverySelectorInterface,Sonata\Component\Delivery $deliverySelector
리턴 Sonata\Component\Delivery\ServiceDeliverySelectorInterface