Skip to main content

CommunityPlatformRegistry

Benecaster\Community\CommunityPlatformRegistry

Class Premium community-integrations

Every community platform registered with the Community Integrations add-on, and which of them may be called for a show. It applies the benecaster_community_platforms filter once, the first time it is read. You register a platform through that filter; you don’t need this class to do so. Read it when your own code needs to know which platforms a show uses. See Register a community platform, and know when the add-on calls it.

Methods

Method Visibility Since Description
instance(): self — — The registry the add-on uses.
all(): array Public — Every valid registered platform, keyed by slug. Malformed registrations are already dropped.
get( string $slug ): ?CommunityPlatformInterface Public — One platform by slug, or null when none is registered under it.
active_for_show( int $show_id ): array Public — The platforms that may grant access or act on an episode for this show: the add-on is switched on for it and the platform is configured for it. Keyed by slug.
configured_for_show( int $show_id ): array Public — The platforms that may take access away for this show: configured for it, whether or not the add-on is switched on for it. Never use this list to grant anything. Keyed by slug.

Constants

Name Value Description
FILTER 'benecaster_community_platforms' The registration filter.

Hooks Fired

  • benecaster_community_platforms