コード例 #1
0
ファイル: Edit.php プロジェクト: aiesh/magento2
 /**
  * Return the specified numbered street line.
  *
  * @param int $lineNumber
  * @return string
  */
 public function getStreetLine($lineNumber)
 {
     $street = $this->_address->getStreet();
     return isset($street[$lineNumber - 1]) ? $street[$lineNumber - 1] : '';
 }
コード例 #2
0
ファイル: Dashboard.php プロジェクト: aiesh/magento2
 /**
  * Retrieve the Url for editing the specified address.
  *
  * @param \Magento\Customer\Service\V1\Data\Address $address
  * @return string
  */
 public function getAddressEditUrl($address)
 {
     return $this->_urlBuilder->getUrl('customer/address/edit', array('_secure' => true, 'id' => $address->getId()));
 }
コード例 #3
0
 /**
  * @param Address $address
  */
 private function _assertMinimumRequiredFields(Address $address)
 {
     $this->assertEquals($this->_expectedValues['firstname'], $address->getFirstname());
     $this->assertEquals($this->_expectedValues['lastname'], $address->getLastname());
     $this->assertEquals($this->_expectedValues['street'][0], $address->getStreet()[0]);
     $this->assertEquals($this->_expectedValues['city'], $address->getCity());
     $this->assertEquals($this->_expectedValues['country_id'], $address->getCountryId());
     $this->assertEquals($this->objectManagerHelper->getObject('\\Magento\\Customer\\Service\\V1\\Data\\RegionBuilder')->setRegionId($this->_expectedValues['region']['region_id'])->setRegion($this->_expectedValues['region']['region'])->create(), $address->getRegion());
     $this->assertEquals($this->_expectedValues['postcode'], $address->getPostcode());
     $this->assertEquals($this->_expectedValues['telephone'], $address->getTelephone());
 }
コード例 #4
0
ファイル: Select.php プロジェクト: aiesh/magento2
 /**
  * Get URL of page, at which customer billing address can be set.
  *
  * @param \Magento\Customer\Service\V1\Data\Address $address
  * @return string
  */
 public function getSetAddressUrl($address)
 {
     return $this->getUrl('*/*/setBilling', array('id' => $address->getId()));
 }