private function discardPageRedirections(PageInterface $page)
    {
        if ($page->isEnabled()) {
            /** @var \Ekyna\Bundle\CmsBundle\Model\PageTranslationInterface $translation */
            foreach ($page->getTranslations() as $locale => $translation) {
                // TODO use url generator or i18n routing prefix strategy
                $localePrefix = $locale != 'fr' ? '/' . $locale : '';
                $event = new DiscardRedirectionEvent($localePrefix . $translation->getPath());
                $this->dispatcher->dispatch(RedirectionEvents::DISCARD, $event);
            }
        }
    }
private function discardPageRedirections(PageInterface $page)
    {
        if ($page->isEnabled()) {
            /** @var \Ekyna\Bundle\CmsBundle\Model\PageTranslationInterface $translation */
            foreach ($page->getTranslations() as $locale => $translation) {
                // TODO use url generator or i18n routing prefix strategy
                $localePrefix = $locale != 'fr' ? '/' . $locale : '';
                $event = new DiscardRedirectionEvent($localePrefix . $translation->getPath());
                $this->dispatcher->dispatch(RedirectionEvents::DISCARD, $event);
            }
        }
    }
private function discardPageRedirections ( PageInterface $ page ) { if ( $ page -> isEnabled ( ) ) { /** @var \Ekyna\Bundle\CmsBundle\Model\PageTranslationInterface $translation */ foreach ( $ page -> getTranslations ( ) as $ locale => $ translation ) { // TODO use url generator or i18n routing prefix strategy $ localePrefix = $ locale != 'fr' ? '/' . $ locale : '' ; $ event = new DiscardRedirectionEvent ( $ localePrefix . $ translation -> getPath ( ) ) ; $ this -> dispatcher -> dispatch ( RedirectionEvents :: DISCARD , $ event ) ; } } }
Discards redirections for the page.

@param PageInterface $page
Discards redirections for the page .