@@ 337-348 (lines=12) @@ | ||
334 | * |
|
335 | * @throws AccessDeniedException |
|
336 | */ |
|
337 | public function unPublishAction(Request $request, $id) |
|
338 | { |
|
339 | $this->init($request); |
|
340 | /* @var Node $node */ |
|
341 | $node = $this->em->getRepository('KunstmaanNodeBundle:Node')->find($id); |
|
342 | ||
343 | $nodeTranslation = $node->getNodeTranslation($this->locale, true); |
|
344 | $request = $this->get('request_stack')->getCurrentRequest(); |
|
345 | $this->nodePublisher->chooseHowToUnpublish($request, $nodeTranslation, $this->translator); |
|
346 | ||
347 | return $this->redirect($this->generateUrl('KunstmaanNodeBundle_nodes_edit', array('id' => $node->getId()))); |
|
348 | } |
|
349 | ||
350 | /** |
|
351 | * @Route( |
|
@@ 365-381 (lines=17) @@ | ||
362 | * |
|
363 | * @throws AccessDeniedException |
|
364 | */ |
|
365 | public function unSchedulePublishAction(Request $request, $id) |
|
366 | { |
|
367 | $this->init($request); |
|
368 | ||
369 | /* @var Node $node */ |
|
370 | $node = $this->em->getRepository('KunstmaanNodeBundle:Node')->find($id); |
|
371 | ||
372 | $nodeTranslation = $node->getNodeTranslation($this->locale, true); |
|
373 | $this->nodePublisher->unSchedulePublish($nodeTranslation); |
|
374 | ||
375 | $this->addFlash( |
|
376 | FlashTypes::SUCCESS, |
|
377 | $this->get('translator')->trans('kuma_node.admin.unschedule.flash.success') |
|
378 | ); |
|
379 | ||
380 | return $this->redirect($this->generateUrl('KunstmaanNodeBundle_nodes_edit', array('id' => $id))); |
|
381 | } |
|
382 | ||
383 | /** |
|
384 | * @Route( |
|
@@ 309-320 (lines=12) @@ | ||
306 | * |
|
307 | * @throws AccessDeniedException |
|
308 | */ |
|
309 | public function publishAction(Request $request, $id) |
|
310 | { |
|
311 | $this->init($request); |
|
312 | /* @var Node $node */ |
|
313 | $node = $this->em->getRepository('KunstmaanNodeBundle:Node')->find($id); |
|
314 | ||
315 | $nodeTranslation = $node->getNodeTranslation($this->locale, true); |
|
316 | $request = $this->get('request_stack')->getCurrentRequest(); |
|
317 | $this->nodePublisher->chooseHowToPublish($request, $nodeTranslation, $this->translator); |
|
318 | ||
319 | return $this->redirect($this->generateUrl('KunstmaanNodeBundle_nodes_edit', array('id' => $node->getId()))); |
|
320 | } |
|
321 | ||
322 | /** |
|
323 | * @Route( |