protected function getDocumentFromID($request)
    {
        $doc = null;

        $id = Convert::raw2sql($request->param('ID'));
        if (strpos($id, 'version') === 0) {
            // Versioned document
            $id = $this->getDocumentIdFromSlug(str_replace('version', '', $id));
            $doc = DataObject::get_by_id('DMSDocument_versions', $id);
            $this->extend('updateVersionFromID', $doc, $request);
        } else {
            // Normal document
            $doc = DataObject::get_by_id('DMSDocument', $this->getDocumentIdFromSlug($id));
            $this->extend('updateDocumentFromID', $doc, $request);
        }

        return $doc;
    }
protected function getDocumentFromID($request)
    {
        $doc = null;

        $id = Convert::raw2sql($request->param('ID'));
        if (strpos($id, 'version') === 0) {
            // Versioned document
            $id = $this->getDocumentIdFromSlug(str_replace('version', '', $id));
            $doc = DataObject::get_by_id('DMSDocument_versions', $id);
            $this->extend('updateVersionFromID', $doc, $request);
        } else {
            // Normal document
            $doc = DataObject::get_by_id('DMSDocument', $this->getDocumentIdFromSlug($id));
            $this->extend('updateDocumentFromID', $doc, $request);
        }

        return $doc;
    }
protected function getDocumentFromID ( $ request ) { $ doc = null ; $ id = Convert :: raw2sql ( $ request -> param ( 'ID' ) ) ; if ( strpos ( $ id , 'version' ) === 0 ) { // Versioned document $ id = $ this -> getDocumentIdFromSlug ( str_replace ( 'version' , '' , $ id ) ) ; $ doc = DataObject :: get_by_id ( 'DMSDocument_versions' , $ id ) ; $ this -> extend ( 'updateVersionFromID' , $ doc , $ request ) ; } else { // Normal document $ doc = DataObject :: get_by_id ( 'DMSDocument' , $ this -> getDocumentIdFromSlug ( $ id ) ) ; $ this -> extend ( 'updateDocumentFromID' , $ doc , $ request ) ; } return $ doc ; }
Returns the document object from the request object's ID parameter.
Returns null, if no document found

@param  SS_HTTPRequest $request
@return DMSDocument|null
Returns the document object from the request object s ID parameter . Returns null if no document found