public function fEditingSubmit(Page &$page, Draft $draft){
        $page->setData($draft->getData());
        $this->em->remove($draft);
    }
public function fEditingSubmit(Page &$page, Draft $draft){
        $page->setData($draft->getData());
        $this->em->remove($draft);
    }
public function fEditingSubmit ( Page & $ page , Draft $ draft ) { $ page -> setData ( $ draft -> getData ( ) ) ; $ this -> em -> remove ( $ draft ) ; }
this function is called when the user click on 'publish'.
here you process the page with the draft. The page's data must be correctly set at the end of this function.
You must remove the draft here, if you can.
@param Page $page
@param Draft $draft
@internal param array $draftData
this function is called when the user click on publish . here you process the page with the draft . The page s data must be correctly set at the end of this function . You must remove the draft here if you can .