How to pass argument Parameter configuration inheritance in using theme module inside di.xml
here one thing in our theme inside header file inside define code below
<?php $objectManager = \Magento\Framework\App\ObjectManager::getInstance(); ?>
<?php $customerSession = $objectManager->create('Magento\Customer\Model\Session'); ?>
<?php $customerUrl = $objectManager->create('Magento\Customer\Model\Url'); ?>
here is one for this argument inside pass it "Magento\Customer\Model\Session" and second is "Magento\Customer\Model\Url" so after pass to argument inside how to define in constructor inside and call to phtml inside if any idea reply me
but i need to not used object manager through customer url and session get
Best Answer
Magento builds an array with elements corresponding to the items and passes it as the argument. The array can contain an infinite number of items, and each array item can be of any object type including an array itself.
When Magento merges the configuration files for a given scope, array arguments with the same name get merged into a new array.
When Magento loads a new configuration at a later time, either by a more specific scope or through code, then any array definitions in the new configuration will replace the loaded config instead of merging.
Reference: https://devdocs.magento.com/guides/v2.3/extension-dev-guide/build/di-xml-file.html
I hope this will help