forked from magento/magento2
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRendererInterface.php
More file actions
59 lines (53 loc) · 1.39 KB
/
RendererInterface.php
File metadata and controls
59 lines (53 loc) · 1.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
namespace Magento\Customer\Block\Address\Renderer;
use Magento\Directory\Model\Country\Format;
use Magento\Customer\Model\Address\AddressModelInterface;
/**
* Address renderer interface
*
* @api
*/
interface RendererInterface
{
/**
* Set format type object
*
* @param \Magento\Framework\DataObject $type
* @return void
*/
public function setType(\Magento\Framework\DataObject $type);
/**
* Retrieve format type object
*
* @return \Magento\Framework\DataObject
*/
public function getType();
/**
* Render address
*
* @param AddressModelInterface $address
* @param string|null $format
* @return mixed
* All new code should use renderArray based on Metadata service
*/
public function render(AddressModelInterface $address, $format = null);
/**
* Get a format object for a given address attributes, based on the type set earlier.
*
* @param null|array $addressAttributes
* @return Format
*/
public function getFormatArray($addressAttributes = null);
/**
* Render address by attribute array
*
* @param array $addressAttributes
* @param Format|null $format
* @return string
*/
public function renderArray($addressAttributes, $format = null);
}