[ 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.

since: 5.0.0
return: string

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 {
since: 5.0.0
return: int|bool ID of the newly created invitation on success, false

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().
since: 5.0.0
return: bool The result of `run_send_action()`.

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

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

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().
since: 5.0.0
return: bool The result of `run_send_action()`.

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

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

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

since: 5.0.0
return: array Located invitations.

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

since: 8.0.0
return: int Total number of invitations.

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

since: 5.0.0
return: array Located invitations.

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

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

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

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

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

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

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

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

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
since: 5.0.0
return: int|bool Number of rows updated on success, false on failure.

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.

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

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.

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

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

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

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.

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

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

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

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.
since: 5.0.0
return: bool True if allowed, false to end process.

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.
since: 5.0.0
return: bool True if allowed, false to end process.



Generated: Sun Dec 22 01:00:54 2024 Cross-referenced by PHPXref 0.7.1