Definition at line 8 of file LayoutProcessor.php.
◆ __construct()
- Parameters
-
\Magento\Checkout\Block\Checkout\AttributeMerger | $merger | |
\Magento\Directory\Model\ResourceModel\Country\Collection | $countryCollection | |
\Magento\Directory\Model\ResourceModel\Region\Collection | $regionCollection | |
\Magento\Directory\Model\TopDestinationCountries | $topDestinationCountries | @codeCoverageIgnore |
Definition at line 42 of file LayoutProcessor.php.
51 $this->topDestinationCountries = $topDestinationCountries ?:
53 ->get(\
Magento\Directory\Model\TopDestinationCountries::class);
◆ isCityActive()
◆ isStateActive()
◆ process()
Process js Layout of block
- Parameters
-
- Returns
- array @SuppressWarnings(PHPMD.NPathComplexity)
Implements LayoutProcessorInterface.
Definition at line 85 of file LayoutProcessor.php.
90 'formElement' =>
'input',
91 'label' =>
__(
'City'),
96 'formElement' =>
'select',
97 'label' =>
__(
'Country'),
103 'formElement' =>
'select',
104 'label' =>
__(
'State/Province'),
110 'formElement' =>
'input',
111 'label' =>
__(
'Zip/Postal Code'),
116 if (!isset(
$jsLayout[
'components'][
'checkoutProvider'][
'dictionaries'])) {
117 $jsLayout[
'components'][
'checkoutProvider'][
'dictionaries'] = [
118 'country_id' => $this->countryCollection->loadByStore()->setForegroundCountries(
119 $this->topDestinationCountries->getTopDestinations()
121 'region_id' => $this->regionCollection->addAllowedCountriesFilter()->toOptionArray(),
124 if (isset(
$jsLayout[
'components'][
'block-summary'][
'children'][
'block-shipping'][
'children']
125 [
'address-fieldsets'][
'children'])
127 $fieldSetPointer = &
$jsLayout[
'components'][
'block-summary'][
'children'][
'block-shipping']
128 [
'children'][
'address-fieldsets'][
'children'];
129 $fieldSetPointer = $this->merger->merge($elements,
'checkoutProvider',
'shippingAddress', $fieldSetPointer);
130 $fieldSetPointer[
'region_id'][
'config'][
'skipValidation'] =
true;
◆ $countryCollection
◆ $defaultShippingAddress
$defaultShippingAddress = null |
|
protected |
◆ $merger
◆ $regionCollection
The documentation for this class was generated from the following file: