BodyPart
in package
Class responsible for handling operations related to body parts.
Table of Contents
Properties
Methods
- __construct() : mixed
- createBodyPart() : void
- Create a new body part (admin).
- getAll() : array<int, array<string, mixed>>
- Get all body parts by status.
- getByCode() : array<string, mixed>
- Get a body part by its code.
- updateByCode() : void
- Update body_part by code (admin).
Properties
$mySql
protected
MySql
$mySql
Methods
__construct()
public
__construct(MySql $mySql) : mixed
Parameters
- $mySql : MySql
createBodyPart()
Create a new body part (admin).
public
createBodyPart(array<string, mixed> $data) : void
Expects in $data:
- body_part_code (string, required)
- body_part_name (string, required)
- status (int, required)
- createdby (string, required)
- modifiedby (string, required)
Parameters
- $data : array<string, mixed>
getAll()
Get all body parts by status.
public
getAll(array<string|int, int> $statuses) : array<int, array<string, mixed>>
Parameters
- $statuses : array<string|int, int>
Return values
array<int, array<string, mixed>>getByCode()
Get a body part by its code.
public
getByCode(string $bodyPartCode) : array<string, mixed>
Parameters
- $bodyPartCode : string
Return values
array<string, mixed>updateByCode()
Update body_part by code (admin).
public
updateByCode(array<string, mixed> $data) : void
Expects in $data:
- body_part_code (string, required)
- body_part_name (string|null)
- sort_order (int|null)
- status (int|null)
- modifiedby (string, required)
Parameters
- $data : array<string, mixed>