0

我正在尝试在每个翻译中上传图片,但它不起作用我的翻译实体是

<?php

namespace Application\AdminBundle\Entity;

use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Validator\Constraints as Assert;
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;

/**
 * @ORM\Entity
 * @ORM\Table(name="freemoni_franchise_translation")
 * @UniqueEntity("title")
 * @UniqueEntity("franchiseName")
 */
class FreemoniFranchiseTranslation implements \A2lix\I18nDoctrineBundle\Doctrine\Interfaces\OneLocaleInterface {

    use \A2lix\I18nDoctrineBundle\Doctrine\ORM\Util\Translation;

    /**
     * @var string
     *
     * @ORM\Column(name="franchiseName", type="string", length=255)
     */
    private $franchiseName;

    /**
     * @var string
     *
     * @ORM\Column(name="franchiseLogo", type="string", length=255)

     * @ORM\OneToMany(targetEntity="Application\AdminBundle\Entity\Image", mappedBy="FreemoniFranchiseTranslation", indexBy="locale", cascade={"all"}, orphanRemoval=true)
     */
    private $franchiseLogo;



    public function getId() {
        return $this->id;
    }



    /**
     * Set franchiseName
     *
     * @param string $franchiseName
     *
     * @return FreemoniFranchise
     */
    public function setFranchiseName(\Application\AdminBundle\Entity\image $franchiseName=null) {
        $this->franchiseName = $franchiseName;

        return $this;
    }

    /**
     * Get franchiseName
     *
     * @return string
     */
    public function getFranchiseName() {
        return $this->franchiseName;
    }

    /**
     * Set franchiseLogo
     *
     * @param string $franchiseLogo
     *
     * @return FreemoniFranchise
     */
    public function setFranchiseLogo($franchiseLogo) {
        $this->franchiseLogo = $franchiseLogo;

        return $this;
    }

    /**
     * Get franchiseLogo
     *
     * @return string
     */
    public function getFranchiseLogo() {

        return $this->franchiseLogo;
    }



}

我是 symfony 的初学者,所以即使在互联网上也没有得到任何帮助,如何在每个翻译中上传图像。图片上传工作正常但不能正常工作

4

0 回答 0