Documentation

StructuresManager
in package

Class StructuresManager

Tags
category
subpackage

Models

Table of Contents

COLUMN_ADDED_DT  = 'added_dt'
COLUMN_CREATED_DT  = 'created_dt'
COLUMN_EDITED_DT  = 'edited_dt'
COLUMN_ID  = 'id'
COLUMN_PID  = 'pid'
COLUMN_TITLE  = 'title'
COLUMN_UUID  = 'uuid'
TABLE_NAME  = 'emp_structures'
$container  : mixed
$database  : Context
$structureLevelTypeManager  : StructureLevelTypeManager
__construct()  : mixed
add()  : ActiveRow
addChainStructure()  : int
delete()  : bool
find()  : Selection
findChildren()  : Selection
findIdsByTitle()  : mixed
findIdsByTitles()  : array<string|int, mixed>
findParent()  : Selection
findPath()  : array<string|int, mixed>
get()  : ActiveRow
getStructureChain()  : Row|null
Возвращает объект в котором есть иерархическая цепочка с названиями звеньев
getStructuresByIds()  : Selection
Возвращает список структур соответсвующих идентификатрам
getStructureTable()  : mixed
getStructureTree()  : array<string|int, mixed>
Возвращает Id текущего звена и дочерних
hasChildren()  : bool
update()  : mixed
constructStructureRow()  : mixed

Constants

Properties

Methods

__construct()

public __construct(Container $container, Context $database) : mixed
Parameters
$container : Container
$database : Context
Return values
mixed

add()

public add(string $title, int|null $parent_id[, DateTime|null $created_dt = null ]) : ActiveRow
Parameters
$title : string
$parent_id : int|null
$created_dt : DateTime|null = null
Tags
throws
Exception
Return values
ActiveRow

addChainStructure()

public addChainStructure(array<string|int, mixed> $chainStructures) : int
Parameters
$chainStructures : array<string|int, mixed>
Tags
throws
Exception
Return values
int

findChildren()

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

findIdsByTitle()

public findIdsByTitle(mixed $title) : mixed
Parameters
$title : mixed
Return values
mixed

findIdsByTitles()

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

findPath()

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

getStructureChain()

Возвращает объект в котором есть иерархическая цепочка с названиями звеньев

public getStructureChain(int $structureId) : Row|null
Parameters
$structureId : int
Return values
Row|null

getStructuresByIds()

Возвращает список структур соответсвующих идентификатрам

public getStructuresByIds(iteratable<string|int, mixed> $ids) : Selection
Parameters
$ids : iteratable<string|int, mixed>
Return values
Selection

getStructureTable()

public getStructureTable(array<string|int, mixed> $structureIds[, mixed $parentNumber = '' ][, mixed $structures = [] ]) : mixed
Parameters
$structureIds : array<string|int, mixed>
$parentNumber : mixed = ''
$structures : mixed = []
Return values
mixed

getStructureTree()

Возвращает Id текущего звена и дочерних

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

hasChildren()

public hasChildren(mixed $parent_id) : bool
Parameters
$parent_id : mixed
Return values
bool

update()

public update(mixed $id, mixed $title, mixed $parent_id) : mixed
Parameters
$id : mixed
$title : mixed
$parent_id : mixed
Return values
mixed

constructStructureRow()

private constructStructureRow(string $number, string $id, string $title, string $chain) : mixed
Parameters
$number : string
$id : string
$title : string
$chain : string
Return values
mixed

Search results