I have a controller with a method calculateMaterial($product) where $product is a Doctrine entity.
I have tried to build a service for calling this method, i called my service Calculator.
Here's my services.xml file :
http://symfony.com/schema/dic/services/services-1.0.xsd">
<services>
<service id='acv.calculator'
class='Arto\AcvBundle\Calculator\Calculator'>
<argument type="service" id="doctrine.orm.entity_manager"/>
<call method="calculateMaterial">
<argument type="service" id="acv.product"></argument>
</call>
</service>
<service id='acv.product'
class='Arto\AcvBundle\Entity\Product'
public='true'>
<call method="getAssemblies"></call>
</service>
</services>
All works fine, i call my service in a method from my controller but when i execute the calculateMaterial($product) method, which is now in my service Calculator, i always get a $product NULL.
I don't know how to do for giving the product in the method from my controller to the method of my service.