final |
|---|
readonly |
Annotates one property of a discovered model, written on the model's class.
#[ODataAnnotate('price', new ISOCurrency(new Path('currency')))]
#[ODataAnnotate('name', new Label('Product name'), new Description('Shown in lists'))]
class Product extends Model {}
The vocabulary attributes cannot sit on the class for this: there they annotate the entity type. #[ODataAnnotate]
names its target. The property must be one the entity type declares; discovery fails loud otherwise.
A package that annotates columns across models binds a {@see \LaravelUi5\OData\Service\Contracts\ColumnAnnotationResolverInterface}; on the same term and qualifier this attribute wins.
| Methods | ||
|---|---|---|
public
|
__construct(string $property, TypedAnnotationInterface ...$annotations)
|
# |
| Properties | |||
|---|---|---|---|
public
|
list<TypedAnnotationInterface>
|
$annotations
|
# |
public
|
string
|
$property
|
# |