StructureLevelTypeManager
in package
Class StructureLevelTypeManager
Tags
Table of Contents
- COL_ID = 'uuid'
- COL_NAME = 'name'
- COL_STRUCTURE = 'structure'
- COL_STRUCTURE_LEVEL = 'structure_level'
- COL_TITLE = 'title'
- COL_TYPE = 'type'
- LINK_TABLE_NAME = 'emp_employee_structure_to_structure_levels'
- TABLE_NAME = 'emp_employees_structure_levels'
- TYPE_COMPANY = 'company'
- TYPE_PROD_ASSOCIATION = 'prod.association'
- TYPE_SUBDIVISION = 'subdivision'
- $database : Explorer
- $slugger : Utf8Slugger
- __construct() : mixed
- StructureLevelManager constructor.
- add() : array<string|int, mixed>|bool|int|iteratable<string|int, mixed>|ActiveRow|Selection|Traversable
- add new structure level
- attachToStructure() : void
- Attached structure level to structure
- delete() : bool
- delete structure level
- findByName() : ActiveRow|null
- findByTitle() : ActiveRow|null
- get() : ActiveRow
- return structure level
- getAll() : Selection
- return all structure levels
- getAttachStructureLevel() : Selection
- getStructuresIdsFromStructureLevelType() : Selection
- Возвращает список идентификаторов структур имеющий искомый уровень
- unpinOnStructure() : bool
- unpin structure level on structure
- update() : bool
- update structure level
Constants
COL_ID
public
string
COL_ID
= 'uuid'
COL_NAME
public
string
COL_NAME
= 'name'
COL_STRUCTURE
public
string
COL_STRUCTURE
= 'structure'
COL_STRUCTURE_LEVEL
public
string
COL_STRUCTURE_LEVEL
= 'structure_level'
COL_TITLE
public
string
COL_TITLE
= 'title'
COL_TYPE
public
string
COL_TYPE
= 'type'
LINK_TABLE_NAME
public
string
LINK_TABLE_NAME
= 'emp_employee_structure_to_structure_levels'
TABLE_NAME
public
string
TABLE_NAME
= 'emp_employees_structure_levels'
TYPE_COMPANY
public
string
TYPE_COMPANY
= 'company'
TYPE_PROD_ASSOCIATION
public
string
TYPE_PROD_ASSOCIATION
= 'prod.association'
TYPE_SUBDIVISION
public
string
TYPE_SUBDIVISION
= 'subdivision'
Properties
$database
private
Explorer
$database
$slugger
private
Utf8Slugger
$slugger
Methods
__construct()
StructureLevelManager constructor.
public
__construct(Explorer $database) : mixed
Parameters
- $database : Explorer
Return values
mixed —add()
add new structure level
public
add(string $title[, string $type = 'system' ]) : array<string|int, mixed>|bool|int|iteratable<string|int, mixed>|ActiveRow|Selection|Traversable
Parameters
- $title : string
- $type : string = 'system'
Tags
Return values
array<string|int, mixed>|bool|int|iteratable<string|int, mixed>|ActiveRow|Selection|Traversable —attachToStructure()
Attached structure level to structure
public
attachToStructure(string $uuid, int $structure_id) : void
Parameters
- $uuid : string
- $structure_id : int
Tags
Return values
void —delete()
delete structure level
public
delete(string $uuid) : bool
Parameters
- $uuid : string
Tags
Return values
bool —findByName()
public
findByName(string $name) : ActiveRow|null
Parameters
- $name : string
Return values
ActiveRow|null —findByTitle()
public
findByTitle(string $title) : ActiveRow|null
Parameters
- $title : string
Return values
ActiveRow|null —get()
return structure level
public
get(string $uuid) : ActiveRow
Parameters
- $uuid : string
Tags
Return values
ActiveRow —getAll()
return all structure levels
public
getAll() : Selection
Return values
Selection —getAttachStructureLevel()
public
getAttachStructureLevel(int $structure_id) : Selection
Parameters
- $structure_id : int
Return values
Selection —getStructuresIdsFromStructureLevelType()
Возвращает список идентификаторов структур имеющий искомый уровень
public
getStructuresIdsFromStructureLevelType( $levelTypeName) : Selection
Parameters
Tags
Return values
Selection —unpinOnStructure()
unpin structure level on structure
public
unpinOnStructure(string $uuid, int $structure_id) : bool
Parameters
- $uuid : string
- $structure_id : int
Tags
Return values
bool —update()
update structure level
public
update(string $uuid, string $title) : bool
Parameters
- $uuid : string
- $title : string