Methods |
public
|
addAttribute(array<string, mixed> $data): int
Add Attribute Create a new attribute record in the database.
Add Attribute Create a new attribute record in the database.
Returns
returns the primary key of the new attribute record
|
#
|
public
|
editAttribute(int $attribute_id, array<string, mixed> $data): void
Edit Attribute Edit attribute record in the database.
Edit Attribute Edit attribute record in the database.
Parameters
$attribute_id |
primary key of the attribute record to edit
|
$data |
array of data
|
|
#
|
public
|
deleteAttribute(int $attribute_id): void
Delete Attribute Delete attribute record in the database.
Delete Attribute Delete attribute record in the database.
Parameters
$attribute_id |
primary key of the attribute record to be deleted
|
|
#
|
public
|
getAttribute(int $attribute_id): array<string, mixed>
Get Attribute Get the record of the attribute record in the database.
Get Attribute Get the record of the attribute record in the database.
Parameters
$attribute_id |
primary key of the attribute record to be fetched
|
|
#
|
public
|
getAttributes(array<string, mixed> $data = []): array<int, array<string, mixed>>
Get Attributes Get the record of the attribute record in the database.
Get Attributes Get the record of the attribute record in the database.
Parameters
|
#
|
public
|
getTotalAttributes(): int
Get Total Attributes Get the total number of attribute records in the database.
Get Total Attributes Get the total number of attribute records in the database.
Returns
total number of attribute records
|
#
|
public
|
getTotalAttributesByAttributeGroupId(int $attribute_group_id): int
Get Total Attributes By Attribute Group ID Get the total number of attribute records with group ID in the database.
Get Total Attributes By Attribute Group ID Get the total number of attribute records with group ID in the database.
Parameters
$attribute_group_id |
foreign key of the attribute record to be fetched
|
Returns
total number of attribute records that have attribute group ID
|
#
|
public
|
addDescription(int $attribute_id, int $language_id, array<string, mixed> $data): void
Parameters
$attribute_id |
primary key of the attribute record
|
$language_id |
primary key of the attribute language
|
|
#
|
public
|
deleteDescriptions(int $attribute_id): void
Delete Descriptions Delete attribute description record in the database.
Delete Descriptions Delete attribute description record in the database.
Parameters
$attribute_id |
primary key of the attribute record to be fetched
|
|
#
|
public
|
deleteDescriptionsByLanguageId(int $language_id): void
Delete Descriptions By Language ID Delete attribute description record in the database.
Delete Descriptions By Language ID Delete attribute description record in the database.
Parameters
$language_id |
primary key of the attribute language
|
|
#
|
public
|
getDescription(int $attribute_id, int $language_id): array<string, mixed>
Get Description Get the record of the attribute description record in the database.
Get Description Get the record of the attribute description record in the database.
Parameters
$attribute_id |
primary key of the attribute record to be fetched
|
$language_id |
primary key of the attribute language
|
|
#
|
public
|
getDescriptions(int $attribute_id): array<int, array<string, string>>
Get Descriptions Get the record of the attribute record in the database.
Get Descriptions Get the record of the attribute record in the database.
Parameters
$attribute_id |
primary key of the attribute record to be fetched
|
Returns
|
#
|
public
|
getDescriptionsByLanguageId(int $language_id): array<int, array<string, string>>
Get Descriptions By Language ID Get the record of the attribute record in the database.
Get Descriptions By Language ID Get the record of the attribute record in the database.
Parameters
$language_id |
primary key of the attribute language
|
Returns
Descriptions by language_id
|
#
|