sonata admin - how to add ManyToOne property field in configureListfield in sonataAdmin -
I have a phone unit unit that contains many properties for many unit entity classes I
An exception is given during the rendering of a template ("You must define a Fontionnaire.php class: < Pre> FonctionnaireAdmin.php: __toString () method to add something like this: This Sonata admin bundle will allow your current The name of the object will be used to display. associated_property <: when I want to add the idGrade area to FonctionnaireAdmin's ConfigureListField (using SonataAdmin) I encountered this error / code> option or Create a
\ __counter __ \ Examens \ ExamensBundle \ unit \ Grade Proxy :: __ toString service examens.examens.admin.fonctionnaire from the field option idGrade to the method is in SonataDoctrineORMAdminBundle "): CRUD: Line_ on line_list_orm_many_to_one.html.tw
& lt ;? Php namespace exams \ ExamensBundle \ Entity; Use the theory / ORM \ mapping as an ORM; / ** * PhoneNationLayer * / Class Fictionalair {//...//// ** * @VARAEfimens \ Examinations Bundle \ Unit \ Grade * / Private $ IDGed; //...//}
& lt ;? Php namespace exams ExamensBundle \ Admin; Use Sonata \ AdminBundle \ Admin \ Admin; Sonata \ AdminBundle \ Datagrid \ ListMapper; Sonata \ AdminBundle \ Datagrid \ DatagridMapper; Sonata \ AdminBundle \ Validator \ errorElement; Sonata \ AdminBundle \ Form \ Use FormMapper; Sonata \ AdminBundle \ Show \ ShowMapper; Use Exam \ ExamensBundle \ Entity \ Fonctionnaire; Square FonctionnaireAdmin extension extension [protected $ datagridValues = array ('_sort_order' => 'ASC', '_sort_by' = & gt; 'codefone') ;; Protected function configFormFields (FormMapper $ formMapper) {$ formMapper - & gt; Adding ('Nomar', 'Text', array ('label' = & gt; 'Nom arabe')) - & gt; Adding ('prenomAr', 'text', array ('label' = & gt; 'prime enterprise')) - & gt; Add ('NamFrame', 'Text', Arrays ('Labels' = & gt; 'Noam Franssey')) - & gt; Add ('Prenomfr', 'text', array ('label' = & gt; 'Pra Francesa')) - & gt; Add ('nomUtilisateur', 'text', array ('label' = & gt; 'nom et (' atepace ',' text ', array (' label '=' gtc: 'mutated pass)' - & gt; Add ('IDGrade', 'unit', array ('class' =>,' examens \ ExamensBundle \ unit \ grade ',' property '=>' libGradeAr ')) - & gt; add' dateNominationGrade ('' Date '', array ('' year = '' ';' (',', ')' Add '-' ('prenomAr') - & gt; Add ('nomFr') - & gt; add ('prenomFr') - & gt; ('nomUtilisateur') - & gt; plus ('mottepepa') - & gt; Add ('idgrade') - & gt; Add ('date enrollment grade');}}
public function __to string () {return $ this-> nomAr;}
Comments
Post a Comment