1 | <?php |
||
40 | class Review extends \Magento\Framework\View\Element\Template |
||
41 | { |
||
42 | /** |
||
43 | * @var \Magento\Quote\Model\Quote |
||
44 | */ |
||
45 | protected $_quote; |
||
46 | |||
47 | /** |
||
48 | * @var \Magento\Quote\Model\Quote\Address |
||
49 | */ |
||
50 | protected $_address; |
||
51 | |||
52 | /** |
||
53 | * @var \Magento\Customer\Model\Address\Config |
||
54 | */ |
||
55 | protected $_addressConfig; |
||
56 | |||
57 | /** |
||
58 | * Currently selected shipping rate |
||
59 | * |
||
60 | * @var Rate |
||
61 | */ |
||
62 | protected $_currentShippingRate = null; |
||
63 | |||
64 | /** |
||
65 | * Paypal controller path |
||
66 | * |
||
67 | * @var string |
||
68 | */ |
||
69 | protected $_controllerPath = 'payone/onepage'; |
||
70 | |||
71 | /** |
||
72 | * @var \Magento\Tax\Helper\Data |
||
73 | */ |
||
74 | protected $_taxHelper; |
||
75 | |||
76 | /** |
||
77 | * @var PriceCurrencyInterface |
||
78 | */ |
||
79 | protected $priceCurrency; |
||
80 | |||
81 | /** |
||
82 | * Checkout session object |
||
83 | * |
||
84 | * @var Session |
||
85 | */ |
||
86 | protected $checkoutSession; |
||
87 | |||
88 | /** |
||
89 | * @param \Magento\Framework\View\Element\Template\Context $context |
||
90 | * @param \Magento\Tax\Helper\Data $taxHelper |
||
91 | * @param \Magento\Customer\Model\Address\Config $addressConfig |
||
92 | * @param PriceCurrencyInterface $priceCurrency |
||
93 | * @param Session $checkoutSession |
||
94 | * @param array $data |
||
95 | */ |
||
96 | public function __construct( |
||
111 | |||
112 | /** |
||
113 | * Return checkout quote object |
||
114 | * |
||
115 | * @return \Magento\Quote\Model\Quote |
||
116 | */ |
||
117 | protected function getQuote() |
||
124 | |||
125 | /** |
||
126 | * Return quote billing address |
||
127 | * |
||
128 | * @return Address |
||
129 | */ |
||
130 | public function getBillingAddress() |
||
134 | |||
135 | /** |
||
136 | * Return quote shipping address |
||
137 | * |
||
138 | * @return false|Address |
||
139 | */ |
||
140 | public function getShippingAddress() |
||
147 | |||
148 | /** |
||
149 | * Get HTML output for specified address |
||
150 | * |
||
151 | * @param Address $address |
||
152 | * @return string |
||
153 | */ |
||
154 | public function renderAddress(Address $address) |
||
161 | |||
162 | /** |
||
163 | * Return carrier name from config, base on carrier code |
||
164 | * |
||
165 | * @param string $carrierCode |
||
166 | * @return string |
||
167 | */ |
||
168 | public function getCarrierName($carrierCode) |
||
175 | |||
176 | /** |
||
177 | * Get either shipping rate code or empty value on error |
||
178 | * |
||
179 | * @param DataObject $rate |
||
180 | * @return string |
||
181 | */ |
||
182 | public function renderShippingRateValue(DataObject $rate) |
||
189 | |||
190 | /** |
||
191 | * Get shipping rate code title and its price or error message |
||
192 | * |
||
193 | * @param DataObject $rate |
||
194 | * @param string $format |
||
195 | * @param string $inclTaxFormat |
||
196 | * @return string |
||
197 | */ |
||
198 | public function renderShippingRateOption(DataObject $rate, $format = '%s - %s%s', $inclTaxFormat = ' (%s %s)') |
||
216 | |||
217 | /** |
||
218 | * Getter for current shipping rate |
||
219 | * |
||
220 | * @return Rate |
||
221 | */ |
||
222 | public function getCurrentShippingRate() |
||
226 | |||
227 | /** |
||
228 | * Get quote email |
||
229 | * |
||
230 | * @return string |
||
231 | */ |
||
232 | public function getEmail() |
||
237 | |||
238 | /** |
||
239 | * Return formatted shipping price |
||
240 | * |
||
241 | * @param float $price |
||
242 | * @param bool $isInclTax |
||
243 | * @return string |
||
244 | */ |
||
245 | protected function _getShippingPrice($price, $isInclTax) |
||
249 | |||
250 | /** |
||
251 | * Format price base on store convert price method |
||
252 | * |
||
253 | * @param float $price |
||
254 | * @return string |
||
255 | */ |
||
256 | protected function _formatPrice($price) |
||
265 | |||
266 | /** |
||
267 | * Retrieve payment method and assign additional template values |
||
268 | * |
||
269 | * @return $this |
||
270 | */ |
||
271 | protected function _beforeToHtml() |
||
310 | } |
||
311 |
If you implement
__call
and you know which methods are available, you can improve IDE auto-completion and static analysis by adding a @method annotation to the class.This is often the case, when
__call
is implemented by a parent class and only the child class knows which methods exist: