public function copyAction($sourceId, $targetId, $lang)
    {
        $em = $this->getDoctrine()->getManager();
        $source = $this->getPage($sourceId);
        $target = $this->getPage($targetId);
        $newPage = clone($source);
        $newPage->setParent($target);
        // Children page
        if ($target->getLang())
        {
            $newPage->setLang($target->getLang());
        }
        else
        {
            $newPage->setLang($lang);
            $newPage->setPosition($em->getRepository('FulgurioLightCMSBundle:Page')->getNextPosition($target));
        }
        $newPage->setStatus('draft');
        $newPage->setSourceId($sourceId);
        $models = $this->container->getParameter('fulgurio_light_cms.models');
        return $this->createPage($newPage, array('pageMetas' => $this->getPageMetas($sourceId), 'parent' => $target, 'sourceId' => $sourceId), $models);
    }
public function copyAction($sourceId, $targetId, $lang)
    {
        $em = $this->getDoctrine()->getManager();
        $source = $this->getPage($sourceId);
        $target = $this->getPage($targetId);
        $newPage = clone($source);
        $newPage->setParent($target);
        // Children page
        if ($target->getLang())
        {
            $newPage->setLang($target->getLang());
        }
        else
        {
            $newPage->setLang($lang);
            $newPage->setPosition($em->getRepository('FulgurioLightCMSBundle:Page')->getNextPosition($target));
        }
        $newPage->setStatus('draft');
        $newPage->setSourceId($sourceId);
        $models = $this->container->getParameter('fulgurio_light_cms.models');
        return $this->createPage($newPage, array('pageMetas' => $this->getPageMetas($sourceId), 'parent' => $target, 'sourceId' => $sourceId), $models);
    }
public function copyAction ( $ sourceId , $ targetId , $ lang ) { $ em = $ this -> getDoctrine ( ) -> getManager ( ) ; $ source = $ this -> getPage ( $ sourceId ) ; $ target = $ this -> getPage ( $ targetId ) ; $ newPage = clone ( $ source ) ; $ newPage -> setParent ( $ target ) ; // Children page if ( $ target -> getLang ( ) ) { $ newPage -> setLang ( $ target -> getLang ( ) ) ; } else { $ newPage -> setLang ( $ lang ) ; $ newPage -> setPosition ( $ em -> getRepository ( 'FulgurioLightCMSBundle:Page' ) -> getNextPosition ( $ target ) ) ; } $ newPage -> setStatus ( 'draft' ) ; $ newPage -> setSourceId ( $ sourceId ) ; $ models = $ this -> container -> getParameter ( 'fulgurio_light_cms.models' ) ; return $ this -> createPage ( $ newPage , array ( 'pageMetas' => $ this -> getPageMetas ( $ sourceId ) , 'parent' => $ target , 'sourceId' => $ sourceId ) , $ models ) ; }
Page copy, use for multilang site

@param number $sourceId
@param number $targetId
@param string $lang
@return \Symfony\Component\HttpFoundation\Response>
Page copy use for multilang site