public function duplicateAction()
    {
        $id = $this->getRequest()->get($this->admin->getIdParameter());
        $object = $this->admin->getObject($id);
        $new = clone $object;

        $this->duplicateFiles($object, $new);

        $preResponse = $this->preDuplicate($new);
        if ($preResponse !== null) {
            return $preResponse;
        }

        return $this->createAction($new);
    }
public function duplicateAction()
    {
        $id = $this->getRequest()->get($this->admin->getIdParameter());
        $object = $this->admin->getObject($id);
        $new = clone $object;

        $this->duplicateFiles($object, $new);

        $preResponse = $this->preDuplicate($new);
        if ($preResponse !== null) {
            return $preResponse;
        }

        return $this->createAction($new);
    }
public function duplicateAction ( ) { $ id = $ this -> getRequest ( ) -> get ( $ this -> admin -> getIdParameter ( ) ) ; $ object = $ this -> admin -> getObject ( $ id ) ; $ new = clone $ object ; $ this -> duplicateFiles ( $ object , $ new ) ; $ preResponse = $ this -> preDuplicate ( $ new ) ; if ( $ preResponse !== null ) { return $ preResponse ; } return $ this -> createAction ( $ new ) ; }
Duplicate action.

@return response
Duplicate action .