0

I follow the guide to create:
1. a action of sonata admin http://sonata-project.org/bundles/admin/master/doc/cookbook/recipe_custom_action.html
2. a batch ax http://sonata-project.org/bundles/admin/master/doc/reference/batch_actions.html

In my action I want to change 1 field of the entity from true to false or via versa. For examble : the field enable. How can I update change to the database

user1000652
  • 33
  • 2
  • 12

1 Answers1

0

I solve the a single action

However, with batch action when I load data from database with the code

$target = $modelManager->find($this->admin->getClass(), $request->get('idx'));

Sonata raise a notice "ModelManager ->find ('C4C\PlatformBundle\Entity\Member', array('1', '2', '3')) ". The reason is that Model Manage can not find an objec by an array.

How can I get all the objects from database based on an array

user1000652
  • 33
  • 2
  • 12