[ Index ]

PHP Cross Reference of BuddyPress

title

Body

[close]

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

Core invitations class.

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

Defines 22 functions

  __construct()
  get_table_name()
  add_invitation()
  send_invitation_by_id()
  add_request()
  send_request_notification_by_id()
  get_by_id()
  get_invitations()
  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()
  allow_invitation()
  allow_request()

Functions
Functions that are not part of a class:

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

since: 5.0.0
param: array|string $args {

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.

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

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

return: int|bool The number of rows updated, or false on error.
since: 5.0.0
param: int $invitation_id ID of invitation to send.

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

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

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

return: int|bool The number of rows updated, or false on error.
since: 5.0.0
param: int $request_id ID of request to send.

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

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

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

return: array Located invitations.
since: 5.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.

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

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

return: bool Number of rows updated on success, false on failure.
since: 5.0.0
param: array $update_args Associative array of fields to update,

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

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

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.

since: 5.0.0
param: array $args {

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

return: bool True on success, false on failure.
since: 5.0.0
param: int $id The ID of the invitation to mark as sent.

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

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

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

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

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



Generated: Wed Dec 11 01:01:37 2019 Cross-referenced by PHPXref 0.7.1