Skip to content
Corex

NotificationController

Corex\Config\Notifications\NotificationController · class · Config layer

REST boundary for the Notification Center (corex/v1/notifications). Two tiers gate it: the read/own-action tier is any signed-in user acting on their own notifications — the service re-checks visibility on every call, so one user can never read or touch another’s; the manage tier ({@see CorexAbility::MANAGE_NOTIFICATIONS}) governs resolving a shared condition. Every mutation also carries a REST nonce. Reads are bounded and paginated; every response is enveloped.

__construct(NotificationService $notifications, NotificationPreferenceStore $preferences)

Section titled “__construct(NotificationService $notifications, NotificationPreferenceStore $preferences)”

index(WP_REST_Request $request): WP_REST_Response

Section titled “index(WP_REST_Request $request): WP_REST_Response”

show(WP_REST_Request $request): WP_REST_Response

Section titled “show(WP_REST_Request $request): WP_REST_Response”

read(WP_REST_Request $request): WP_REST_Response

Section titled “read(WP_REST_Request $request): WP_REST_Response”

unread(WP_REST_Request $request): WP_REST_Response

Section titled “unread(WP_REST_Request $request): WP_REST_Response”

dismiss(WP_REST_Request $request): WP_REST_Response

Section titled “dismiss(WP_REST_Request $request): WP_REST_Response”

snooze(WP_REST_Request $request): WP_REST_Response

Section titled “snooze(WP_REST_Request $request): WP_REST_Response”

savePreferences(WP_REST_Request $request): WP_REST_Response

Section titled “savePreferences(WP_REST_Request $request): WP_REST_Response”

resolve(WP_REST_Request $request): WP_REST_Response

Section titled “resolve(WP_REST_Request $request): WP_REST_Response”