PHP Class KnowbaseItemTranslation, glpi

Inheritance: extends CommonDBChild
Datei anzeigen Open project: glpi-project/glpi Class Usage Examples

Public Properties

Property Type Description
$dohistory
$items_id
$itemtype
$rightname

Public Methods

Method Description
canBeTranslated ( CommonGLPI $item ) : true Check if an item can be translated It be translated if translation if globally on and item is an instance of CommonDropdown or CommonTreeDropdown and if translation is enabled for this class
displayTabContentForItem ( CommonGLPI $item, $tabnum = 1, $withtemplate )
getAlreadyTranslatedForItem ( $item ) : array Get already translated languages for item
getForbiddenStandardMassiveAction ( )
getNumberOfTranslationsForItem ( $item ) : the Return the number of translations for an item
getTabNameForItem ( CommonGLPI $item, $withtemplate )
getTranslatedValue ( KnowbaseItem $item, $field = "name" ) : the Get a translation for a value
getTypeName ( $nb )
isKbTranslationActive ( ) : true Is kb item translation functionnality active
showForm ( $ID, $options = [] ) Display translation form
showTranslations ( KnowbaseItem $item ) : true; Display all translated field for an KnowbaseItem

Method Details

canBeTranslated() static public method

Check if an item can be translated It be translated if translation if globally on and item is an instance of CommonDropdown or CommonTreeDropdown and if translation is enabled for this class
static public canBeTranslated ( CommonGLPI $item ) : true
$item CommonGLPI
return true if item can be translated, false otherwise

displayTabContentForItem() static public method

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

getAlreadyTranslatedForItem() static public method

Get already translated languages for item
static public getAlreadyTranslatedForItem ( $item ) : array
return array of already translated languages

getForbiddenStandardMassiveAction() public method

getNumberOfTranslationsForItem() static public method

Return the number of translations for an item
static public getNumberOfTranslationsForItem ( $item ) : the
return the number of translations for this item

getTabNameForItem() public method

See also: CommonGLPI::getTabNameForItem()
public getTabNameForItem ( CommonGLPI $item, $withtemplate )
$item CommonGLPI

getTranslatedValue() static public method

Get a translation for a value
static public getTranslatedValue ( KnowbaseItem $item, $field = "name" ) : the
$item KnowbaseItem item to translate
$field field to return (default 'name')
return the field translated if a translation is available, or the original field if not

getTypeName() static public method

static public getTypeName ( $nb )

isKbTranslationActive() static public method

Is kb item translation functionnality active
static public isKbTranslationActive ( ) : true
return true if active, false if not

showForm() public method

Display translation form
public showForm ( $ID, $options = [] )
$ID field (default -1)
$options array

showTranslations() static public method

Display all translated field for an KnowbaseItem
static public showTranslations ( KnowbaseItem $item ) : true;
$item KnowbaseItem a KnowbaseItem item
return true;

Property Details

$dohistory public_oe property

public $dohistory

$items_id public_oe static_oe property

public static $items_id

$itemtype public_oe static_oe property

public static $itemtype

$rightname static_oe public_oe property

static public $rightname