Documentation

EmployeesManager
in package

Class EmployeesManager

Tags
category
subpackage

Models

Table of Contents

EMPLOYEE_ADD_EVENT  = 'emp_employee_add_new_employee_event'
EMPLOYEE_UPDATE_EVENT  = 'emp_employee_update_employee_event'
TABLE_NAME  = 'emp_employees'
COLUMN_ADDED_DT  = 'added_dt'
COLUMN_CREATED_DT  = 'created_dt'
COLUMN_EDITED_DT  = 'edited_dt'
COLUMN_EXTERNAL_ID  = 'external_id'
COLUMN_ID  = 'id'
COLUMN_POSITION_ID  = 'position_id'
COLUMN_STRUCTURE_ID  = 'structure_id'
COLUMN_TITLE  = 'title'
COLUMN_UUID  = 'uuid'
$database  : Context
$hookManager  : ModelHooks
__construct()  : mixed
add()  : mixed
Adds new employee.
delete()  : bool
employeeIsRule()  : bool
find()  : array<string|int, mixed>
findEmployeeByAnyParams()  : Selection
Поиск работников по любому разным параметрам
get()  : Row|null
getColumns()  : array<string|int, mixed>
getEmployeeByExternalId()  : ActiveRow
return employee by external_id
getEmployeeByUuid()  : Row
return employee by uuid
getEmployeeIdsWhereRules()  : array<string|int, mixed>
getEmployeeProperties()  : array<string|int, mixed>
Возвращает массив всех параметров работника
getEmployeesByNumber()  : array<string|int, Row>
getTags()  : array<string|int, mixed>
remove()  : bool
update()  : bool
getMetaProperties()  : array<string|int, mixed>
Возвращает массив мета полей работников
getPositions()  : array<string|int, mixed>
getStructureLevel()  : array<string|int, mixed>
getStructures()  : array<string|int, mixed>

Constants

EMPLOYEE_ADD_EVENT

public mixed EMPLOYEE_ADD_EVENT = 'emp_employee_add_new_employee_event'

EMPLOYEE_UPDATE_EVENT

public mixed EMPLOYEE_UPDATE_EVENT = 'emp_employee_update_employee_event'

Properties

Methods

add()

Adds new employee.

public add(string $title, int $structure_id[, string|null $external_id = null ][, null $user_name = null ][, DateTime|null $created_dt = null ]) : mixed
Parameters
$title : string
$structure_id : int
$external_id : string|null = null
$user_name : null = null
$created_dt : DateTime|null = null
Tags
throws
EmployeeSaveException
Return values
mixed

employeeIsRule()

public employeeIsRule(string $employee_id, string $sqlRules) : bool
Parameters
$employee_id : string
$sqlRules : string
Tags
throws
JsonException
Return values
bool

find()

public find([mixed $structurePermissions = null ][, mixed $pages = null ][, mixed $pageLimit = null ]) : array<string|int, mixed>
Parameters
$structurePermissions : mixed = null
$pages : mixed = null
$pageLimit : mixed = null
Return values
array<string|int, mixed>

findEmployeeByAnyParams()

Поиск работников по любому разным параметрам

public findEmployeeByAnyParams(array<string|int, mixed> $params) : Selection
Parameters
$params : array<string|int, mixed>
Return values
Selection

get()

public get(mixed $id) : Row|null
Parameters
$id : mixed
Return values
Row|null

getColumns()

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

getEmployeeByExternalId()

return employee by external_id

public getEmployeeByExternalId(string $externalId) : ActiveRow
Parameters
$externalId : string
Return values
ActiveRow

getEmployeeIdsWhereRules()

public getEmployeeIdsWhereRules(string $sqlRules) : array<string|int, mixed>
Parameters
$sqlRules : string
Return values
array<string|int, mixed>

getEmployeeProperties()

Возвращает массив всех параметров работника

public getEmployeeProperties() : array<string|int, mixed>
Return values
array<string|int, mixed>

Массив параметров работника вместе с мета параметрами

getEmployeesByNumber()

public getEmployeesByNumber(string $number) : array<string|int, Row>
Parameters
$number : string
Return values
array<string|int, Row>

getTags()

public getTags(mixed $emp_id) : array<string|int, mixed>
Parameters
$emp_id : mixed
Return values
array<string|int, mixed>

remove()

public remove(array<string|int, mixed> $ids[, string|null $user_name = null ]) : bool
Parameters
$ids : array<string|int, mixed>
$user_name : string|null = null
Tags
throws
EmployeeUseException
Return values
bool

update()

public update(mixed $id, mixed $values[, mixed $user_name = null ]) : bool
Parameters
$id : mixed
$values : mixed
$user_name : mixed = null
Tags
throws
NotAllPropertySetException
Return values
bool

getMetaProperties()

Возвращает массив мета полей работников

private getMetaProperties() : array<string|int, mixed>
Return values
array<string|int, mixed>

['meta.name'=>'meta.title']

getPositions()

private getPositions() : array<string|int, mixed>
Return values
array<string|int, mixed>

getStructureLevel()

private getStructureLevel() : array<string|int, mixed>
Return values
array<string|int, mixed>

getStructures()

private getStructures() : array<string|int, mixed>
Return values
array<string|int, mixed>

Search results