item_service
class item_service extends item_service
Public SDK Item Service.
Use this class to extend the central Item Service with extension-specific business rules (e.g., coursegroup, studyplan).
Methods
__construct(item_repository_interface $repository, audit_service_interface $event_service, item_revision_service_interface $revision_service, item_validator_service_interface $validator)
Constructor.
from
item_service
from
item_service
get_repository()
Expose underlying repository (primarily for advanced orchestration).
from
item_service
Details
in
item_service at line 47
__construct(item_repository_interface $repository, audit_service_interface $event_service, item_revision_service_interface $revision_service, item_validator_service_interface $validator)
Constructor.
in
item_service at line 64
item_interface
create(item_dto_interface $dto)
Create a new item based on a DTO.
in
item_service at line 96
item_interface
update(item_dto_interface $dto)
Update an existing item using a DTO.
in
item_service at line 132
void
delete(int $id)
Delete an item.
in
item_service at line 153
item_interface|null
find(int $id)
Find an item by ID.
in
item_service at line 167
array
get_metadata(int $id)
Retrieve metadata for an item.
in
item_service at line 180
array
find_by_type(string $type)
Retrieve all items for the given TYPE.
Used by extensions implementing the TYPE pattern.
in
item_service at line 188
item_repository_interface
get_repository()
Expose underlying repository (primarily for advanced orchestration).