PHP Class KnowbaseItemTranslation, glpi

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

Méthodes publiques

Свойство Type Description
$dohistory
$items_id
$itemtype
$rightname

Méthodes publiques

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

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
Résultat true if item can be translated, false otherwise

displayTabContentForItem() static public méthode

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

getAlreadyTranslatedForItem() static public méthode

Get already translated languages for item
static public getAlreadyTranslatedForItem ( $item ) : array
Résultat array of already translated languages

getForbiddenStandardMassiveAction() public méthode

getNumberOfTranslationsForItem() static public méthode

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

getTabNameForItem() public méthode

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

getTranslatedValue() static public méthode

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')
Résultat the field translated if a translation is available, or the original field if not

getTypeName() static public méthode

static public getTypeName ( $nb )

isKbTranslationActive() static public méthode

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

showForm() public méthode

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

showTranslations() static public méthode

Display all translated field for an KnowbaseItem
static public showTranslations ( KnowbaseItem $item ) : true;
$item KnowbaseItem a KnowbaseItem item
Résultat 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