Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public function getBatchActions()
- {
- $groups = $this->getModelManager()->createQuery('Acme\DemoBundle\Entity\Group', 'g')->execute();
- $groupsArray = array();
- foreach ($groups as $group)
- {
- $groupsArray[$group->getId()] = $group->getTitle();
- }
- $actions = parent::getBatchActions();
- $actions['addToGroup'] = array(
- 'label' => $this->trans('action_add_to_group', array(), 'SonataAdminBundle'),
- 'ask_confirmation' => true,
- 'secondary' => $groupsArray,
- );
- return $actions;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement