GravityKit\GravityCalendar\Abilities\Discovery\ListEvents
gc_events_list: the events the calendar shows between two dates, built by the same code that
answers the calendar's own event requests (GV_Extension_Calendar_Feed::calendar_events()).
Since: TBD
Source: includes/abilities/Discovery/ListEvents.php:28
Details
- Kind:
class - Namespace:
GravityKit\GravityCalendar\Abilities\Discovery - Extends:
Ability
Methods
| Method | Description |
|---|---|
name() | The ability's registered name. |
label() | The short title an AI client shows for gc_events_list. |
description() | What gc_events_list tells an AI client it does and when to call it. |
category() | The category gc_events_list is listed under. |
input_schema() | The JSON schema of the input gc_events_list accepts. |
output_schema() | The JSON schema of what gc_events_list returns. |
annotations() | Hints that tell an AI client whether gc_events_list reads, writes or deletes. |
permission() | Settings-screen access, or the right to move this calendar's events. |
execute() | Runs gc_events_list. |
event_row() | One event in the output shape. |
Method Reference
name()
public static function name(): string
The ability's registered name.
Returns
string—gk-gravitycalendar/events-list(MCPgc_events_list).
Since: TBD
Source: includes/abilities/Discovery/ListEvents.php:51
label()
public static function label(): string
The short title an AI client shows for gc_events_list.
Returns
string
Since: TBD
Source: includes/abilities/Discovery/ListEvents.php:62
description()
public static function description(): string
What gc_events_list tells an AI client it does and when to call it.
Returns
string
Since: TBD
Source: includes/abilities/Discovery/ListEvents.php:73
category()
public static function category(): string
The category gc_events_list is listed under.
Returns
string
Since: TBD
Source: includes/abilities/Discovery/ListEvents.php:98
input_schema()
public static function input_schema(): array
The JSON schema of the input gc_events_list accepts.
Returns
array
Since: TBD
Source: includes/abilities/Discovery/ListEvents.php:127
output_schema()
public static function output_schema(): array
The JSON schema of what gc_events_list returns.
Returns
array
Since: TBD
Source: includes/abilities/Discovery/ListEvents.php:153
annotations()
public static function annotations(): array
Hints that tell an AI client whether gc_events_list reads, writes or deletes.
Returns
array{readonly:bool,— destructive:bool, idempotent:bool}
Since: TBD
Source: includes/abilities/Discovery/ListEvents.php:214
permission()
public static function permission( array $input )
Settings-screen access, or the right to move this calendar's events.
Anyone who may move an event may already see it on the calendar, and needs its entry id to move it. Everyone else needs settings-screen access, even for a calendar whose shortcode is public, because nothing here can tell whether the calendar is on a page or where.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$input | array | Input as received. |
Returns
true|\WP_Error
Since: TBD
Source: includes/abilities/Discovery/ListEvents.php:231
execute()
public static function execute( array $input )
Runs gc_events_list.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$input | array | Input, validated against the input schema. |
Returns
array|\WP_Error
Since: TBD
Source: includes/abilities/Discovery/ListEvents.php:265
event_row()
public static function event_row( array $event ): array
One event in the output shape.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$event | array | An event as the calendar builds it. |
Returns
array
Since: TBD
Source: includes/abilities/Discovery/ListEvents.php:442