0
我試圖做使用這些(composer.json)一個簡單的translable實體:A2lixTranslationFormBundle與STOF DoctrineExtensionsBundle:500內部服務器錯誤 - ReflectionException
"php": ">=5.3.3",
"symfony/symfony": "~2.4",
"doctrine/orm": "~2.2,>=2.2.3",
"doctrine/doctrine-bundle": "~1.2",
"stof/doctrine-extensions-bundle": "[email protected]",
"a2lix/translation-form-bundle": "2.*@dev"
我的實體(國家)有一個字段(名稱) translable:
<?php
namespace Zen\MyBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
use Gedmo\Mapping\Annotation as Gedmo;
use Gedmo\Translatable\Translatable;
/**
* @ORM\Entity
*/
class Country {
/**
* @ORM\Column(type="integer")
* @ORM\Id
* @ORM\GeneratedValue
*/
private $id;
/**
* @Gedmo\Translatable
* @ORM\Column(name="name", type="string", length=128)
*/
private $name;
/**
* @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;
public function setTranslatableLocale($locale) {
$this->locale = $locale;
}
}
config.yml說:
stof_doctrine_extensions:
default_locale: en_US
orm:
default:
tree: true
blameable: true
translatable: true
loggable: true
a2lix_translation_form:
locales: [en, it]
required_locales: [en]
manager_registry: doctrine
templating: "A2lixTranslationFormBundle::default.html.twig"
,現在我想用t他在sonataAdmin a2lix/TranslationFormBundle
:
protected function configureFormFields(FormMapper $formMapper)
{
$formMapper
->add('name', 'a2lix_translations');
;
}
但我得到的創建(奏鳴曲管理員)此錯誤:
Class Zen\MyBundle\Entity\CountryTranslation does not exist
500 Internal Server Error - ReflectionException
哪裏是我的錯?
有沒有一些天使可以幫助我?
訴