Documentation

UpdateTermStatus

Use case for updating a term's learning status.

Tags
since
3.0.0

Table of Contents

Properties

$repository  : TermRepositoryInterface

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

Methods

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
throws
InvalidArgumentException

If status is invalid

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
throws
InvalidArgumentException

If status is invalid

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


        
On this page

Search results