-
Notifications
You must be signed in to change notification settings - Fork 2
tp TouchPointWP Involvement
Fundamental object meant to correspond to an Involvement in TouchPoint
- Class name: Involvement
- Namespace: \tp\TouchPointWP
- Parent class: tp\TouchPointWP\PostTypeCapable
- This class implements: tp\TouchPointWP\Interfaces\api, tp\TouchPointWP\Interfaces\updatesViaCron, tp\TouchPointWP\Interfaces\module, JsonSerializable, tp\TouchPointWP\Interfaces\involvementMeetingCommon
const SHORTCODE_MAP = \tp\TouchPointWP\TouchPointWP::SHORTCODE_PREFIX . "Inv-Map"
const SHORTCODE_FILTER = \tp\TouchPointWP\TouchPointWP::SHORTCODE_PREFIX . "Inv-Filters"
const SHORTCODE_LIST = \tp\TouchPointWP\TouchPointWP::SHORTCODE_PREFIX . "Inv-List"
const SHORTCODE_NEARBY = \tp\TouchPointWP\TouchPointWP::SHORTCODE_PREFIX . "Inv-Nearby"
const SHORTCODE_ACTIONS = \tp\TouchPointWP\TouchPointWP::SHORTCODE_PREFIX . "Inv-Actions"
const CRON_HOOK = \tp\TouchPointWP\TouchPointWP::HOOK_PREFIX . "inv_cron_hook"
const CRON_OFFSET = 86400 - 3600
public mixed containerClass = 'inv-list'
- Visibility: public
public mixed itemClass = 'inv-list-item'
- Visibility: public
public mixed color = "#999999"
- Visibility: public
public mixed name
- Visibility: public
public mixed invId
- Visibility: public
public invType
- Visibility: public
public mixed post_excerpt
- Visibility: public
public mixed attributes
- Visibility: public
mixed tp\TouchPointWP\Involvement::init()
Register stuff
- Visibility: public
- This method is static.
- mixed
void tp\TouchPointWP\Interfaces\updatesViaCron::checkUpdates()
Check to see if a cron run is needed, and run it if so. Connected to an init function.
- Visibility: public
- This method is static.
- This method is defined by tp\TouchPointWP\Interfaces\updatesViaCron
int tp\TouchPointWP\Involvement::updateFromTouchPoint(bool verbose)
Query TouchPoint and update Involvements in WordPress
- Visibility: public
- This method is static.
- verbose bool - Whether to print debugging info.
- int - False on failure, or the number of groups that were updated or deleted.
string tp\TouchPointWP\Involvement::templateFilter(string template)
- Visibility: public
- This method is static.
- template string
- string -
bool|string tp\TouchPointWP\Involvement::acceptingNewMembers()
Whether the involvement can be joined
- Visibility: public
- bool|string - True if involvement can be joined. False if no registration exists. Or, a string with why it can't be joined otherwise.
?string tp\TouchPointWP\Involvement::getRegistrationUrl()
Gets a URL for registration. A registration url will be provided unless there is no viable registration url to send users to, in which case null will be returned.
- Visibility: public
- ?string -
int tp\TouchPointWP\Involvement::getRegistrationType()
Get the registration type for the involvement.
- Visibility: public
- int - enum of RegistrationType
bool tp\TouchPointWP\Involvement::useRegistrationForm()
Whether the involvement should link to a registration form, rather than directly joining the org.
- Visibility: public
- bool -
mixed tp\TouchPointWP\Interfaces\hierarchical::getParent()
Get the parent of this object which may be an object of a different class.
Returns null if there is no parent.
- Visibility: public
- This method is defined by tp\TouchPointWP\Interfaces\hierarchical
- mixed -
?string tp\TouchPointWP\Interfaces\scheduled::scheduleString(int objId, mixed obj)
Get a description of the schedule in a human-friendly phrase, e.g. Sunday, March 31 at 2:00pm.
These strings should be cached.
- Visibility: public
- This method is static.
- This method is defined by tp\TouchPointWP\Interfaces\scheduled
- objId int* obj mixed - Needs to be of the type that implements this interface.
- ?string -
\tp\TouchPointWP\Utilities\DateTimeExtended|null tp\TouchPointWP\Involvement::nextMeeting()
Get the next meeting date/time from either the meetings or schedules.
- Visibility: public
- \tp\TouchPointWP\Utilities\DateTimeExtended|null -
string[] tp\TouchPointWP\Involvement::getDivisionsStrings()
Returns an array of the Involvement's Divisions, excluding those that cause it to be included.
- Visibility: public
- string[] -
string[] tp\TouchPointWP\Involvement::getDivisionsLinks()
Returns an array of links to the Involvement's Divisions, excluding those that cause it to be included.
- Visibility: public
- string[] -
?\tp\TouchPointWP\Involvement_PostTypeSettings tp\TouchPointWP\Involvement::getSettingsForPostType(?string postType)
Get the setting object for a specific post type or involvement type
- Visibility: public
- This method is static.
- postType ?string - Accepts either the post type string, or the inv type string
- ?\tp\TouchPointWP\Involvement_PostTypeSettings -
array tp\TouchPointWP\Involvement::getPostTypes()
Get an array of Involvement Post Types
- Visibility: public
- This method is static.
- array -
array[] tp\TouchPointWP\Involvement::getPostTypesSummary()
Get an array of Involvement Post Types, with some basic info
- Visibility: public
- This method is static.
- array[] -
string tp\TouchPointWP\Involvement::actionsShortcode(array|string params, string content)
Display action buttons for an involvement. Takes an id parameter for the Involvement ID. If not provided, the current post will be used.
- Visibility: public
- This method is static.
- params array|string* content string
- string -
string tp\TouchPointWP\Involvement::filterShortcode(array|string params)
- Visibility: public
- This method is static.
- params array|string
- string -
mixed tp\TouchPointWP\Involvement::doInvolvementList(\WP_Query q, mixed params)
- Visibility: public
- This method is static.
- q WP_Query* params mixed
- mixed
string tp\TouchPointWP\Involvement::listShortcode(array|string params, string content)
Print a list of involvements that match the given criteria.
- Visibility: public
- This method is static.
- params array|string* content string - A string that is shown if no content is available.
- string -
string tp\TouchPointWP\Involvement::nearbyShortcode(array|string params, string content)
- Visibility: public
- This method is static.
- params array|string* content string
- string -
?\tp\TouchPointWP\PostTypeCapable tp\TouchPointWP\PostTypeCapable::fromPost(\WP_Post post)
Create relevant objects from a given post
- Visibility: public
- This method is static.
- This method is defined by tp\TouchPointWP\PostTypeCapable
- post WP_Post
- ?\tp\TouchPointWP\PostTypeCapable -
?\tp\TouchPointWP\Involvement tp\TouchPointWP\Involvement::fromInvolvementId(string postType, int involvementId)
Create an Involvement object from an object from its involvement ID.
- Visibility: public
- This method is static.
- postType string* involvementId int
- ?\tp\TouchPointWP\Involvement -
bool tp\TouchPointWP\Interfaces\api::api(array uri)
Handle API requests
- Visibility: public
- This method is static.
- This method is defined by tp\TouchPointWP\Interfaces\api
- uri array - The request URI already parsed by parse_url()
- bool - False if endpoint is not found. Should print the result.
mixed tp\TouchPointWP\Involvement::ajaxNearby()
Handles the API call to get nearby involvements (probably small groups)
- Visibility: public
- This method is static.
- mixed
bool tp\TouchPointWP\Interfaces\module::load()
Loads the module and initializes the other actions.
- Visibility: public
- This method is static.
- This method is defined by tp\TouchPointWP\Interfaces\module
- bool -
void tp\TouchPointWP\Interfaces\updatesViaCron::updateCron()
Run the updating cron task. Fail quietly to not disturb the visitor experience if using WP default cron handling.
- Visibility: public
- This method is static.
- This method is defined by tp\TouchPointWP\Interfaces\updatesViaCron
float tp\TouchPointWP\Involvement::getDistance(bool useHiForFalse)
Returns distance to the given involvement from the $compareGeo point.
Math thanks to https://stackoverflow.com/a/574736/2339939
- Visibility: public
- useHiForFalse bool - Set to true if a high number should be used for distances that can't be computed. Used for sorting by distance with the closest first.
- float -
mixed tp\TouchPointWP\Involvement::setComparisonGeo(object geo)
- Visibility: public
- This method is static.
- geo object - Set a geo object to use for distance comparisons. Needs to be called before getDistance()
- mixed
int tp\TouchPointWP\Involvement::sort(\tp\TouchPointWP\Involvement a, \tp\TouchPointWP\Involvement b)
Put SmallGroup objects in order of increasing distance. Closed groups go to the end.
- Visibility: public
- This method is static.
- int -
int tp\TouchPointWP\Involvement::sortPosts(\WP_Post|\tp\TouchPointWP\Involvement a, \WP_Post|\tp\TouchPointWP\Involvement b)
Put Post objects that represent Small Groups in order of increasing distance.
- Visibility: public
- This method is static.
- int -
mixed tp\TouchPointWP\Involvement::registerScriptsAndStyles()
Register scripts and styles to be used on display pages.
- Visibility: public
- This method is static.
- mixed
string tp\TouchPointWP\Involvement::mapShortcode(string|array params, string content)
- Visibility: public
- This method is static.
- params string|array* content string
- string -
bool tp\TouchPointWP\Interfaces\hasGeo::hasGeo()
Indicates whether a map of a single item can be displayed.
- Visibility: public
- This method is defined by tp\TouchPointWP\Interfaces\hasGeo
- bool -
object|null tp\TouchPointWP\Interfaces\hasGeo::asGeoIFace(string type)
Returns a standardized stdObject, or null if not viable.
Return object properties are lat, lng, human, and type.
- Visibility: public
- This method is defined by tp\TouchPointWP\Interfaces\hasGeo
- type string - 'loc' for navigator location, or 'ip' for ip address location
- object|null -
mixed tp\TouchPointWP\Involvement::filterPublishDate(mixed theDate, mixed format, mixed post)
Replace the date with the schedule summary
- Visibility: public
- This method is static.
- theDate mixed* format mixed* post mixed
- mixed -
string tp\TouchPointWP\Involvement::filterAuthor(mixed author)
Replace the author with the leaders
- Visibility: public
- This method is static.
- author mixed - Author's display name
- string -
\tp\TouchPointWP\Utilities\PersonArray tp\TouchPointWP\Involvement::leaders()
Get the leaders of the Involvement
- Visibility: public
- \tp\TouchPointWP\Utilities\PersonArray -
?\tp\TouchPointWP\Utilities\PersonArray tp\TouchPointWP\Involvement::hosts()
Get the hosts of the involvement. Returns null if not a geo-enabled post type.
- Visibility: public
- ?\tp\TouchPointWP\Utilities\PersonArray -
?\tp\TouchPointWP\Utilities\PersonArray tp\TouchPointWP\Involvement::members()
Get the members of the involvement. Note that not all members are necessarily synced to WordPress from TouchPoint.
- Visibility: public
- ?\tp\TouchPointWP\Utilities\PersonArray -
?object tp\TouchPointWP\Involvement::toJsonLD()
Return an object that turns into JSON-LD as an event, compliant with schema.org. Return null if the object can't be printed to jsonLd for some reason (e.g. required fields are missing).
- Visibility: public
- This method is abstract.
- ?object -
\tp\TouchPointWP\Utilities\NotableAttributes tp\TouchPointWP\PostTypeCapable::notableAttributes(array|\tp\TouchPointWP\Utilities\StringableArray exclude)
Get notable attributes.
- Visibility: public
- This method is abstract.
- This method is defined by tp\TouchPointWP\PostTypeCapable
- exclude array|array - Attributes listed here will be excluded. (e.g. if shown for a parent, not needed here.)
- \tp\TouchPointWP\Utilities\NotableAttributes -
\tp\TouchPointWP\Utilities\StringableArray tp\TouchPointWP\Interfaces\actionButtons::getActionButtons(string|null context, string btnClass, bool withTouchPointLink, bool absoluteLinks)
- Visibility: public
- This method is defined by tp\TouchPointWP\Interfaces\actionButtons
- context string|null - A string that gives filters some context for where the request is coming from
- btnClass string - HTML class names to put into the buttons/links
- withTouchPointLink bool - Whether to include a link to the item within TouchPoint.
- absoluteLinks bool - Set true to make the links absolute, so they work from apps or emails.
- \tp\TouchPointWP\Utilities\StringableArray -
?string tp\TouchPointWP\Involvement::getRegisterButton(string btnClass, bool absoluteLinks, ?\tp\TouchPointWP\Meeting forMeeting)
Get the HTML for the register button. Labels depend on several settings within TouchPoint.
- Visibility: public
- btnClass string - Class names
- absoluteLinks bool - Whether only absolute links should be provided that can be used in emails, apps, etc.
- forMeeting ?\tp\TouchPointWP\Meeting - If these buttons are for a meeting, pass the meeting
- ?string - HTML for the registration button, whatever that should be. Null if nothing to return.
bool tp\TouchPointWP\Interfaces\involvementMeetingCommon::isPast()
Indicates if the meeting is in the past.
- Visibility: public
- This method is defined by tp\TouchPointWP\Interfaces\involvementMeetingCommon
- bool -
string tp\TouchPointWP\Involvement::getJsInstantiationString()
Get the JS for instantiation.
- Visibility: public
- This method is abstract.
- This method is static.
- string -
int tp\TouchPointWP\PostTypeCapable::getTouchPointId()
Gets a TouchPoint item ID number, regardless of what type of object this is.
- Visibility: public
- This method is abstract.
- This method is defined by tp\TouchPointWP\PostTypeCapable
- int -
bool tp\TouchPointWP\PostTypeCapable::postIsType(\WP_Post post)
Indicates if the given post can be instantiated as the given post type.
- Visibility: public
- This method is abstract.
- This method is static.
- This method is defined by tp\TouchPointWP\PostTypeCapable
- post WP_Post
- bool -
bool tp\TouchPointWP\PostTypeCapable::postTypeMatches(string postType)
Indicates if the given post type name is the post type for this class.
- Visibility: public
- This method is abstract.
- This method is static.
- This method is defined by tp\TouchPointWP\PostTypeCapable
- postType string
- bool -
?string tp\TouchPointWP\Interfaces\hasGeo::locationName()
Get the name of the location.
- Visibility: public
- This method is defined by tp\TouchPointWP\Interfaces\hasGeo
- ?string -
int tp\TouchPointWP\PostTypeCapable::post_id()
Get the Post_id.
- Visibility: public
- This method is defined by tp\TouchPointWP\PostTypeCapable
- int -
\WP_Post|null tp\TouchPointWP\Interfaces\storedAsPost::getPost(bool create)
Get the WP_Post object corresponding to the object.
- Visibility: public
- This method is defined by tp\TouchPointWP\Interfaces\storedAsPost
- create bool - Set true if the post should be created if it doesn't exist. This would need to be implemented in each module, and is not implemented in most.
- \WP_Post|null -
string tp\TouchPointWP\PostTypeCapable::permalink()
Get the link for the post.
- Visibility: public
- This method is defined by tp\TouchPointWP\PostTypeCapable
- string -
string tp\TouchPointWP\Involvement::getPermalink()
Returns the permalink corresponding to the JSON-LD object.
- Visibility: public
- string -
void tp\TouchPointWP\Involvement::printJsonLd()
Print the full JSON-LD info, including script tags.
- Visibility: public
- This method is static.
mixed tp\TouchPointWP\Involvement::requireAllObjectsInJs(bool require)
If all objects need to be included in the JS,
- Visibility: public
- This method is static.
- require bool - Whether all objects should be required. Almost always should be left with the default.
- mixed
object tp\TouchPointWP\Involvement::jsonSerialize()
Get the JS for instantiation.
- Visibility: public
- object -
Documentation generated November 19, 2025 1:15am.
- Simple RSVP
- People Lists
- Involvements
- Outreach Partners
- SQL & Python Reports
- Events Calendar from Meetings (Beta)
- Events Calendar Plugin Integration (Deprecated)
- tp
- tp\TouchPointWP
- Api
- Auth
- tp\TouchPointWP\Blocks
- CalendarGrid
- EventsCalendar
- ExtraValueHandler
- Geo
- tp\TouchPointWP\Interfaces
- Involvement
- Involvement_PostTypeSettings
- InvolvementMembership
- Location
- Meeting
- MeetingArray
- Partner
- Person
- PostTypeCapable
- RegistrationType
- Report
- Rsvp
- Settings
- Stats
- StatusWidget
- Taxonomies
- TouchPointWP
- TouchPointWP_AdminAPI
- TouchPointWP_Exception
- TouchPointWP_WPError
- Utilities
- tp\TouchPointWP