Documentation

RecordStatus
in package

Record status service class.

Table of Contents

RECORD_STATE_CLOSED  = 2
Variable using in picklist record state.
RECORD_STATE_NO_CONCERN  = 0
Variable using in picklist record state.
RECORD_STATE_OPEN  = 1
Variable using in picklist record state.
TIME_COUNTING_IDLE  = 3
Variable used to count times in specified categories.
TIME_COUNTING_REACTION  = 1
Variable used to count times in specified categories.
TIME_COUNTING_RESOLVE  = 2
Variable used to count times in specified categories.
$fieldsByStateTime  : array<string|int, string>
Fields key by state time.
$stateTimeFields  : array<string|int, mixed>
State time fields.
activate()  : bool
Activate of the record status mechanism.
addFieldsAndBlock()  : void
Add block and fields.
addHistory()  : mixed
Add date history status to table.
deactivate()  : bool
Deactivate of the record status mechanism.
getFieldName()  : string|array<string|int, string>
Get process status field names.
getLabels()  : array<string|int, string>
Get all record states.
getLockStatus()  : array<string|int, mixed>
Get closing states for all fields in module.
getStateDate()  : string
Get date from the status change history by status.
getStates()  : array<string|int, mixed>
Get record state statuses by module name.
getTimeCountingIds()  : array<string|int, mixed>
Get time counting values grouped by id from field name.
getTimeCountingValues()  : array<string|int, mixed>
Get time counting values grouped by id from field name.
update()  : mixed
Update status times.

Constants

RECORD_STATE_CLOSED

Variable using in picklist record state.

public int RECORD_STATE_CLOSED = 2

RECORD_STATE_NO_CONCERN

Variable using in picklist record state.

public int RECORD_STATE_NO_CONCERN = 0

RECORD_STATE_OPEN

Variable using in picklist record state.

public int RECORD_STATE_OPEN = 1

TIME_COUNTING_IDLE

Variable used to count times in specified categories.

public int TIME_COUNTING_IDLE = 3

TIME_COUNTING_REACTION

Variable used to count times in specified categories.

public int TIME_COUNTING_REACTION = 1

TIME_COUNTING_RESOLVE

Variable used to count times in specified categories.

public int TIME_COUNTING_RESOLVE = 2

Properties

$fieldsByStateTime

Fields key by state time.

private static array<string|int, string> $fieldsByStateTime = [self::TIME_COUNTING_REACTION => 'response', self::TIME_COUNTING_RESOLVE => 'solution', self::TIME_COUNTING_IDLE => 'idle']

$stateTimeFields

State time fields.

private static array<string|int, mixed> $stateTimeFields = ['RangeTime' => ['response_range_time' => 'FL_RESPONSE_RANGE_TIME', 'solution_range_time' => 'FL_SOLUTION_RANGE_TIME', 'idle_range_time' => 'FL_IDLE_RANGE_TIME', 'closing_range_time' => 'FL_CLOSING_RANGE_TIME'], 'DateTime' => ['response_datatime' => 'FL_RESPONSE_DATE_TIME', 'solution_datatime' => 'FL_SOLUTION_DATE_TIME', 'idle_datatime' => 'FL_IDLE_DATE_TIME', 'closing_datatime' => 'FL_CLOSING_DATE_TIME', 'response_expected' => 'FL_RESPONSE_EXPECTED', 'solution_expected' => 'FL_SOLUTION_EXPECTED', 'idle_expected' => 'FL_IDLE_DATE_EXPECTED']]

Methods

activate()

Activate of the record status mechanism.

public static activate(string $moduleName, string $fieldName) : bool
Parameters
$moduleName : string
$fieldName : string
Return values
bool

addFieldsAndBlock()

Add block and fields.

public static addFieldsAndBlock(string $moduleName) : void
Parameters
$moduleName : string
Return values
void

deactivate()

Deactivate of the record status mechanism.

public static deactivate(string $moduleName, string $fieldName) : bool
Parameters
$moduleName : string
$fieldName : string
Return values
bool

getFieldName()

Get process status field names.

public static getFieldName([string $moduleName = '' ]) : string|array<string|int, string>
Parameters
$moduleName : string = ''

optional if we need only one field name for specified module

Return values
string|array<string|int, string>

getLabels()

Get all record states.

public static getLabels() : array<string|int, string>
Return values
array<string|int, string>

[id=>label]

getLockStatus()

Get closing states for all fields in module.

public static getLockStatus(string $moduleName[, bool $byName = true ]) : array<string|int, mixed>
Parameters
$moduleName : string
$byName : bool = true
Return values
array<string|int, mixed>

getStates()

Get record state statuses by module name.

public static getStates(string $moduleName[, int|null $state = null ]) : array<string|int, mixed>
Parameters
$moduleName : string
$state : int|null = null
Return values
array<string|int, mixed>

if state is specified values are labels, if not values are record_states, key is always primary key

getTimeCountingIds()

Get time counting values grouped by id from field name.

public static getTimeCountingIds(string $moduleName) : array<string|int, mixed>
Parameters
$moduleName : string
Return values
array<string|int, mixed>

getTimeCountingValues()

Get time counting values grouped by id from field name.

public static getTimeCountingValues(string $fieldName) : array<string|int, mixed>
Parameters
$fieldName : string
Return values
array<string|int, mixed>

        

Search results