Property | Type | Description | |
---|---|---|---|
$dohistory | From CommonDBTM | ||
$rightname |
Property | Type | Description | |
---|---|---|---|
$entities | |||
$groups | |||
$profiles | |||
$users | For visibility checks |
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 " | |
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 |
static public addVisibilityJoins ( $forceall = false ) : string | ||
$forceall | force all joins (false by default) | |
return | string | joins to add |
static public addVisibilityRestrict ( ) : string | ||
return | string | restrict to add |
static public displayTabContentForItem ( CommonGLPI $item, $tabnum = 1, $withtemplate ) | ||
$item | CommonGLPI |
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 |
static public getSearchURL ( $full = true ) | ||
$full | path or relative one (true by default) |
public getTabNameForItem ( CommonGLPI $item, $withtemplate ) | ||
$item | CommonGLPI |
public haveVisibilityAccess ( ) : boolean | ||
return | boolean |
public isPubliclyVisible ( ) : boolean | ||
return | boolean |
public post_getEmpty ( ) : nothing | ||
return | nothing |
public searchForm ( $options ) : nothing | ||
$options | $_GET | |
return | nothing | (display the form) |
public showBrowseForm ( $options ) : nothing | ||
$options | $_GET | |
return | nothing | (display the form) |
public showForm ( $ID, $options = [] ) : nothing | ||
$ID | ||
$options | array - target for the Form | |
return | nothing | (display the form) |
public showFull ( $options = [] ) : nothing | ||
$options | array of options | |
return | nothing | (display item : question and answer) |
static public showList ( $options, $type = 'search' ) | ||
$options | $_GET | |
$type | string search type : browse / search (default search) |
public showManageForm ( $options ) : nothing | ||
$options | $_GET | |
return | nothing | (display the form) |
static public showRecentPopular ( $type ) : nothing | ||
$type | type : recent / popular / not published | |
return | nothing | (display table) |
public updateCounter ( ) |