protected function createMagazineTemplate()
 {
     $fake = $this->getFaker();
     $MailTemplate = new MailMagazineTemplate();
     $MailTemplate->setSubject($fake->word)->setBody($fake->word);
     $MailTemplate->setDelFlg(Constant::DISABLED);
     $this->app['orm.em']->persist($MailTemplate);
     $this->app['orm.em']->flush();
     return $MailTemplate;
 }
 /**
  * 登録を行う
  * @param \Plugin\MailMagazine\Entity\MailMagazineTemplate $MailMagazineTemplate
  */
 public function create(\Plugin\MailMagazine\Entity\MailMagazineTemplate $MailMagazineTemplate)
 {
     $em = $this->getEntityManager();
     $em->getConnection()->beginTransaction();
     try {
         $MailMagazineTemplate->setDelFlg(Constant::DISABLED);
         $em->persist($MailMagazineTemplate);
         $em->flush();
         $em->getConnection()->commit();
     } catch (\Exception $e) {
         $em->getConnection()->rollback();
         throw $e;
         return false;
     }
     return true;
 }