A2lix在每次翻译中形成翻译图像上传

时间:2015-12-11 13:56:30

标签: php symfony a2lix-translation

我正在尝试在每次翻译中上传图片,但它无效 我的翻译实体是

<?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的初学者,所以即使在互联网上也没有得到任何帮助,如何在每个翻译中上传图像。  图像上传工作正常但不能在翻译中工作

0 个答案:

没有答案