\PluginFusioninventoryProfile

Manage the profiles in plugin.

Summary

Methods
Properties
Constants
getOldRightsMappings()
getTabNameForItem()
displayTabContentForItem()
showForm()
showFormSelf()
uninstallProfile()
getAllRights()
getRightsRules()
getRightsDeploy()
getRightsInventory()
getRightsGeneral()
addDefaultProfileInfos()
createFirstAccess()
removeRightsFromSession()
migrateProfiles()
initProfile()
$rightname
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Properties

$rightname

$rightname : string

The right name for this class

Type

string

Methods

getOldRightsMappings()

getOldRightsMappings() : array

Get the mapping old rights => new rights. Require it for upgrade from old version of plugin FusionInventory

Returns

array

getTabNameForItem()

getTabNameForItem(object  $item, integer  $withtemplate) : string

Get the tab name used for item

Parameters

object $item

the item object

integer $withtemplate

1 if is a template form

Returns

string —

name of the tab

displayTabContentForItem()

displayTabContentForItem(object  $item, integer  $tabnum = 1, integer  $withtemplate) : boolean

Display the content of the tab

Parameters

object $item
integer $tabnum

number of the tab to display

integer $withtemplate

1 if is a template form

Returns

boolean

showForm()

showForm(integer  $profiles_id, boolean  $openform = TRUE, boolean  $closeform = TRUE) : true

Display form

Parameters

integer $profiles_id
boolean $openform
boolean $closeform

Returns

true

showFormSelf()

showFormSelf(integer  $profiles_id, boolean  $openform = TRUE, boolean  $closeform = TRUE) 

Display profile form for helpdesk interface

Parameters

integer $profiles_id
boolean $openform
boolean $closeform

uninstallProfile()

uninstallProfile() 

Delete profiles

getAllRights()

getAllRights() : array

Get all rights

Returns

array

getRightsRules()

getRightsRules() : array

Get rights for rules part

Returns

array

getRightsDeploy()

getRightsDeploy() : array

Get rights for deploy part

Returns

array

getRightsInventory()

getRightsInventory() : array

Get rights for inventory part

Returns

array

getRightsGeneral()

getRightsGeneral() : array

Get general rights

Returns

array

addDefaultProfileInfos()

addDefaultProfileInfos(integer  $profiles_id, array  $rights) 

Add the default profile

Parameters

integer $profiles_id
array $rights

createFirstAccess()

createFirstAccess(integer  $profiles_id) 

Create first access (so default profile)

Parameters

integer $profiles_id

id of profile

removeRightsFromSession()

removeRightsFromSession() 

Delete rights stored in session

migrateProfiles()

migrateProfiles() 

Migration script for old rights from old version of plugin FusionInventory

initProfile()

initProfile() 

Init profiles during installation: - add rights in profile table for the current user's profile - current profile has all rights on the plugin