Example #1
0
 protected function insertTheme()
 {
     $em = $this->getContainer()->get('doctrine')->getManager();
     $theme = new Theme();
     $theme->setTitle('Ojs');
     $em->persist($theme);
     $em->flush();
 }
Example #2
0
 /**
  * Displays a form to create a new Theme entity.
  *
  */
 public function newAction()
 {
     $journal = $this->get('ojs.journal_service')->getSelectedJournal();
     if (!$this->isGranted('CREATE', $journal, 'theme')) {
         throw new AccessDeniedException("You are not authorized for view this page");
     }
     $entity = new Theme();
     $entity->setOwner($journal);
     $form = $this->createCreateForm($entity);
     return $this->render('OjsJournalBundle:Theme:new.html.twig', array('entity' => $entity, 'form' => $form->createView()));
 }