/** * Process js Layout of block * * @param array $jsLayout * @return array * @SuppressWarnings(PHPMD.NPathComplexity) */ public function process($jsLayout) { $elements = ['city' => ['visible' => $this->isCityActive(), 'formElement' => 'input', 'label' => __('City'), 'value' => null], 'country_id' => ['visible' => true, 'formElement' => 'select', 'label' => __('Country'), 'options' => $this->countryCollection->load()->toOptionArray(), 'value' => null], 'region_id' => ['visible' => true, 'formElement' => 'select', 'label' => __('State/Province'), 'options' => $this->regionCollection->load()->toOptionArray(), 'value' => null], 'postcode' => ['visible' => true, 'formElement' => 'input', 'label' => __('Zip/Postal Code'), 'value' => null]]; if (isset($jsLayout['components']['block-summary']['children']['block-shipping']['children']['address-fieldsets']['children'])) { $fieldSetPointer =& $jsLayout['components']['block-summary']['children']['block-shipping']['children']['address-fieldsets']['children']; $fieldSetPointer = $this->merger->merge($elements, 'checkoutProvider', 'shippingAddress', $fieldSetPointer); } return $jsLayout; }