Properties

$rightname

$rightname : string

The right name for this class

Type

string

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

countForLock()

countForLock(object  $item) : integer

Count number lock elements for item

Parameters

object $item

Returns

integer

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) : true

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

true

showForm()

showForm(string  $p_target, string  $p_itemtype, integer  $p_items_id) : true

Display locks form for an item

Parameters

string $p_target

Target file.

string $p_itemtype

Class name.

integer $p_items_id

Line id.

Returns

true

showFormItemtype()

showFormItemtype(string  $itemtype) 

Display lock form for an itemtype

Parameters

string $itemtype

deleteInLockArray()

deleteInLockArray(string  $p_table, integer  $p_items_id, string  $p_fieldToDel) 

Unlock a field for a record.

Parameters

string $p_table

Table name.

integer $p_items_id

Line id.

string $p_fieldToDel

field to unlock.

deleteInAllLockArray()

deleteInAllLockArray(string  $p_table, string  $p_fieldToDel) 

Unlock a field for all records.

Parameters

string $p_table

Table name.

string $p_fieldToDel

field to unlock.

setLockArray()

setLockArray(string  $p_itemtype, integer  $p_items_id, string  $p_fieldsToLock, string  $massiveaction = '') 

Set lock fields for a record.

Parameters

string $p_itemtype

Table id.

integer $p_items_id

Line id.

string $p_fieldsToLock

Array of fields to lock.

string $massiveaction

addLocks()

addLocks(string  $p_itemtype, integer  $p_items_id, string  $p_fieldsToLock) 

Add lock fields for a record.

Parameters

string $p_itemtype

Table id.

integer $p_items_id

Line id.

string $p_fieldsToLock

Array of fields to lock.

getLock()

getLock(string  $p_table, integer  $p_items_id) : object

Get lock fields for a record.

Parameters

string $p_table

Table name.

integer $p_items_id

Line id.

Returns

object

getLockFields()

getLockFields(string  $p_table, integer  $p_items_id) : array

Get lock fields for a record.

Parameters

string $p_table

Table name.

integer $p_items_id

Line id.

Returns

array —

list of locked fields

exportChecksToArray()

exportChecksToArray(array  $p_checksArray) : array

convert an array resulting from many form checks (0=>on 2=>on 5=>on .

..) into a classical array(0=>0 1=>2 2=>5 ...)

Parameters

array $p_checksArray

checkbox array from form

Returns

array

excludeFields()

excludeFields() : array

Manage list of fields to exclude for lock

Returns

array —

list of fields to exclude

deleteLock()

deleteLock(object  $item) 

Delete locks fields and get from lib value from last inventory

Parameters

object $item

importFromOcs()

importFromOcs() 

Import OCS locks

getSerializedInventoryArray()

getSerializedInventoryArray(string  $itemtype, integer  $items_id) : array

Get serialized inventory and convert to array

Parameters

string $itemtype
integer $items_id

Returns

array

getValueForKey()

getValueForKey(string  $val, string  $key) : string

Get value for key

Parameters

string $val
string $key

Returns

string

showLockIcon()

showLockIcon(string  $itemtype) 

Display lock icon in main item form

Parameters

string $itemtype

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

isFieldLocked()

isFieldLocked(array  $a_lockable, string  $field) : boolean

Say if the field is locked

Parameters

array $a_lockable

list of fields locked

string $field

field to check

Returns

boolean