Beispiel #1
0
 public function executeBatchPublish(sfWebRequest $request, $set = true)
 {
     $ids = $request->getParameter('ids');
     $c = new Criteria();
     $q = PagePeer::retrieveByPKs($ids);
     foreach ($q as $page) {
         $page->setIsPublished($set);
         $page->save();
     }
     $this->getUser()->setFlash('notice', 'The selected pages have been ' . ($set ? 'published' : 'drafted') . ' successfully.');
     $this->redirect('page');
 }