[ Index ]

PHP Cross Reference of BuddyPress

title

Body

[close]

/src/bp-core/classes/ -> class-bp-invitation-manager.php (summary)

Core invitations class.

File Size: 798 lines (23 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 24 functions

  __construct()
  get_table_name()
  add_invitation()
  send_invitation_by_id()
  add_request()
  send_request_notification_by_id()
  get_by_id()
  get_invitations()
  get_invitations_total_count()
  get_requests()
  invitation_exists()
  request_exists()
  accept_invitation()
  accept_request()
  update_invitation()
  mark_sent()
  mark_accepted_by_id()
  mark_accepted()
  delete()
  delete_requests()
  delete_all()
  delete_by_id()
  allow_invitation()
  allow_request()

Functions
Functions that are not part of a class:

__construct( $args = array()   X-Ref
Construct parameters.

param: array|string $args {
since: 5.0.0

get_table_name()   X-Ref
Get the invitations table name.

return: string
since: 5.0.0

add_invitation( $args = array()   X-Ref
Add an invitation to a specific user, from a specific user, related to a
specific class.

param: array $args {
return: int|bool ID of the newly created invitation on success, false
since: 5.0.0

send_invitation_by_id( $invitation_id = 0, $args = array()   X-Ref
Send an invitation notification.

param: int   $invitation_id ID of invitation to send.
param: array $args          See BP_Invitation::mark_sent().
return: bool The result of `run_send_action()`.
since: 5.0.0

add_request( $args = array()   X-Ref
Add a request to an item for a specific user, related to a
specific class.

param: array $args {
return: int|bool ID of the newly created invitation on success, false
since: 5.0.0

send_request_notification_by_id( $request_id = 0, $args = array()   X-Ref
Send a request notification.

param: int   $request_id ID of request to send.
param: array $args       See BP_Invitation::mark_sent().
return: bool The result of `run_send_action()`.
since: 5.0.0

get_by_id( $id = 0 )   X-Ref
Get a specific invitation by its ID.

param: int $id ID of the invitation.
return: BP_Invitation object
since: 5.0.0

get_invitations( $args = array()   X-Ref
Get invitations, based on provided filter parameters.

return: array Located invitations.
since: 5.0.0

get_invitations_total_count( $args = array()   X-Ref
Get a count of the number of invitations that match provided filter parameters.

return: int Total number of invitations.
since: 8.0.0

get_requests( $args = array()   X-Ref
Get requests, based on provided filter parameters.

return: array Located invitations.
since: 5.0.0

invitation_exists( $args = array()   X-Ref
Check whether an invitation exists matching the passed arguments.

return: int|bool ID of first found invitation or false if none found.
since: 5.0.0

request_exists( $args = array()   X-Ref
Check whether a request exists matching the passed arguments.

return: int|bool ID of existing request or false if none found.
since: 5.0.0

accept_invitation( $args = array()   X-Ref
Accept invitation, based on provided filter parameters.

param: array $args {
return: int|bool Number of rows updated on success, false on failure.
since: 5.0.0

accept_request( $args = array()   X-Ref
Accept invitation, based on provided filter parameters.

param: array $args {
return: bool Number of rows updated on success, false on failure.
since: 5.0.0

update_invitation( $update_args = array()   X-Ref
Update invitation, based on provided filter parameters.

param: array $update_args Associative array of fields to update,
param: array $where_args Associative array of columns/values, to
return: int|bool Number of rows updated on success, false on failure.
since: 5.0.0

mark_sent( $args )   X-Ref
Mark invitations as sent that are found by user_id, inviter_id,
invitee_email, class name, optional item id,
optional secondary item id.

param: array $args {
since: 5.0.0

mark_accepted_by_id( $id, $args )   X-Ref
Mark invitation as accepted by invitation ID.

return: bool True on success, false on failure.
since: 5.0.0

mark_accepted( $args )   X-Ref
Mark invitations as sent that are found by user_id, inviter_id,
invitee_email, class name, item id, and
optional secondary item id.

since: 5.0.0

delete( $args )   X-Ref
Delete an invitation or invitations by query data.

return: int|bool Number of rows deleted on success, false on failure.
since: 5.0.0

delete_requests( $args )   X-Ref
Delete a request or requests by query data.

return: int|bool Number of rows deleted on success, false on failure.
since: 5.0.0

delete_all()   X-Ref
Delete all invitations by class.

Used when clearing out invitations for an entire class. Possibly used
when deactivating a component related to a class that created invitations.

return: int|bool Number of rows deleted on success, false on failure.
since: 5.0.0

delete_by_id( $id )   X-Ref
Delete an invitation by id.

param: int $id ID of the invitation to delete.
return: int|bool Number of rows deleted on success, false on failure.
since: 8.0.0

allow_invitation( $args )   X-Ref
This is where custom actions are added (in child classes)
to determine whether an invitation should be allowed.

param: array $args The parameters describing the invitation.
return: bool True if allowed, false to end process.
since: 5.0.0

allow_request( $args )   X-Ref
This is where custom actions are added (in child classes)
to determine whether a request should be allowed.

param: array $args The parameters describing the request.
return: bool True if allowed, false to end process.
since: 5.0.0



Generated: Fri Mar 29 01:01:02 2024 Cross-referenced by PHPXref 0.7.1