Documentation

GetTermById

Use case for retrieving a term by its ID.

Tags
since
3.0.0

Table of Contents

Properties

$repository  : TermRepositoryInterface

Methods

__construct()  : mixed
Constructor.
execute()  : Term|null
Execute the get term use case.
executeAsArray()  : array<string|int, mixed>|null
Execute and return array format (backward compatible).

Properties

Methods

execute()

Execute the get term use case.

public execute(int $termId) : Term|null
Parameters
$termId : int

Term ID

Return values
Term|null

The term entity or null if not found

executeAsArray()

Execute and return array format (backward compatible).

public executeAsArray(int $termId) : array<string|int, mixed>|null
Parameters
$termId : int

Term ID

Return values
array<string|int, mixed>|null

Term data array or null if not found


        
On this page

Search results