简体   繁体   中英

Add new is not working sonata admin Bundle

I'm using sonata mongoDB admin Bundle and i'm getting some problems, in fact I have a document ("Quizz") which references ("QuizzPart"):

/**
 * @var ArrayCollection
 * @MongoDB\ReferenceMany(targetDocument="QuizzPart", cascade={"all"})
 */
protected $quizzParts = array();

and the ("QuizzPart") itself references many questions :

/**
 * @var ArrayCollection
 * @MongoDB\ReferenceMany(targetDocument="Question", cascade={"all"})
 */
protected $questions = array();

The problem is that when I try to construct a new quiz from my admin class, in the configureFormFields, I can add new parts but I can add the model quizzPart but not the questions which are referenced by the quizz part. the add new (of the question) seems not doing anything. this is the code snippet from my admin class :

    ->add('quizzParts', 'sonata_type_collection', array('label' => 'ajouter une partie')
        , array(
        'edit'     => 'inline',
        'inline'   => 'table',
        'sortable' => 'id',
        )) ; 

Any one knows the reason of this bug please ? thank you

搜索和搜索后,我发现这是奏鸣曲管理员的错误,我们不能使用嵌入的sonata_type_collection,并且到目前为止没有问题,请在此处查看: https : //github.com/sonata-project/SonataAdminBundle/问题/ 262

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM