17 class Info extends \Magento\Sales\Block\Adminhtml\Order\AbstractOrder
60 \
Magento\Sales\Helper\Admin $adminHelper,
69 $this->_metadataElementFactory = $elementFactory;
83 throw new \Magento\Framework\Exception\LocalizedException(
84 __(
'Please correct the parent block for this block.')
93 parent::_beforeToHtml();
106 $deleted =
__(
' [deleted]');
107 return nl2br($this->
getOrder()->getStoreName()) . $deleted;
111 return implode(
'<br/>',
$name);
125 $customerGroupId = $this->
getOrder()->getCustomerGroupId();
127 if ($customerGroupId !==
null) {
128 return $this->groupRepository->getById($customerGroupId)->getCode();
145 if ($this->
getOrder()->getCustomerIsGuest() || !$this->
getOrder()->getCustomerId()) {
149 return $this->
getUrl(
'customer/index/edit', [
'id' => $this->
getOrder()->getCustomerId()]);
160 return $this->
getUrl(
'sales/order/view', [
'order_id' => $orderId]);
173 if (isset(
$data[$sortOrder])) {
196 $orderKey = sprintf(
'customer_%s',
$attribute->getAttributeCode());
197 $orderValue = $this->
getOrder()->getData($orderKey);
198 if ($orderValue !=
'') {
200 $value = $metadataElement->outputValue(AttributeDataFactory::OUTPUT_FORMAT_HTML);
203 $accountData[$sortOrder] = [
209 ksort($accountData, SORT_NUMERIC);
223 if ($this->_authorization->isAllowed(
'Magento_Sales::actions_edit')) {
241 return !$this->_scopeConfig->isSetFlag(
242 'sales/general/hide_customer_ip',
255 return $this->_storeManager->isSingleStoreMode();
267 return $this->_localeDate->scopeDate(
$store, $createdAt,
true);
278 return $this->_localeDate->getConfigTimezone(
292 return $this->_localeDate->date(
new \DateTime($createdAt));
303 return $this->addressRenderer->format(
$address,
'html');
315 return parent::getChildHtml(
$alias, $useCache);
319 $outputChildNames = array_diff($childNames, [
'extra_customer_info']);
322 foreach ($outputChildNames as $childName) {
323 $out .= $layout->renderElement($childName, $useCache);
getCreatedAtStoreDate($store, $createdAt)
shouldDisplayCustomerIp()
_prepareAccountDataSortOrder(array $data, $sortOrder)
getFormattedAddress(Address $address)
escapeHtml($data, $allowedTags=null)
__construct(\Magento\Backend\Block\Template\Context $context, \Magento\Framework\Registry $registry, \Magento\Sales\Helper\Admin $adminHelper, \Magento\Customer\Api\GroupRepositoryInterface $groupRepository, \Magento\Customer\Api\CustomerMetadataInterface $metadata, \Magento\Customer\Model\Metadata\ElementFactory $elementFactory, \Magento\Sales\Model\Order\Address\Renderer $addressRenderer, array $data=[])
getUrl($route='', $params=[])
getChildHtml($alias='', $useCache=true)
getTimezoneForStore($store)
getAddressEditLink($address, $label='')
getOrderAdminDate($createdAt)
setDataUsingMethod($key, $args=[])
if(!isset($_GET['name'])) $name