DeleteTerm
in package
Use case for deleting a term.
Tags
Table of Contents
Properties
Methods
- __construct() : mixed
- Constructor.
- execute() : bool
- Execute the delete term use case.
- executeMultiple() : int
- Execute for multiple term IDs.
- executeWithResult() : array{success: bool, error: ?string}
- Execute and return structured result.
Properties
$repository
private
TermRepositoryInterface
$repository
Methods
__construct()
Constructor.
public
__construct(TermRepositoryInterface $repository) : mixed
Parameters
- $repository : TermRepositoryInterface
-
Term repository
execute()
Execute the delete term use case.
public
execute(int $termId) : bool
Parameters
- $termId : int
-
Term ID to delete
Return values
bool —True if deleted, false if not found
executeMultiple()
Execute for multiple term IDs.
public
executeMultiple(array<string|int, int> $termIds) : int
Parameters
- $termIds : array<string|int, int>
-
Array of term IDs to delete
Return values
int —Number of terms deleted
executeWithResult()
Execute and return structured result.
public
executeWithResult(int $termId) : array{success: bool, error: ?string}
Parameters
- $termId : int
-
Term ID to delete