cancel
Showing results for 
Search instead for 
Did you mean: 

How to pass parameter via dependency injection

How to pass parameter via dependency injection

Hello, I would like to know if there is possible to inject string or number as parameter to class, for example I have some class with constructor:

    public function __construct(
        \Magento\Framework\App\State $state,
        \Magento\Store\Model\App\Emulation $emulation,
        \Magento\Framework\ObjectManagerInterface $objectManager,
int $someIntegerValue ){ $this->state = $state; $this->emulation = $emulation; $this->objectManager = $objectManager; }

I don't know, how can I pass integer value to this. Is it possible? 

Thanks,

Sebastian