You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I use admingenerator for my backoffice and i use vich-uploader to upload files but after configuration i reload my page and i have this issue : Could not load type "single_upload"
I already looked at this #396 but i think its too old because links doesn't works.
Can someone help me please ?
Have a nice day !
here is my configuration :
I'm on Symfony 2.3
My class:
<?phpnamespaceTranoi\SiteBundle\Entity;
useGedmo\Mapping\AnnotationasGedmo;
useDoctrine\ORM\MappingasORM;
useGedmo\Translatable\Translatable;
useVich\UploaderBundle\Mapping\AnnotationasVich;
useSymfony\Component\Validator\ConstraintsasAssert;
useSymfony\Component\HttpFoundation\File\File;
/** * Pays * * @ORM\Table() * @ORM\Entity(repositoryClass="Tranoi\SiteBundle\Entity\PaysRepository") * @Vich\Uploadable */class Pays implements Translatable
{
/** * @var ArrayCollection Designer $designers * @ORM\OneToMany(targetEntity="Tranoi\DesignerBundle\Entity\Designer", mappedBy="pays") */private$designers;
/** * @var ArrayCollection Showroom $showrooms * @ORM\OneToMany(targetEntity="Tranoi\DesignerBundle\Entity\Showroom", mappedBy="pays") */private$showrooms;
/** * @Gedmo\Locale * Used locale to override Translation listener`s locale * this is not a mapped field of entity metadata, just a simple property */private$locale;
/** * @var integer * * @ORM\Column(name="id", type="integer") * @ORM\Id * @ORM\GeneratedValue(strategy="AUTO") */private$id;
/** * @var string * @Gedmo\Translatable * @ORM\Column(name="libelle", type="string", length=50, nullable=false) */private$libelle;
/** * @var string * @ORM\Column(name="code_pays", type="string", length=50, nullable=false) */private$codePays;
/** * @Vich\UploadableField(mapping="drapeau_image", fileNameProperty="drapeau") * @var File $drapeauFile */protected$drapeauFile;
/** * @var string * @ORM\Column(name="drapeau", type="string", length=100, nullable=true) */private$drapeau;
/** * @var string * @ORM\Column(name="indicatif_telephonique", type="string", length=10, nullable=false) */private$indicatifTelephonique;
/** * Get id * * @return integer */publicfunctiongetId()
{
return$this->id;
}
/** * Set libelle * * @param string $libelle * @return Pays */publicfunctionsetLibelle($libelle)
{
$this->libelle = $libelle;
return$this;
}
/** * Get libelle * * @return string */publicfunctiongetLibelle()
{
return$this->libelle;
}
/** * Constructor */publicfunction__construct()
{
$this->designers = new \Doctrine\Common\Collections\ArrayCollection();
$this->showrooms = new \Doctrine\Common\Collections\ArrayCollection();
}
/** * Set codePays * * @param string $codePays * @return Pays */publicfunctionsetCodePays($codePays)
{
$this->codePays = $codePays;
return$this;
}
/** * Get codePays * * @return string */publicfunctiongetCodePays()
{
return$this->codePays;
}
/** * If manually uploading a file (i.e. not using Symfony Form) ensure an instance * of 'UploadedFile' is injected into this setter to trigger the update. If this * bundle's configuration parameter 'inject_on_load' is set to 'true' this setter * must be able to accept an instance of 'File' as the bundle will inject one here * during Doctrine hydration. * * @param File|\Symfony\Component\HttpFoundation\File\UploadedFile $image */publicfunctionsetDrapeauFile(File$image)
{
$this->drapeauFile = $image;
if ($image) {
$this->updatedAt = new \DateTime('now');
}
}
/** * @return File */publicfunctiongetDrapeauFile()
{
return$this->drapeauFile;
}
/** * Set drapeau * * @param string $drapeau * @return Pays */publicfunctionsetDrapeau($drapeau)
{
$this->drapeau = $drapeau;
return$this;
}
/** * Get drapeau * * @return string */publicfunctiongetDrapeau()
{
return$this->drapeau;
}
/** * Set indicatifTelephonique * * @param string $indicatifTelephonique * @return Pays */publicfunctionsetIndicatifTelephonique($indicatifTelephonique)
{
$this->indicatifTelephonique = $indicatifTelephonique;
return$this;
}
/** * Get indicatifTelephonique * * @return string */publicfunctiongetIndicatifTelephonique()
{
return$this->indicatifTelephonique;
}
/** * Add designers * * @param \Tranoi\DesignerBundle\Entity\Designer $designers * @return Pays */publicfunctionaddDesigner(\Tranoi\DesignerBundle\Entity\Designer$designers)
{
$this->designers[] = $designers;
return$this;
}
/** * Remove designers * * @param \Tranoi\DesignerBundle\Entity\Designer $designers */publicfunctionremoveDesigner(\Tranoi\DesignerBundle\Entity\Designer$designers)
{
$this->designers->removeElement($designers);
}
/** * Get designers * * @return \Doctrine\Common\Collections\Collection */publicfunctiongetDesigners()
{
return$this->designers;
}
/** * Add showrooms * * @param \Tranoi\DesignerBundle\Entity\Showroom $showrooms * @return Pays */publicfunctionaddShowroom(\Tranoi\DesignerBundle\Entity\Showroom$showrooms)
{
$this->showrooms[] = $showrooms;
return$this;
}
/** * Remove showrooms * * @param \Tranoi\DesignerBundle\Entity\Showroom $showrooms */publicfunctionremoveShowroom(\Tranoi\DesignerBundle\Entity\Showroom$showrooms)
{
$this->showrooms->removeElement($showrooms);
}
/** * Get showrooms * * @return \Doctrine\Common\Collections\Collection */publicfunctiongetShowrooms()
{
return$this->showrooms;
}
publicfunction__toString()
{
return$this->libelle;
}
}
Hi,
I use admingenerator for my backoffice and i use vich-uploader to upload files but after configuration i reload my page and i have this issue : Could not load type "single_upload"
I already looked at this #396 but i think its too old because links doesn't works.
Can someone help me please ?
Have a nice day !
here is my configuration :
I'm on Symfony 2.3
My class:
admin-generator.yml :
app/config.yml
The text was updated successfully, but these errors were encountered: