Properties

$running_tasks

$running_tasks : array

Initialize the tasks running with this package (updated with getRunningTasks method)

Type

array

$rightname

$rightname : string

The right name for this class

Type

string

$users

$users : array

Initialize the users visibility of package for self-service deploy

Type

array

$groups

$groups : array

Initialize the groups visibility of package for self-service deploy

Type

array

$profiles

$profiles : array

Initialize the profiles visibility of package for self-service deploy

Type

array

$entities

$entities : array

Initialize the entities visibility of package for self-service deploy

Type

array

Methods

getTypeName()

getTypeName(integer  $nb) : string

Get name of this type by language of the user connected

Parameters

integer $nb

number of elements

Returns

string —

name of this type

getSpecificMassiveActions()

getSpecificMassiveActions(object|null  $checkitem = NULL) : array

Get the massive actions for this object

Parameters

object|null $checkitem

Returns

array —

list of actions

getForbiddenStandardMassiveAction()

getForbiddenStandardMassiveAction() : array

Define standard massiveaction actions to deny

Returns

array —

list of actions to deny

showMassiveActionsSubForm()

showMassiveActionsSubForm(object  $ma) : boolean

Display form related to the massive action selected

Parameters

object $ma

MassiveAction instance

Returns

boolean

processMassiveActionsForOneItemtype()

processMassiveActionsForOneItemtype(object  $ma, object  $item, array  $ids) 

Execution code for massive action

Parameters

object $ma

MassiveAction instance

object $item

item on which execute the code

array $ids

list of ID on which execute the code

getEditErrorMessage()

getEditErrorMessage() : string

Define error message if package used in task. This will prevent edit the package

Returns

string

prepareInputForAdd()

prepareInputForAdd(array  $input) : array

Prepare data before add to database

Parameters

array $input

Returns

array

getRunningTasks()

getRunningTasks() 

Get all tasks runnning

getSearchOptions()

getSearchOptions() : array

Get search function for the class

Returns

array

getAllDatas()

getAllDatas() : \json

Get all packages in json format

Returns

\json

cleanDBonPurge()

cleanDBonPurge() 

Clean orders when delete the package

showMenu()

showMenu(array  $options = array()) 

Display the menu / list of packages

Parameters

array $options

showList()

showList() 

Display list of packages

defineTabs()

defineTabs(array  $options = array()) : array

Define tabs to display on form page

Parameters

array $options

Returns

array —

containing the tabs name

showForm()

showForm(integer  $ID, array  $options = array()) : true

Display form

Parameters

integer $ID
array $options

Returns

true

displayOrderTypeForm()

displayOrderTypeForm() 

Display order type form

plusButtonSubtype()

plusButtonSubtype(integer  $id, string  $subtype, string  $rand) 

Manage + button (audits, files, actions)

Parameters

integer $id

id of the package

string $subtype

name of subtype (audits, files, actions)

string $rand

random string for js to prevent collisions

plusButton()

plusButton(string  $dom_id, boolean  $clone = FALSE) 

Plus button used to add an element

Parameters

string $dom_id
boolean $clone

displayJSONDebug()

displayJSONDebug() 

When user is in DEBUG mode, we display the json

alterJSON()

alterJSON(string  $action_type, array  $params) 

Update the json structure

Parameters

string $action_type

type of action

array $params

data used to update the json

exportPackage()

exportPackage(integer  $packages_id) 

Export the package (information, actions, files.

..)

Parameters

integer $packages_id

id of the package to export

importPackage()

importPackage(string  $zipfile) 

Import the package

Parameters

string $zipfile

the zip file with all data inside

listPackagesToImport()

listPackagesToImport() 

Display list of packages to import

getSubElement()

getSubElement(string  $subtype, integer  $index) : string

Get a sub element at index

Parameters

string $subtype
integer $index

Returns

string

getAssociatedFile()

getAssociatedFile(string  $hash) : null|string

Get Order's associated file by hash

Parameters

string $hash

Returns

null|string

getJson()

getJson(integer  $packages_id) : boolean|string

Get the json

Parameters

integer $packages_id

id of the order

Returns

boolean|string —

the string is in json format

updateOrderJson()

updateOrderJson(integer  $packages_id, array  $datas) : integer

Update the order json

Parameters

integer $packages_id
array $datas

Returns

integer —

error number

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

countVisibilities()

countVisibilities() : integer

Count number elements for the visibility

Returns

integer

showVisibility()

showVisibility() : true

Display the visibility, so who can read. write.

..

Returns

true

post_getFromDB()

post_getFromDB() 

Fill internal variable with visibility elements when load package information from database

showPackageForMe()

showPackageForMe(integer  $users_id) 

Display form with deploy state of software user has requested on his computer(s) and form to install packages to his computer(s)

Parameters

integer $users_id

id of the user

getPackageForMe()

getPackageForMe(integer  $users_id) 

Get deploy packages available to install on user computer(s) and for packages requested the state of deploy

Parameters

integer $users_id

id of the user

deployToComputer()

deployToComputer(integer  $computers_id, integer  $packages_id, integer  $users_id) 

Add the package in task or use existant task and add the computer in taskjob

Parameters

integer $computers_id

id of the computer where depoy package

integer $packages_id

id of the package to install in computer

integer $users_id

id of the user have requested the installation

getMyDepoyPackages()

getMyDepoyPackages(array  $computers_packages, integer  $users_id) : array

Get all packages on all my computer I have requested to install

Parameters

array $computers_packages
integer $users_id

Returns

array

getMyDepoyPackagesState()

getMyDepoyPackagesState(integer  $computers_id, integer  $taskjobs_id) 

Get the state of the package I have requeted to install

Parameters

integer $computers_id

id of the computer

integer $taskjobs_id

id of the taskjob (where order defined)

canUserDeploySelf()

canUserDeploySelf() : false|array

Check I have rights to deploy packages

Returns

false|array