Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/symfony/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php Gedmo树嵌套&;论行为翻译_Php_Symfony_Doctrine Orm - Fatal编程技术网

Php Gedmo树嵌套&;论行为翻译

Php Gedmo树嵌套&;论行为翻译,php,symfony,doctrine-orm,Php,Symfony,Doctrine Orm,我有一个简单的问题,但我不知道如何解决它, 因此,我使用条令行为在我的项目上应用系统翻译,使用Gedmo\Tree应用类别从左到右的系统 这是我的行动: 公共函数菜单动作() { $em=$this->getDoctrine()->getManager(); $entityManager=$this->getDoctrine()->getManager(); $repo=$em->getRepository('ProductsBundle:Category'); $options=array(

我有一个简单的问题,但我不知道如何解决它, 因此,我使用条令行为在我的项目上应用系统翻译,使用Gedmo\Tree应用类别从左到右的系统

这是我的行动:

公共函数菜单动作()
{
$em=$this->getDoctrine()->getManager();
$entityManager=$this->getDoctrine()->getManager();
$repo=$em->getRepository('ProductsBundle:Category');
$options=array(
“装饰”=>正确,
“rootOpen”=>“
    ”, “rootClose”=>“
”, “childOpen”=>“
  • ”, “childClose”=>“
  • ”, 'representationField'=>'id', 'NodeCorator'=>函数($node){ 返回“”; } ); $htmlTree=$repo->childrenHierarchy( 无效的 假,, 美元期权 ); //$tree=$repo->buildTree($query->getArrayResult(),$options); $categories=$em->getRepository(“ProductsBundle:Category”)->GetCategoriyHiearchy(); 返回$this->render('ProductsBundle:Public:Category/menu.html.twig',数组( “类别”=>$categories, “htmlTree”=>$htmlTree, )); }
    我想做的就是,要更改链接的名称,我将ID设置为,结果如下:

    现在,我想从实体分类中得到一个feild标题,翻译教义行为

    谢谢