Exemplo n.º 1
0
 /**
  * Load data fixtures with the passed EntityManager
  *
  * @param Doctrine\Common\Persistence\ObjectManager $manager
  */
 public function load(ObjectManager $manager)
 {
     $repository = $manager->getRepository('Gedmo\\Translatable\\Entity\\Translation');
     # Template Sidebar = block_footer
     $sidebar = new Sidebar\Template\Block();
     $sidebar->setTranslatableLocale('en');
     $sidebar->setActive(true);
     $sidebar->setSlug('footer-main-footer');
     $sidebar->setName('[Footer] Footer général');
     $sidebar->setTemplate('block_footer');
     $manager->persist($sidebar);
     # Template Block = title_desc_default_description
     $block = new TitleDesc();
     $block->setTranslatableLocale('en');
     $block->setActive(true);
     $block->setName('Espace fidélité');
     $block->setSlug('global-footer-loyalty-space');
     $block->setTitle('Espace fidélité');
     $block->setDescription('
     <a href="#_" class="notReady">
         <img src="http://www.seh-hotels.c2is.fr/images/common/pict/accent-card.png" width="126" alt="Carte accent">
         <div>
             <h3 class="title3">Loyalty space</h3>
             <span>The Accent card reward your loyalty in the 550 hotels of our 4 brands. <br>Discover also the Loyalty application.</span>
         </div>
     </a>
     ');
     $block->setTemplate('title_desc_h2');
     $repository->translate($block, 'title', 'fr', 'Espace fidélité');
     $repository->translate($block, 'description', 'fr', '
     <a href="#_" class="notReady">
         <img src="http://www.seh-hotels.c2is.fr/images/common/pict/accent-card.png" width="126" alt="Carte accent">
         <div>
             <h3 class="title3">Espace fidélité</h3>
             <span>La carte Accent récompense votre fidélité dans les 550 hôtels de nos 4 marques. <br>Découvrez également l’application Fidélité.</span>
         </div>
     </a>
     ');
     $manager->persist($block);
     $sidebarBlock = new SidebarBlock();
     $sidebarBlock->setBlock($block);
     $sidebarBlock->setSidebar($sidebar);
     $sidebarBlock->setPosition(1);
     $sidebarBlock->setTemplate('title_desc/title_desc_h2');
     $sidebar->addBlock($sidebarBlock);
     $block = new TitleDesc();
     $block->setTranslatableLocale('en');
     $block->setActive(true);
     $block->setName('Change or cancel a booking');
     $block->setSlug('global-footer-change-or-cancel-booking');
     $block->setTitle('Change or cancel a booking');
     $block->setDescription('
     <a href="#_" class="notReady">
         <h3 class="title3">Change or cancel a booking</h3>
         <span>Quam ob rem vita quidem talis fuitut nihil posset accedere, moriendi. </span>
     </a>
     ');
     $block->setTemplate('title_desc_h2');
     $repository->translate($block, 'title', 'fr', 'Modifier ou annuler une réservation');
     $repository->translate($block, 'description', 'fr', '
     <a href="#_" class="notReady">
         <h3 class="title3">Modifier ou annuler une réservation</h3>
         <span>Quam ob rem vita quidem talis fuitut nihil posset accedere, moriendi. </span>
     </a>
     ');
     $manager->persist($block);
     $sidebarBlock = new SidebarBlock();
     $sidebarBlock->setBlock($block);
     $sidebarBlock->setSidebar($sidebar);
     $sidebarBlock->setPosition(2);
     $sidebarBlock->setTemplate('title_desc/title_desc_h2');
     $sidebar->addBlock($sidebarBlock);
     $block = new TitleDescMedia();
     $block->setTranslatableLocale('en');
     $block->setActive(true);
     $block->setName('Form guide');
     $block->setSlug('global-footer-guide-form');
     $block->setTitle('Demande de guide');
     $block->setDescription('<p>Demandez notre guide grand public</p>');
     $block->setTemplate('title_desc_media_guideFooter');
     $repository->translate($block, 'title', 'fr', 'Demande de guide');
     $repository->translate($block, 'description', 'fr', '<p>Demandez notre guide grand public</p>');
     $manager->persist($block);
     $block = new TitleDesc();
     $block->setTranslatableLocale('en');
     $block->setActive(true);
     $block->setName('SEO footer');
     $block->setSlug('seo-footer');
     $block->setTitle('');
     $block->setDescription('<p>Baseline SEO Lorem ipsum dolor sit amet, consectetur adipisicing elit. Earum, asperiores, quia odio aliquam blanditiis nam quisquam obcaecati repellendus neque officia repellat laborum perferendis pariatur vero omnis assumenda maxime velit! Reiciendis, saepe repellendus similique consequuntur provident nostrum excepturi harum eius accusamus assumenda magnam minus non reprehenderit vitae earum iste eveniet officiis dolores placeat sapiente at adipisci aliquam iusto blanditiis dolor. Ratione, modi, corporis reprehenderit non provident nihil blanditiis. Alias, dolor, est, ipsa iusto reprehenderit natus eaque accusantium aut reiciendis atque quibusdam dignissimos quam odio libero tenetur ex architecto rerum veniam tempora officiis hic impedit neque vel consequuntur laboriosam enim eius vero.</p>');
     $block->setTemplate('title_desc_seoFooter');
     $repository->translate($block, 'description', 'fr', '<p>Baseline SEO Lorem ipsum dolor sit amet, consectetur adipisicing elit. Earum, asperiores, quia odio aliquam blanditiis nam quisquam obcaecati repellendus neque officia repellat laborum perferendis pariatur vero omnis assumenda maxime velit! Reiciendis, saepe repellendus similique consequuntur provident nostrum excepturi harum eius accusamus assumenda magnam minus non reprehenderit vitae earum iste eveniet officiis dolores placeat sapiente at adipisci aliquam iusto blanditiis dolor. Ratione, modi, corporis reprehenderit non provident nihil blanditiis. Alias, dolor, est, ipsa iusto reprehenderit natus eaque accusantium aut reiciendis atque quibusdam dignissimos quam odio libero tenetur ex architecto rerum veniam tempora officiis hic impedit neque vel consequuntur laboriosam enim eius vero.</p>');
     $manager->persist($block);
     $manager->flush();
 }
Exemplo n.º 2
0
    /**
     * Load data fixtures with the passed EntityManager
     *
     * @param ObjectManager $manager
     */
    public function load(ObjectManager $manager)
    {
        $repository = $manager->getRepository('Gedmo\\Translatable\\Entity\\Translation');
        $attribute = new Attribute();
        $attribute->setName('class')->setValue('accentCard')->setLabel('Carte Accent')->setType(Attribute::TYPE_BLOCK);
        $manager->persist($attribute);
        $attribute = new Attribute();
        $attribute->setName('class')->setValue('advantageAccount')->setLabel('Avantage Compte Client')->setType(Attribute::TYPE_BLOCK);
        $manager->persist($attribute);
        $attribute = new Attribute();
        $attribute->setName('class')->setValue('blocMainContent blocServiceCommercial')->setLabel('Service Commercial')->setType(Attribute::TYPE_BLOCK);
        $manager->persist($attribute);
        $attribute = new Attribute();
        $attribute->setName('class')->setValue('ourContactInfo')->setLabel('Contact Info')->setType(Attribute::TYPE_BLOCK);
        $manager->persist($attribute);
        $attribute = new Attribute();
        $attribute->setName('class')->setValue('blocMainContent blocContactForm')->setLabel('Bloc Formulaire Contact')->setType(Attribute::TYPE_BLOCK);
        $manager->persist($attribute);
        $attribute = new Attribute();
        $attribute->setName('class')->setValue('blocMainContent')->setLabel('Bloc Contenu Editorial')->setType(Attribute::TYPE_BLOCK);
        $manager->persist($attribute);
        $attribute = new Attribute();
        $attribute->setName('class')->setValue('reinsuranceCreditCards')->setLabel('Bloc moyens de paiement')->setType(Attribute::TYPE_BLOCK);
        $manager->persist($attribute);
        $attribute = new Attribute();
        $attribute->setName('class')->setValue('reinsuranceCreditCards')->setLabel('Réassurance - Moyens de paiement')->setType(Attribute::TYPE_BLOCK);
        $manager->persist($attribute);
        $attribute = new Attribute();
        $attribute->setName('class')->setValue('footerAdvantages clearer')->setLabel('Footer fidélité')->setType(Attribute::TYPE_SIDEBAR);
        $manager->persist($attribute);
        $attribute = new Attribute();
        $attribute->setName('class')->setValue('footerReinsurance clearer')->setLabel('Footer réassurance')->setType(Attribute::TYPE_SIDEBAR);
        $manager->persist($attribute);
        $attribute = new Attribute();
        $attribute->setName('class')->setValue('accentCard')->setLabel('Carte Accent')->setType(Attribute::TYPE_SIDEBAR);
        $manager->persist($attribute);
        # Template Sidebar = block_accent_footer
        $sidebar = new Sidebar\Template\Block();
        $sidebar->setTranslatableLocale('en');
        $sidebar->setActive(true);
        $sidebar->setSlug('booking-accent-footer');
        $sidebar->setName('[COULOIR] Footer accent');
        $sidebar->setTemplate('block_accent_footer');
        $manager->persist($sidebar);
        # Template Block = title_desc_h2
        $block = new TitleDesc();
        $block->setTranslatableLocale('en');
        $block->setActive(true);
        $block->setName('Faites le plein de cadeaux !');
        $block->setSlug('faites-le-plein-de-cadeaux');
        $block->setTitle('Présentation carte accent');
        $block->setDescription('<p>La carte Accent r&eacute;compense votre fid&eacute;lit&eacute; dans les 550 h&ocirc;tels de nos 4 marques.</p>
<p>D&eacute;couvrez &eacute;galement l&rsquo;application Fid&eacute;lit&eacute;.</p>');
        $block->setTemplate('title_desc_h2');
        $repository->translate($block, 'title', 'fr', 'Faites le plein de cadeaux !');
        $repository->translate($block, 'description', 'fr', '<p>La carte Accent r&eacute;compense votre fid&eacute;lit&eacute; dans les 550 h&ocirc;tels de nos 4 marques.</p>
<p>D&eacute;couvrez &eacute;galement l&rsquo;application Fid&eacute;lit&eacute;.</p>');
        $manager->persist($block);
        $sidebarBlock = new SidebarBlock();
        $sidebarBlock->setBlock($block);
        $sidebarBlock->setSidebar($sidebar);
        $sidebarBlock->setPosition(0);
        $sidebarBlock->setTemplate('title_desc/title_desc_h2');
        $sidebar->addBlock($sidebarBlock);
        # Template Block = title_desc_default_h3
        $block = new TitleDesc();
        $block->setTranslatableLocale('en');
        $block->setActive(true);
        $block->setName('Mes avantages fidélité');
        $block->setSlug('mes-avantages-fidelite');
        $block->setTitle('Avantages fidélité');
        $block->setDescription('<ul class="bulletList">
	<li>Vecellinum debeat amicitia patriam num.</li>
	<li>Vecellinum debeat amicitia patriam num.</li>
	<li>Vecellinum debeat amicitia patriam num.</li>
</ul>');
        $block->setTemplate('title_desc_defaultH3');
        $repository->translate($block, 'title', 'fr', 'Mes avantages fidélité');
        $repository->translate($block, 'description', 'fr', '<ul class="bulletList">
	<li>Vecellinum debeat amicitia patriam num.</li>
	<li>Vecellinum debeat amicitia patriam num.</li>
	<li>Vecellinum debeat amicitia patriam num.</li>
</ul>');
        $manager->persist($block);
        $sidebarBlock = new SidebarBlock();
        $sidebarBlock->setBlock($block);
        $sidebarBlock->setSidebar($sidebar);
        $sidebarBlock->setPosition(1);
        $sidebarBlock->setTemplate('title_desc/title_desc_defaultH3');
        $sidebar->addBlock($sidebarBlock);
        # Template Sidebar = block_loyalty_footer
        $sidebar = new Sidebar\Template\Block();
        $sidebar->setTranslatableLocale('en');
        $sidebar->setActive(true);
        $sidebar->setSlug('booking-loyalty-footer');
        $sidebar->setName('[COULOIR] Footer fidélité');
        $sidebar->setTemplate('block_loyaltyFooter');
        $manager->persist($sidebar);
        # Template Block = title_desc_account_advantage
        $block = new TitleDesc();
        $block->setTranslatableLocale('en');
        $block->setActive(true);
        $block->setName('Mes avantages avec mon compte client SEH');
        $block->setSlug('avantages-compte-client');
        $block->setTitle('Avantages compte client');
        $block->setDescription('<ul class="bulletList">
	<li>Vecellinum debeat amicitia patriam num.</li>
	<li>Vecellinum debeat amicitia patriam num.</li>
	<li>Vecellinum debeat amicitia patriam num.</li>
</ul>');
        $block->setTemplate('title_desc_accountAdvantage');
        $repository->translate($block, 'title', 'fr', 'Mes avantages avec mon compte client SEH');
        $repository->translate($block, 'description', 'fr', '<ul class="bulletList">
	<li>Vecellinum debeat amicitia patriam num.</li>
	<li>Vecellinum debeat amicitia patriam num.</li>
	<li>Vecellinum debeat amicitia patriam num.</li>
</ul>');
        $manager->persist($block);
        $sidebarBlock = new SidebarBlock();
        $sidebarBlock->setBlock($block);
        $sidebarBlock->setSidebar($sidebar);
        $sidebarBlock->setPosition(1);
        $sidebarBlock->setTemplate('title_desc/title_desc_accountAdvantage');
        $sidebar->addBlock($sidebarBlock);
        # Template Sidebar = block_footer
        $sidebar = new Sidebar\Template\Block();
        $sidebar->setTranslatableLocale('en');
        $sidebar->setActive(true);
        $sidebar->setSlug('booking-footer');
        $sidebar->setName('[COULOIR] Footer');
        $sidebar->setTemplate('block_footer');
        $manager->persist($sidebar);
        $sidebar2 = new Sidebar\Template\Block();
        $sidebar2->setTranslatableLocale('en');
        $sidebar2->setActive(true);
        $sidebar2->setSlug('hotel-sidebar');
        $sidebar2->setName('[Fiche] Sidebar');
        $sidebar2->setTemplate('block_sidebarFiche');
        $manager->persist($sidebar2);
        # Template Block = title_desc_media_reinsurance_seh
        $block = new TitleDescMedia();
        $block->setTranslatableLocale('en');
        $block->setActive(true);
        $block->setName('Pourquoi réserver sur');
        $block->setSlug('reinsurance-seh');
        $block->setTitle('Réassurance SEH');
        $block->setDescription('<ul class="bulletList">
    <li>Disponibilité des chambres en temps réel et offres de dernières minutes.</li>
    <li>Meilleur prix garanti.</li>
    <li>Toutes nos marques sont affichées.</li>
</ul>');
        $block->setTemplate('title_desc_media_reinsuranceSeh');
        $repository->translate($block, 'title', 'fr', 'Pourquoi réserver sur');
        $repository->translate($block, 'description', 'fr', '<ul class="bulletList">
    <li>Disponibilité des chambres en temps réel et offres de dernières minutes.</li>
    <li>Meilleur prix garanti.</li>
    <li>Toutes nos marques sont affichées.</li>
</ul>');
        $manager->persist($block);
        $sidebarBlock = new SidebarBlock();
        $sidebarBlock->setBlock($block);
        $sidebarBlock->setSidebar($sidebar);
        $sidebarBlock->setPosition(0);
        $sidebarBlock->setTemplate('title_desc_media/title_desc_media_reinsuranceSeh');
        $sidebar->addBlock($sidebarBlock);
        $sidebarBlock = new SidebarBlock();
        $sidebarBlock->setBlock($block);
        $sidebarBlock->setSidebar($sidebar2);
        $sidebarBlock->setPosition(0);
        $sidebarBlock->setTemplate('title_desc_media/title_desc_media_reinsuranceSeh');
        $sidebar2->addBlock($sidebarBlock);
        # Template Block = title_desc_media_reinsurance_thawte
        $block = new TitleDescMedia();
        $block->setTranslatableLocale('en');
        $block->setActive(true);
        $block->setName('Réservez en toute tranquilité');
        $block->setSlug('reinsurance-thawte');
        $block->setTitle('Réassurance Thawte');
        $block->setDescription('Réservez <br>en toute <br>tranquilité');
        $block->setTemplate('title_desc_media_reinsuranceThawte');
        $repository->translate($block, 'title', 'fr', 'Réservez en toute tranquilité');
        $repository->translate($block, 'description', 'fr', 'Réservez <br>en toute <br>tranquilité');
        $manager->persist($block);
        $sidebarBlock = new SidebarBlock();
        $sidebarBlock->setBlock($block);
        $sidebarBlock->setSidebar($sidebar2);
        $sidebarBlock->setPosition(2);
        $sidebarBlock->setTemplate('title_desc_media/title_desc_media_reinsuranceThawteHotel');
        $sidebar2->addBlock($sidebarBlock);
        $sidebarBlock = new SidebarBlock();
        $sidebarBlock->setBlock($block);
        $sidebarBlock->setSidebar($sidebar);
        $sidebarBlock->setPosition(1);
        $sidebarBlock->setTemplate('title_desc_media/title_desc_media_reinsuranceThawte');
        $sidebar->addBlock($sidebarBlock);
        $block = new TitleDescMedia();
        $block->setTranslatableLocale('en');
        $block->setActive(true);
        $block->setName('Les petits déjeuner');
        $block->setSlug('hotel-breakfast');
        $block->setTitle('Les petits déjeuner');
        $block->setDescription('<p>Chez P’tit Dej-HOTEL vitaminez votre journée avec un savoureux petit déjeuner à <strong>volonté et à tout p’tit prix !</strong></p>');
        $block->setTemplate('title_desc_media_breakfasts');
        $repository->translate($block, 'title', 'fr', 'Les petits déjeuner');
        $repository->translate($block, 'description', 'fr', '<p>Chez P’tit Dej-HOTEL vitaminez votre journée avec un savoureux petit déjeuner à <strong>volonté et à tout p’tit prix !</strong></p>');
        $manager->persist($block);
        # Template Block = title_desc_widget
        $widget = new TitleDesc();
        $widget->setName('booking_payment');
        $widget->setTitle('[COULOIR] Moyen de paiement');
        $widget->setActive(true);
        $widget->setSlug('payment-method');
        $widget->setTemplate('title_desc_widget');
        $widget->setAction('widget_booking_payment');
        $manager->persist($widget);
        $sidebarBlock = new SidebarBlock();
        $sidebarBlock->setBlock($widget);
        $sidebarBlock->setSidebar($sidebar);
        $sidebarBlock->setPosition(2);
        $sidebarBlock->setTemplate('title_desc/title_desc_widget');
        $sidebar->addBlock($sidebarBlock);
        # Template Page = title_desc_cgv
        $page = new Page\Template\TitleDesc();
        $page->setActive(true);
        $page->setTranslatableLocale('en');
        $page->setName('Condition générales de vente');
        $page->setSlug('condition-generales-de-vente');
        $page->setTitle('Condition générales de vente');
        $page->setDescription('CGV CGV CGV');
        $repository->translate($page, 'title', 'fr', 'Condition générales de vente');
        $repository->translate($page, 'description', 'fr', 'CGV CGV CGV');
        $page->setTemplate('title_desc_cgv');
        $manager->persist($page);
        # Template Widget = title_desc_widget
        $widget = new TitleDesc();
        $widget->setName('viewed_hotel');
        $widget->setTitle('[Fiche] Hôtels consultés');
        $widget->setActive(true);
        $widget->setSlug('viewed_hotel');
        $widget->setTemplate('title_desc_widget');
        $widget->setAction('widget_viewed_hotel');
        $manager->persist($widget);
        $manager->flush();
        $translationRepository = $manager->getRepository('Gedmo\\Translatable\\Entity\\Translation');
        $blockRepository = $manager->getRepository('Bigfoot\\Bundle\\ContentBundle\\Entity\\Block\\Template\\TitleDesc');
        $block = $blockRepository->findOneBySlug('faites-le-plein-de-cadeaux');
        $block->setDescription('<p>La carte Accent récompense votre fidélité <img src="/images/common/pict/accent-card.png" alt="accent"> dans les 550 hôtels de nos 4 marques.</p><p>Découvrez également l’application Fidélité.</p>');
        $translationRepository->translate($block, 'description', 'fr', '<p>La carte Accent récompense votre fidélité <img src="/images/common/pict/accent-card.png" alt="accent"> dans les 550 hôtels de nos 4 marques.</p><p>Découvrez également l’application Fidélité.</p>');
        $manager->persist($block);
        # Template Block = title_desc_home_accent
        $block = new TitleDesc();
        $block->setTranslatableLocale('en');
        $block->setActive(true);
        $block->setName('La carte accent');
        $block->setSlug('home-accent-content');
        $block->setTitle('[HOME] Carte Accent');
        $block->setDescription('<h3 class="title3">Faites le plein de cadeaux !</h3><p>La carte Accent récompense votre fidélité <img src="/images/common/pict/accent-card.png" alt="accent"> dans les 550 hôtels de nos 4 marques.</p><p>Découvrez également l’application Fidélité.</p>');
        $block->setTemplate('title_desc_homeAccent');
        $translationRepository->translate($block, 'title', 'fr', 'La carte accent');
        $translationRepository->translate($block, 'description', 'fr', '<h3 class="title3">Faites le plein de cadeaux !</h3><p>La carte Accent récompense votre fidélité <img src="/images/common/pict/accent-card.png" alt="accent"> dans les 550 hôtels de nos 4 marques.</p><p>Découvrez également l’application Fidélité.</p>');
        $manager->persist($block);
        $manager->flush();
    }