I am using Magento 2.3.5-p2
I know that in Magento 2, the Street address configuration is not able to be changed through admin by going to
Stores > Settings > Configuration > Customers > Costumer Configuration > Name and Address Options > Number of Lines in a Street Address
now my task is that I am required to retrieve value of Number of Lines in a Street Address being set above to below file so that I can create some condition
vendor/magento/module-customer/Controller/Address/FormPost.php
what helper or object that I needed to use to be able to get the value of Number of Lines in a Street Address being set
Thank you
Best Answer
You can create your own helper like:
And inject the helper to your block or controller or by object manager:
P.S.S you can also direct the first code to your block or controller if you dont want to used helper Sample Code via Object Manager
P.S. using Object Manager is not advisable and you should inject it
*you can find the config path here: vendor/magento/module-customer/etc/adminhtml/system.xml
*config default values was set here: vendor/magento/module-customer/etc/config.xml
you can get others path by opening the system.xml
E.g. customer/address/street_lines