PHP 클래스 Document, glpi

상속: extends CommonDBTM
파일 보기 프로젝트 열기: glpi-project/glpi 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$dohistory From CommonDBTM
$rightname
$tag_prefix

보호된 프로퍼티들

프로퍼티 타입 설명
$forward_entity_to
$usenotepad

공개 메소드들

메소드 설명
canApplyOn ( $item ) : true Check if given object can have Document
canCreate ( )
canCreateItem ( )
canViewFile ( $options ) : boolean Check is the curent user is allowed to see the file
cleanDBonPurge ( )
defineTabs ( $options = [] )
dropdown ( $options = [] ) : nothing Make a select box for link document
getDownloadLink ( $params = '', $len = 20 ) Get download link for a document
getFromDBbyContent ( $entity, $path ) : boolean find a document with a file attached
getImageTag ( $string ) : string
getItemtypesThatCanHave ( ) : array Get all the types that can have a document
getMassiveActionsForItemtype ( array &$actions, $itemtype, $is_deleted, CommonDBTM $checkitem = NULL )
getMaxUploadSize ( ) Get max upload size from php config
getMenuShorcut ( )
getSearchOptions ( )
getSearchOptionsToAdd ( )
getSpecificMassiveActions ( $checkitem = NULL )
getTypeName ( $nb )
getUploadFileValidLocationName ( $dir, $sha1sum ) : nothing Find a valid path for the new file
isValidDoc ( $filename ) Is this file a valid file ? check based on file extension
moveDocument ( array &$input, $filename ) : boolean Move a document (files in GLPI_DOC_DIR."/_tmp" dir)
moveUploadedDocument ( array &$input, $filename ) : boolean Move an uploadd document (files in GLPI_DOC_DIR."/_uploads" dir)
post_addItem ( )
prepareInputForAdd ( $input )
prepareInputForUpdate ( $input )
renameForce ( $srce, $dest ) : boolean Move a file to a new location Work even if dest file already exists
send ( ) Send a document to navigator
showForm ( $ID, $options = [] ) : Nothing Print the document form
showUploadedFilesDropdown ( $myname ) Show dropdown of uploaded files
uploadDocument ( array &$input, $FILEDESC ) : true Upload a new file

메소드 상세

canApplyOn() 정적인 공개 메소드

Check if given object can have Document
static public canApplyOn ( $item ) : true
$item an object or a string
리턴 true if $object is an object that can have InfoCom

canCreate() 정적인 공개 메소드

static public canCreate ( )

canCreateItem() 공개 메소드

public canCreateItem ( )

canViewFile() 공개 메소드

Check is the curent user is allowed to see the file
public canViewFile ( $options ) : boolean
$options array of options (only 'tickets_id' used)
리턴 boolean

cleanDBonPurge() 공개 메소드

public cleanDBonPurge ( )

defineTabs() 공개 메소드

public defineTabs ( $options = [] )

dropdown() 정적인 공개 메소드

Parameters which could be used in options array : - name : string / name of the select (default is documents_id) - entity : integer or array / restrict to a defined entity or array of entities (default -1 : no restriction) - used : array / Already used items ID: not to display in dropdown (default empty)
static public dropdown ( $options = [] ) : nothing
$options array of possible options
리턴 nothing (print out an HTML select box)

getFromDBbyContent() 공개 메소드

find a document with a file attached
public getFromDBbyContent ( $entity, $path ) : boolean
$entity of the document
$path of the searched file
리턴 boolean

getImageTag() 정적인 공개 메소드

static public getImageTag ( $string ) : string
$string
리턴 string

getItemtypesThatCanHave() 정적인 공개 메소드

Get all the types that can have a document
static public getItemtypesThatCanHave ( ) : array
리턴 array of the itemtypes

getMassiveActionsForItemtype() 정적인 공개 메소드

또한 보기: CommonDBTM::getMassiveActionsForItemtype()
static public getMassiveActionsForItemtype ( array &$actions, $itemtype, $is_deleted, CommonDBTM $checkitem = NULL )
$actions array
$checkitem CommonDBTM

getMaxUploadSize() 정적인 공개 메소드

Get max upload size from php config
static public getMaxUploadSize ( )

getMenuShorcut() 정적인 공개 메소드

또한 보기: CommonGLPI::getMenuShorcut()
static public getMenuShorcut ( )

getSearchOptions() 공개 메소드

public getSearchOptions ( )

getSearchOptionsToAdd() 정적인 공개 메소드

static public getSearchOptionsToAdd ( )

getSpecificMassiveActions() 공개 메소드

또한 보기: CommonDBTM::getSpecificMassiveActions()
public getSpecificMassiveActions ( $checkitem = NULL )

getTypeName() 정적인 공개 메소드

static public getTypeName ( $nb )

getUploadFileValidLocationName() 정적인 공개 메소드

Find a valid path for the new file
static public getUploadFileValidLocationName ( $dir, $sha1sum ) : nothing
$dir dir to search a free path for the file
$sha1sum SHA1 of the file
리턴 nothing

isValidDoc() 정적인 공개 메소드

Is this file a valid file ? check based on file extension
static public isValidDoc ( $filename )
$filename filename to clean

moveDocument() 정적인 공개 메소드

Move a document (files in GLPI_DOC_DIR."/_tmp" dir)
static public moveDocument ( array &$input, $filename ) : boolean
$input array array of datas used in adding process (need current_filepath)
$filename filename to move
리턴 boolean for success / $input array is updated

moveUploadedDocument() 정적인 공개 메소드

Move an uploadd document (files in GLPI_DOC_DIR."/_uploads" dir)
static public moveUploadedDocument ( array &$input, $filename ) : boolean
$input array array of datas used in adding process (need current_filepath)
$filename filename to move
리턴 boolean for success / $input array is updated

post_addItem() 공개 메소드

public post_addItem ( )

prepareInputForAdd() 공개 메소드

또한 보기: CommonDBTM::prepareInputForAdd()
public prepareInputForAdd ( $input )

prepareInputForUpdate() 공개 메소드

또한 보기: CommonDBTM::prepareInputForUpdate()
public prepareInputForUpdate ( $input )

renameForce() 정적인 공개 메소드

Move a file to a new location Work even if dest file already exists
static public renameForce ( $srce, $dest ) : boolean
$srce source file path
$dest destination file path
리턴 boolean : success

send() 공개 메소드

Send a document to navigator
public send ( )

showForm() 공개 메소드

Print the document form
public showForm ( $ID, $options = [] ) : Nothing
$ID integer ID of the item
$options array - target filename : where to go when done. - withtemplate boolean : template or basic item
리턴 Nothing (display)

showUploadedFilesDropdown() 정적인 공개 메소드

Show dropdown of uploaded files
static public showUploadedFilesDropdown ( $myname )
$myname dropdown name

uploadDocument() 정적인 공개 메소드

Upload a new file
static public uploadDocument ( array &$input, $FILEDESC ) : true
$input array
$FILEDESC FILE descriptor
리턴 true on success

프로퍼티 상세

$dohistory 공개적으로 프로퍼티

From CommonDBTM
public $dohistory

$forward_entity_to 보호되어 있는 정적으로 프로퍼티

protected static $forward_entity_to

$rightname 정적으로 공개적으로 프로퍼티

static public $rightname

$tag_prefix 정적으로 공개적으로 프로퍼티

static public $tag_prefix

$usenotepad 보호되어 있는 프로퍼티

protected $usenotepad