ThesaurusSchemeTrait
Defines the custom property names of the {@see \xyz\oihana\schema\thesaurus\ThesaurusScheme} schema entity.
Centralizing these keys avoids hardcoded string literals and provides a single source of truth for hydration and serialization.
It is composed by the ThesaurusScheme
entity (and reused by ThesaurusDomain
for the shared ACTIVE/ORDER keys) and aggregated, through
ThesaurusTrait, into the global
Oihana constants class (its DOMAIN and
PATH values match the auth/audit keys already exposed there).
Typical usage:
$scheme[ ThesaurusSchemeTrait::ACTIVE ] = true ;
Tags
Table of Contents
Constants
- ACTIVE : string = 'active'
- The visibility flag : an inactive scheme is hidden from the interfaces without being deleted.
- DOMAIN : string = 'domain'
- The domain the scheme is filed under, as a bare key or a hydrated {@see \xyz\oihana\schema\thesaurus\ThesaurusDomain}.
- HARVESTED : string = 'harvested'
- The provenance flag : a harvested scheme is fed by an external source, so the term core (`id`/`name`) is read-only and only the house overlays are editable.
- ORDER : string = 'order'
- The display order of the scheme within its domain.
- PATH : string = 'path'
- The relative path of the scheme routes (e.g. `/thesaurus/products/categories`).
- SYSTEM : string = 'system'
- The system flag : the technical skeleton of the scheme is defined in code, so it cannot be deleted through an API.
Constants
ACTIVE
The visibility flag : an inactive scheme is hidden from the interfaces without being deleted.
public
string
ACTIVE
= 'active'
Related model property:
public ?bool $active ;
DOMAIN
The domain the scheme is filed under, as a bare key or a hydrated {@see \xyz\oihana\schema\thesaurus\ThesaurusDomain}.
public
string
DOMAIN
= 'domain'
Related model property:
public null|string|array|ThesaurusDomain $domain ;
HARVESTED
The provenance flag : a harvested scheme is fed by an external source, so the term core (`id`/`name`) is read-only and only the house overlays are editable.
public
string
HARVESTED
= 'harvested'
Related model property:
public ?bool $harvested ;
ORDER
The display order of the scheme within its domain.
public
string
ORDER
= 'order'
Related model property:
public ?int $order ;
PATH
The relative path of the scheme routes (e.g. `/thesaurus/products/categories`).
public
string
PATH
= 'path'
Related model property:
public ?string $path ;
SYSTEM
The system flag : the technical skeleton of the scheme is defined in code, so it cannot be deleted through an API.
public
string
SYSTEM
= 'system'
Related model property:
public ?bool $system ;