This is used to get a document based on document id.
-
KTAPI
$ktapi
-
int
$documentid
-
&$ktapi
This is the constructor for the KTAPI_Folder.
KTAPI_Document
KTAPI_Document
(
&$ktapi,
&$ktapi_folder,
&$document,
KTAPI $ktapi,
Document $document)
-
KTAPI
$ktapi
-
Document
$document
-
&$ktapi
-
&$ktapi_folder
-
&$document
This flags the document as 'archived'.
true
archive
(string $reason)
This changes the document type of the document.
true
change_document_type
( $documenttype, string $newname)
-
string
$newname
-
$documenttype
This changes the owner of the file.
true
change_owner
( $newusername, [ $reason = 'Changing of owner.'], string $ktapi_newuser)
-
string
$ktapi_newuser
-
$newusername
-
$reason
This checks a document into the repository
true
checkin
(string $filename, string $reason, string $tempfilename, [bool $major_update = false])
-
string
$filename
-
string
$reason
-
string
$tempfilename
-
bool
$major_update
This returns a URL to the file that can be downloaded.
true;
checkout
(string $reason)
This copies the document to another folder.
true
copy
(
&$ktapi_target_folder,
string $reason, [
string $newname =
null], [
string $newfilename =
null],
KTAPI_Folder $ktapi_target_folder)
-
KTAPI_Folder
$ktapi_target_folder
-
string
$reason
-
string
$newname
-
string
$newfilename
-
&$ktapi_target_folder
This deletes a document from the folder.
mixed
delete
(string $reason)
This deletes the workflow on the document.
true
delete_workflow
()
This does a download of a version of the document.
true
download
([string $version = null])
This expunges a document from the system.
mixed
expunge
()
This returns detailed information on the document.
array
get_detail
()
This returns all metadata for the document.
array
get_metadata
()
This returns the transaction history for the document.
array
get_transaction_history
()
This returns the version history on the document.
array
get_version_history
()
This returns the current workflow state
string
get_workflow_state
()
This returns a workflow transition
array
get_workflow_transitions
()
This moves the document to another folder.
true
move
(
&$ktapi_target_folder,
string $reason, [
string $newname =
null], [
string $newfilename =
null],
KTAPI_Folder $ktapi_target_folder)
-
KTAPI_Folder
$ktapi_target_folder
-
string
$reason
-
string
$newname
-
string
$newfilename
-
&$ktapi_target_folder
This performs a transition on the workflow
true
perform_workflow_transition
(string $transition, string $reason)
-
string
$transition
-
string
$reason
This changes the title of the document.
true
rename
(string $newname)
This changes the filename of the document.
true
renameFile
(string $newname)
This expunges a document from the system.
mixed
restore
()
This starts a workflow on a document.
true
start_workflow
(string $workflow)
This reverses the checkout process.
true
undo_checkout
(string $reason)
This updates the metadata on the file. This includes the 'title'.
mixed
update_metadata
(array $metadata)
-
array
$metadata: This is an array containing the metadata to be associated with the file.
Inherited Methods
Inherited From KTAPI_FolderItem
KTAPI_FolderItem::can_user_access_object_requiring_permission()