Record manager based on Laravel's Eloquent.
\Hubleto\Framework\Models\RecordManagers\Token
| Parent class | \Hubleto\Framework\EloquentRecordManager |
Properties
- This property is static.
Inherited methods
ƒ loader
Shortcut for the loader service.
public loader(): \Hubleto\Framework\Loader
ƒ translate
public translate(string $string, array $vars = []): string
Parameters
| Parameter | Type | Description |
|---|---|---|
$string |
string | |
$vars |
array |
ƒ prepareSelectsForReadQuery
[Description for prepareSelectsForReadQuery]
public prepareSelectsForReadQuery(mixed|null $query = null, int $level, array|null $includeRelations = null): array
Parameters
| Parameter | Type | Description |
|---|---|---|
$query |
mixed|null | |
$level |
int | |
$includeRelations |
array|null |
ƒ prepareJoinsForReadQuery
[Description for prepareJoinsForReadQuery]
public prepareJoinsForReadQuery(mixed|null $query = null, int $level, array|null $includeRelations = null): array
Parameters
| Parameter | Type | Description |
|---|---|---|
$query |
mixed|null | |
$level |
int | |
$includeRelations |
array|null |
ƒ prepareRelationsForReadQuery
[Description for prepareRelationsForReadQuery]
public prepareRelationsForReadQuery(mixed|null $query = null, int $level, array|null $includeRelations = null): array
Parameters
| Parameter | Type | Description |
|---|---|---|
$query |
mixed|null | |
$level |
int | |
$includeRelations |
array|null |
ƒ prepareReadQuery
Prepares the read query for fetching records.
public prepareReadQuery(mixed|null $query = null, int $level, array|null $includeRelations = null): mixed
Parameters
| Parameter | Type | Description |
|---|---|---|
$query |
mixed|null | Leave empty for default behaviour. |
$level |
int | Level of recursion for including relations. |
$includeRelations |
array|null | If not null, only these relations will be included in the read query. |
ƒ recordReadByUid
Calls recordRead() method filtered by provided record UID.
public recordReadByUid(mixed $uid): array
In most cases, record UID equals to record ID.
Parameters
| Parameter | Type | Description |
|---|---|---|
$uid |
mixed |
ƒ loadTableData
Calls recordReadMany() to loads records to be displayed in table.
public loadTableData(string $fulltextSearch = '', array $columnSearch = [], array $orderBy = [], int $itemsPerPage = 15, int $page, string $dataView = ''): array
Parameters
| Parameter | Type | Description |
|---|---|---|
$fulltextSearch |
string | |
$columnSearch |
array | |
$orderBy |
array | |
$itemsPerPage |
int | |
$page |
int | |
$dataView |
string |
ƒ loadTreeData
Calls recordReadMany() to loads records to be displayed in tree.
public loadTreeData(string $fulltextSearch = '', array $orderBy = []): array
Parameters
| Parameter | Type | Description |
|---|---|---|
$fulltextSearch |
string | |
$orderBy |
array |
ƒ loadFormData
Calls recordRead() to load data for the form
public loadFormData(mixed $uid): array
Parameters
| Parameter | Type | Description |
|---|---|---|
$uid |
mixed |
ƒ prepareLookupQuery
Prepares the lookup query for fetching records.
public prepareLookupQuery(string $search): mixed
Parameters
| Parameter | Type | Description |
|---|---|---|
$search |
string | String to filter lookup values. |
ƒ prepareLookupData
[Description for prepareLookupData]
public prepareLookupData(array $dataRaw): array
Parameters
| Parameter | Type | Description |
|---|---|---|
$dataRaw |
array | List of raw records loaded from the database. |
ƒ addFulltextSearchToQuery
[Description for addFulltextSearchToQuery]
public addFulltextSearchToQuery(mixed $query, string $fulltextSearch): mixed
Parameters
| Parameter | Type | Description |
|---|---|---|
$query |
mixed | |
$fulltextSearch |
string |
ƒ addColumnSearchToQuery
[Description for addColumnSearchToQuery]
public addColumnSearchToQuery(mixed $query, array $columnSearch): mixed
Parameters
| Parameter | Type | Description |
|---|---|---|
$query |
mixed | |
$columnSearch |
array |
ƒ addOrderByToQuery
[Description for addOrderByToQuery]
public addOrderByToQuery(mixed $query, array $orderBy): mixed
Parameters
| Parameter | Type | Description |
|---|---|---|
$query |
mixed | |
$orderBy |
array |
ƒ recordReadMany
Loads many records from the database and applies pagination and permissions.
public recordReadMany(mixed $query, int $itemsPerPage, int $page): array
Parameters
| Parameter | Type | Description |
|---|---|---|
$query |
mixed | |
$itemsPerPage |
int | |
$page |
int |
ƒ recordRead
Performs reading from the database and applise permissions.
public recordRead(mixed $query): array
Parameters
| Parameter | Type | Description |
|---|---|---|
$query |
mixed |
ƒ recordEncryptIds
[Description for recordEncryptIds]
public recordEncryptIds(array $record): array
Parameters
| Parameter | Type | Description |
|---|---|---|
$record |
array |
ƒ recordDecryptIds
[Description for recordDecryptIds]
public recordDecryptIds(array $record): array
Parameters
| Parameter | Type | Description |
|---|---|---|
$record |
array |
ƒ recordCreate
[Description for recordCreate]
public recordCreate(array $record, mixed $useProvidedRecordId = false): array
Parameters
| Parameter | Type | Description |
|---|---|---|
$record |
array | |
$useProvidedRecordId |
mixed |
ƒ recordUpdate
[Description for recordUpdate]
public recordUpdate(array $record, array $originalRecord = []): array
Parameters
| Parameter | Type | Description |
|---|---|---|
$record |
array | |
$originalRecord |
array |
ƒ recordDelete
[Description for recordDelete]
public recordDelete(int|string $id): int
Parameters
| Parameter | Type | Description |
|---|---|---|
$id |
int|string |
ƒ recordSave
[Description for recordSave]
public recordSave(array $record, int $idMasterRecord, array $saveRelations = [], string $relation = ''): array
Parameters
| Parameter | Type | Description |
|---|---|---|
$record |
array | |
$idMasterRecord |
int | |
$saveRelations |
array | |
$relation |
string |
ƒ recordValidate
[Description for recordValidate]
public recordValidate(array $record, array $validateRelations = [], string $relation = ''): array
Parameters
| Parameter | Type | Description |
|---|---|---|
$record |
array | |
$validateRelations |
array | |
$relation |
string |
ƒ recordNormalize
[Description for recordNormalize]
public recordNormalize(array $record): array
Parameters
| Parameter | Type | Description |
|---|---|---|
$record |
array |
