Symfony undifined CreateForm method
<p>i want to generate a form to add a medicament but he don't recognize the method</p>

<p><strong>Controller</strong></p>

<pre><code>$public function addAction (Request $Request)
{
    $Medicament = new Medicament();

    $form = $this-&gt;
    createForm(ModeleType::class,$Medicament);
    $form-&gt;handleRequest($Request);
    if ($form-&gt;isValid())
    {
        $em=$this-&gt;getDoctrine()-&gt;getManager();
        $em-&gt;persist($Medicament);

        $em-&gt;flush();
        return $this-&gt;redirect($this-&gt;generateUrl(
            'Pharmacie_Medicament_Add'
        ));

    }
</code></pre>

<p><strong>Form</strong></p>

<pre><code>public function buildForm(FormBuilderInterface $builder, array $options)
{
    $builder-&gt;add('nom')-&gt;add('quantite')-&gt;add('datePeremption')-&gt;add('prix')
    -&gt;add('save',SubmitType::class);
}

public function configureOptions(OptionsResolver $resolver)
{
    $resolver-&gt;setDefaults(array(
        'data_class' =&gt; 'PharmacieCentraleBundle\Entity\Medicament'
    ));
}

public function getBlockPrefix()
{
    return 'pharmaciecentralebundle_medicament';
}
</code></pre>

<blockquote>
  <p>Attempted to call an undefined method named "createForm" of class <code>PharmacieCentraleBundle\Controller\MedicamentController</code></p>
</blockquote>

<p>ignore this : kjetrzejkbfckzejvbkejvbkarebvnreblheabv eafvkljbeamjkvbelvbvbelvblb ealvberavhrve</p>