PHP Class KnowbaseItem, glpi

Inheritance: extends CommonDBTM
显示文件 Open project: glpi-project/glpi Class Usage Examples

Public Properties

Property Type Description
$dohistory From CommonDBTM
$rightname

Protected Properties

Property Type Description
$entities
$groups
$profiles
$users For visibility checks

Public Methods

Method Description
addToFaq ( ) : nothing Add kb item to the public FAQ
addVisibilityJoins ( $forceall = false ) : string Return visibility joins to add to SQL
addVisibilityRestrict ( ) : string Return visibility SQL restriction to add
canCreate ( )
canUpdate ( )
canUpdateItem ( )
canView ( )
canViewItem ( )
cleanDBonPurge ( )
countVisibilities ( )
defineTabs ( $options = [] )
displayTabContentForItem ( CommonGLPI $item, $tabnum = 1, $withtemplate )
getAnswer ( ) : string Get KB answer, with id on titles to set anchors
getListRequest ( array $params, $type = 'search' ) : String Build request for showList
getMenuName ( )
getMenuShorcut ( )
getRights ( $interface = 'central' )
getSearchOptions ( )
getSearchURL ( $full = true ) Get the search page URL for the current classe
getTabNameForItem ( CommonGLPI $item, $withtemplate )
getTypeName ( $nb )
haveVisibilityAccess ( ) : boolean Is the login user have access to KnowbaseItem based on visibility configuration
isPubliclyVisible ( ) : boolean Check is this item if visible to everybody (anonymous users)
post_addItem ( )
post_getEmpty ( ) : nothing Actions done at the end of the getEmpty function
post_getFromDB ( )
prepareInputForAdd ( $input )
prepareInputForUpdate ( $input )
searchForm ( $options ) : nothing Print out an HTML form for Search knowbase item
showBrowseForm ( $options ) : nothing Print out an HTML "
" for Search knowbase item
showForm ( $ID, $options = [] ) : nothing Print out an HTML "" for knowbase item
showFull ( $options = [] ) : nothing Print out (html) show item : question and answer
showList ( $options, $type = 'search' ) Print out list kb item
showManageForm ( $options ) : nothing Print out an HTML form for Search knowbase item
showRecentPopular ( $type ) : nothing Print out list recent or popular kb/faq
showVisibility ( ) Show visibility config for a knowbaseitem
updateCounter ( ) Increase the view counter of the current knowbaseitem

Method Details

addToFaq() public method

Add kb item to the public FAQ
public addToFaq ( ) : nothing
return nothing

addVisibilityJoins() static public method

Return visibility joins to add to SQL
static public addVisibilityJoins ( $forceall = false ) : string
$forceall force all joins (false by default)
return string joins to add

addVisibilityRestrict() static public method

Return visibility SQL restriction to add
static public addVisibilityRestrict ( ) : string
return string restrict to add

canCreate() static public method

static public canCreate ( )

canUpdate() static public method

static public canUpdate ( )

canUpdateItem() public method

public canUpdateItem ( )

canView() static public method

static public canView ( )

canViewItem() public method

public canViewItem ( )

cleanDBonPurge() public method

See also: CommonDBTM::cleanDBonPurge()
public cleanDBonPurge ( )

countVisibilities() public method

public countVisibilities ( )

defineTabs() public method

public defineTabs ( $options = [] )

displayTabContentForItem() static public method

static public displayTabContentForItem ( CommonGLPI $item, $tabnum = 1, $withtemplate )
$item CommonGLPI

getAnswer() public method

Get KB answer, with id on titles to set anchors
public getAnswer ( ) : string
return string

getListRequest() static public method

Build request for showList
static public getListRequest ( array $params, $type = 'search' ) : String
$params array array (contains, knowbaseitemcategories_id, faq)
$type string search type : browse / search (default search)
return String : SQL request

getMenuName() static public method

See also: CommonGLPI::getMenuName()
static public getMenuName ( )

getMenuShorcut() static public method

See also: CommonGLPI::getMenuShorcut()
static public getMenuShorcut ( )

getRights() public method

See also: commonDBTM::getRights()
public getRights ( $interface = 'central' )

getSearchOptions() public method

public getSearchOptions ( )

getSearchURL() static public method

Get the search page URL for the current classe
static public getSearchURL ( $full = true )
$full path or relative one (true by default)

getTabNameForItem() public method

public getTabNameForItem ( CommonGLPI $item, $withtemplate )
$item CommonGLPI

getTypeName() static public method

static public getTypeName ( $nb )

haveVisibilityAccess() public method

Is the login user have access to KnowbaseItem based on visibility configuration
public haveVisibilityAccess ( ) : boolean
return boolean

isPubliclyVisible() public method

Check is this item if visible to everybody (anonymous users)
public isPubliclyVisible ( ) : boolean
return boolean

post_addItem() public method

See also: CommonDBTM::post_addItem()
public post_addItem ( )

post_getEmpty() public method

Actions done at the end of the getEmpty function
public post_getEmpty ( ) : nothing
return nothing

post_getFromDB() public method

public post_getFromDB ( )

prepareInputForAdd() public method

See also: CommonDBTM::prepareInputForAdd()
public prepareInputForAdd ( $input )

prepareInputForUpdate() public method

See also: CommonDBTM::prepareInputForUpdate()
public prepareInputForUpdate ( $input )

searchForm() public method

Print out an HTML form for Search knowbase item
public searchForm ( $options ) : nothing
$options $_GET
return nothing (display the form)

showBrowseForm() public method

Print out an HTML "" for Search knowbase item
public showBrowseForm ( $options ) : nothing
$options $_GET
return nothing (display the form)

showForm() public method

Print out an HTML "" for knowbase item
public showForm ( $ID, $options = [] ) : nothing
$ID
$options array - target for the Form
return nothing (display the form)

showFull() public method

Print out (html) show item : question and answer
public showFull ( $options = [] ) : nothing
$options array of options
return nothing (display item : question and answer)

showList() static public method

Print out list kb item
static public showList ( $options, $type = 'search' )
$options $_GET
$type string search type : browse / search (default search)

showManageForm() public method

Print out an HTML form for Search knowbase item
public showManageForm ( $options ) : nothing
$options $_GET
return nothing (display the form)

showRecentPopular() static public method

Print out list recent or popular kb/faq
static public showRecentPopular ( $type ) : nothing
$type type : recent / popular / not published
return nothing (display table)

showVisibility() public method

Show visibility config for a knowbaseitem
public showVisibility ( )

updateCounter() public method

Increase the view counter of the current knowbaseitem
public updateCounter ( )

Property Details

$dohistory public_oe property

From CommonDBTM
public $dohistory

$entities protected_oe property

protected $entities

$groups protected_oe property

protected $groups

$profiles protected_oe property

protected $profiles

$rightname static_oe public_oe property

static public $rightname

$users protected_oe property

For visibility checks
protected $users