UpdateTermStatus
in package
Use case for updating a term's learning status.
Tags
Table of Contents
Properties
Methods
- __construct() : mixed
- Constructor.
- advance() : bool
- Advance a term's status to the next learning stage.
- decrease() : bool
- Decrease a term's status to the previous learning stage.
- execute() : bool
- Execute the update status use case.
- executeMultiple() : int
- Update status for multiple terms.
- markAsIgnored() : bool
- Mark a term as ignored.
- markAsLearned() : bool
- Mark a term as learned (status 5).
- markAsWellKnown() : bool
- Mark a term as well-known.
Properties
$repository
private
TermRepositoryInterface
$repository
Methods
__construct()
Constructor.
public
__construct(TermRepositoryInterface $repository) : mixed
Parameters
- $repository : TermRepositoryInterface
-
Term repository
advance()
Advance a term's status to the next learning stage.
public
advance(int $termId) : bool
Parameters
- $termId : int
-
Term ID
Return values
bool —True if updated
decrease()
Decrease a term's status to the previous learning stage.
public
decrease(int $termId) : bool
Parameters
- $termId : int
-
Term ID
Return values
bool —True if updated
execute()
Execute the update status use case.
public
execute(int $termId, int $status) : bool
Parameters
- $termId : int
-
Term ID
- $status : int
-
New status value (1-5, 98, 99)
Tags
Return values
bool —True if updated, false if term not found
executeMultiple()
Update status for multiple terms.
public
executeMultiple(array<string|int, int> $termIds, int $status) : int
Parameters
- $termIds : array<string|int, int>
-
Array of term IDs
- $status : int
-
New status value
Tags
Return values
int —Number of terms updated
markAsIgnored()
Mark a term as ignored.
public
markAsIgnored(int $termId) : bool
Parameters
- $termId : int
-
Term ID
Return values
bool —True if updated
markAsLearned()
Mark a term as learned (status 5).
public
markAsLearned(int $termId) : bool
Parameters
- $termId : int
-
Term ID
Return values
bool —True if updated
markAsWellKnown()
Mark a term as well-known.
public
markAsWellKnown(int $termId) : bool
Parameters
- $termId : int
-
Term ID
Return values
bool —True if updated