Skip to content

tp TouchPointWP Meeting_GroupingPlanner

James K. edited this page Oct 5, 2026 · 1 revision

tp\TouchPointWP\Meeting_GroupingPlanner

Plans how the meetings of one structure are grouped into Editions and Clusters.

A structure is an involvement (the structure owner) and, if its Meeting Grouping settings include child involvements, its child and grandchild involvements. The planner only arranges meetings; it doesn't read or write posts, and it makes no WordPress calls.

An Edition can have a spanning meeting: one of the owner's own meetings that covers the whole Edition, such as a week-long conference meeting. It isn't grouped into a Cluster, and the Edition takes its name. See MeetingArray::$spanningMeeting.

The result is a list of top-level items, in chronological order. Each item is either a meeting (as provided by the API) or a MeetingArray whose groupRole is one of the MeetingArray::ROLE_ constants. A MeetingArray may contain meetings and other MeetingArrays.


  • Full name: \tp\TouchPointWP\Meeting_GroupingPlanner

Methods

__construct

public __construct(object $owner, object[] $involvements, bool $editions, bool $clusters, int $editionGap, int $clusterGap): mixed

Parameters:

Parameter Type Description
$owner object The structure owner, as provided by the API.
$involvements object[] The involvements in the structure, as provided by the API, including the owner.
Each must have a meetings array whose meetings have their involvementId set.
$editions bool Whether to group meetings into Editions.
$clusters bool Whether to group meetings of the same involvement into Clusters.
$editionGap int The gap, in seconds, after which a new Edition starts.
$clusterGap int The maximum gap, in seconds, between back-to-back meetings in a Cluster.

fromSettings

Create a planner using the given Meeting Grouping settings and the gaps from the filters.

public static fromSettings(object $owner, object[] $involvements, \tp\TouchPointWP\Meeting_GroupingSettings $rule): \tp\TouchPointWP\Meeting_GroupingPlanner
  • This method is static. Parameters:
Parameter Type Description
$owner object The structure owner, as provided by the API.
$involvements object[] The involvements in the structure, including the owner.
$rule \tp\TouchPointWP\Meeting_GroupingSettings The settings that apply to the owner.

plan

Plan the grouping.

public plan(): array

Return Value:

The top-level items: meetings and MeetingArrays, in chronological order.


Clone this wiki locally