How can I perform an inline editing inside a nested admin?
In your code you are using delete
which is not a valid option. Maybe you can try 'btn_delete' => false
Check the documentation for all the valid options here.
If this not working, maybe sonata_type_collection
is the solution to your problem. Ensure that you are using the by_reference
option the correct way depending on your relation.
Try this in the form mapper :
$formMapper ->add('title', 'sonata_type_model_list', array( 'class' => 'YourBundle:String', 'required' => false, 'delete' => false, 'btn_add' =>true, ), array( 'edit' => 'inline', 'inline' => 'table', )) ;
If the error persist try to get a look at the Doctrine2 documentation :Doctrine2 One to One association mapping and then generate your entities
You said that chrome console gives you error:
Call to a member function getName() on a non-object
So this error is not from javascript?
If error from PHP it means that when you try $object->getName() (it must by in OSC\UtilsBundle\Controller use Ctr+f "getName()" in file editor to find that line) $object is not an object, that can by because you maybe get obeject array, not single object. Try add var_dump($object);
and you see what is it.