PHP Class KnowbaseItem, glpi

Inheritance: extends CommonDBTM
Afficher le fichier Open project: glpi-project/glpi Class Usage Examples

Méthodes publiques

Свойство Type Description
$dohistory From CommonDBTM
$rightname

Protected Properties

Свойство Type Description
$entities
$groups
$profiles
$users For visibility checks

Méthodes publiques

Méthode 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 méthode

Add kb item to the public FAQ
public addToFaq ( ) : nothing
Résultat nothing

addVisibilityJoins() static public méthode

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

addVisibilityRestrict() static public méthode

Return visibility SQL restriction to add
static public addVisibilityRestrict ( ) : string
Résultat string restrict to add

canCreate() static public méthode

static public canCreate ( )

canUpdate() static public méthode

static public canUpdate ( )

canUpdateItem() public méthode

public canUpdateItem ( )

canView() static public méthode

static public canView ( )

canViewItem() public méthode

public canViewItem ( )

cleanDBonPurge() public méthode

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

countVisibilities() public méthode

public countVisibilities ( )

defineTabs() public méthode

public defineTabs ( $options = [] )

displayTabContentForItem() static public méthode

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

getAnswer() public méthode

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

getListRequest() static public méthode

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)
Résultat String : SQL request

getMenuName() static public méthode

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

getMenuShorcut() static public méthode

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

getRights() public méthode

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

getSearchOptions() public méthode

public getSearchOptions ( )

getSearchURL() static public méthode

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

getTabNameForItem() public méthode

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

getTypeName() static public méthode

static public getTypeName ( $nb )

haveVisibilityAccess() public méthode

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

isPubliclyVisible() public méthode

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

post_addItem() public méthode

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

post_getEmpty() public méthode

Actions done at the end of the getEmpty function
public post_getEmpty ( ) : nothing
Résultat nothing

post_getFromDB() public méthode

public post_getFromDB ( )

prepareInputForAdd() public méthode

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

prepareInputForUpdate() public méthode

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

searchForm() public méthode

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

showBrowseForm() public méthode

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

showForm() public méthode

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

showFull() public méthode

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

showList() static public méthode

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

showManageForm() public méthode

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

showRecentPopular() static public méthode

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

showVisibility() public méthode

Show visibility config for a knowbaseitem
public showVisibility ( )

updateCounter() public méthode

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