Documentation

SourceType
in package

The SourceType class provides methods to interact with the `source_type` database table.

It supports operations such as retrieving, creating, and updating source type records.

Table of Contents

Properties

$mySql  : MySql

Methods

__construct()  : mixed
createByAdmin()  : void
Create a new source type (admin).
getAll()  : array<int, array<string, mixed>>
Get all source types filtered by status.
getByCode()  : array<string, mixed>
Get a source type by its code.
updateByCode()  : void
Update a source type by its code (admin).

Properties

Methods

createByAdmin()

Create a new source type (admin).

public createByAdmin(array<string, mixed> $data) : void

Expects in $data:

  • source_type_code (string, required)
  • source_type_name (string, required)
  • sort_order (int|null)
  • status (int, required)
  • createdby (string, required)
  • modifiedby (string, required)
Parameters
$data : array<string, mixed>

getAll()

Get all source types filtered 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 source type by its code.

public getByCode(string $code) : array<string, mixed>
Parameters
$code : string
Return values
array<string, mixed>

updateByCode()

Update a source type by its code (admin).

public updateByCode(array<string, mixed> $data) : void

Expects in $data:

  • source_type_code (string, required)
  • source_type_name (string|null)
  • sort_order (int|null)
  • status (int|null)
  • modifiedby (string, required)
Parameters
$data : array<string, mixed>

        
On this page

Search results