add batch action
This commit is contained in:
parent
9316fbeb14
commit
ad833dd617
|
@ -85,12 +85,12 @@ class PostAdminController extends CrudController
|
|||
->setBatchAction('index', 'delete', 'Delete', function(EntityInterface $entity, EntityManager $manager) {
|
||||
$manager->delete($entity);
|
||||
})
|
||||
->setBatchAction('index', 'draft', 'Publier', function(EntityInterface $entity, EntityManager $manager) {
|
||||
$manager->update($entity->setStatus(Post::DRAFT));
|
||||
})
|
||||
->setBatchAction('index', 'publish', 'En brouillon', function(EntityInterface $entity, EntityManager $manager) {
|
||||
->setBatchAction('index', 'draft', 'Statut : publier', function(EntityInterface $entity, EntityManager $manager) {
|
||||
$manager->update($entity->setStatus(Post::PUBLISHED));
|
||||
})
|
||||
->setBatchAction('index', 'publish', 'Statut : brouillon', function(EntityInterface $entity, EntityManager $manager) {
|
||||
$manager->update($entity->setStatus(Post::DRAFT));
|
||||
})
|
||||
;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue