EntityLinker
Allows the creation of <a> nodes that point to an entity's canonical location.
Instance Methods
| Returns | Signature and Description |
|---|---|
Awaitable<XHPRoot> | compose()Composes the link for a given entity. |
bool | supports()Whether this linker supports the provided entity. |
Method Details
compose
abstract public function
compose(mixed $entity)Composes the link for a given entity.
| Name | Type | Description |
|---|---|---|
$entity | mixed | The entity to link |
| Type | Description |
|---|---|
Awaitable<XHPRoot> | The XHP node for the entity's link |
| Type | Conditions |
|---|---|
InvalidArgumentException | if the entity isn't supported |
supports
abstract public function
supports(mixed $entity)Whether this linker supports the provided entity.
| Name | Type | Description |
|---|---|---|
$entity | mixed | The entity to link |
| Type | Description |
|---|---|
bool |
|