Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
06/30/2015 06:22:31 AM (9 years ago)
Author:
tw2113
Message:

Further docs cleanup for BP Groups component.

See #6401.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-groups/classes/class-bp-groups-member.php

    r9906 r9982  
    11<?php
    22/**
    3  * BuddyPress Groups Classes
     3 * BuddyPress Groups Classes.
    44 *
    55 * @package BuddyPress
     
    134134     * Constructor method.
    135135     *
    136      * @param int $user_id Optional. Along with $group_id, can be used to
    137      *        look up a membership.
    138      * @param int $group_id Optional. Along with $user_id, can be used to
    139      *        look up a membership.
    140      * @param int|bool $id Optional. The unique ID of the membership object.
    141      * @param bool $populate Whether to populate the properties of the
    142      *        located membership. Default: true.
     136     * @param int      $user_id Optional. Along with $group_id, can be used to
     137     *                           look up a membership.
     138     * @param int      $group_id Optional. Along with $user_id, can be used to
     139     *                           look up a membership.
     140     * @param int|bool $id       Optional. The unique ID of the membership object.
     141     * @param bool     $populate Whether to populate the properties of the
     142     *                           located membership. Default: true.
    143143     */
    144144    public function __construct( $user_id = 0, $group_id = 0, $id = false, $populate = true ) {
     
    271271     *
    272272     * @param string $status The new status. 'mod' or 'admin'.
     273     *
    273274     * @return bool True on success, false on failure.
    274275     */
     
    397398     *
    398399     * @param int $user_id ID of the user.
     400     *
    399401     * @return bool True on success, false on failure.
    400402     */
     
    409411     *
    410412     * @param int $group_id ID of the group.
     413     *
    411414     * @return bool True on success, false on failure.
    412415     */
     
    418421     * Delete a membership, based on user + group IDs.
    419422     *
    420      * @param int $user_id ID of the user.
    421      * @param int $group_id ID of the group.
     423     * @param int $user_id  ID of the user.
     424     * @param int $group_id ID of the group.
     425     *
    422426     * @return True on success, false on failure.
    423427     */
     
    460464     * Get the IDs of the groups of which a specified user is a member.
    461465     *
    462      * @param int $user_id ID of the user.
    463      * @param int|bool $limit Optional. Max number of results to return.
    464      *        Default: false (no limit).
    465      * @param int|bool $page Optional. Page offset of results to return.
    466      *        Default: false (no limit).
     466     * @param int      $user_id ID of the user.
     467     * @param int|bool $limit   Optional. Max number of results to return.
     468     *                          Default: false (no limit).
     469     * @param int|bool $page    Optional. Page offset of results to return.
     470     *                          Default: false (no limit).
    467471     * @return array {
    468472     *     @type array $groups Array of groups returned by paginated query.
    469      *     @type int $total Count of groups matching query.
     473     *     @type int   $total Count of groups matching query.
    470474     * }
    471475     */
     
    496500     * Get the IDs of the groups of which a specified user is a member, sorted by the date joined.
    497501     *
    498      * @param int $user_id ID of the user.
    499      * @param int|bool $limit Optional. Max number of results to return.
    500      *        Default: false (no limit).
    501      * @param int|bool $page Optional. Page offset of results to return.
    502      *        Default: false (no limit).
    503      * @param string|bool $filter Optional. Limit results to groups whose name or
    504      *        description field matches search terms.
     502     * @param int         $user_id ID of the user.
     503     * @param int|bool    $limit  Optional. Max number of results to return.
     504     *                             Default: false (no limit).
     505     * @param int|bool    $page    Optional. Page offset of results to return.
     506     *                             Default: false (no limit).
     507     * @param string|bool $filter  Optional. Limit results to groups whose name or
     508     *                             description field matches search terms.
    505509     * @return array {
    506510     *     @type array $groups Array of groups returned by paginated query.
    507      *     @type int $total Count of groups matching query.
     511     *     @type int   $total Count of groups matching query.
    508512     * }
    509513     */
     
    537541     * Get the IDs of the groups of which a specified user is an admin.
    538542     *
    539      * @param int $user_id ID of the user.
    540      * @param int|bool $limit Optional. Max number of results to return.
    541      *        Default: false (no limit).
    542      * @param int|bool $page Optional. Page offset of results to return.
    543      *        Default: false (no limit).
    544      * @param string|bool $filter Optional. Limit results to groups whose name or
    545      *        description field matches search terms.
     543     * @param int         $user_id ID of the user.
     544     * @param int|bool    $limit   Optional. Max number of results to return.
     545     *                             Default: false (no limit).
     546     * @param int|bool    $page    Optional. Page offset of results to return.
     547     *                             Default: false (no limit).
     548     * @param string|bool $filter  Optional. Limit results to groups whose name or
     549     *                             description field matches search terms.
     550     *
    546551     * @return array {
    547552     *     @type array $groups Array of groups returned by paginated query.
    548      *     @type int $total Count of groups matching query.
     553     *     @type int   $total Count of groups matching query.
    549554     * }
    550555     */
     
    578583     * Get the IDs of the groups of which a specified user is a moderator.
    579584     *
    580      * @param int $user_id ID of the user.
    581      * @param int|bool $limit Optional. Max number of results to return.
    582      *        Default: false (no limit).
    583      * @param int|bool $page Optional. Page offset of results to return.
    584      *        Default: false (no limit).
    585      * @param string|bool $filter Optional. Limit results to groups whose name or
    586      *        description field matches search terms.
     585     * @param int         $user_id ID of the user.
     586     * @param int|bool    $limit   Optional. Max number of results to return.
     587     *                             Default: false (no limit).
     588     * @param int|bool    $page    Optional. Page offset of results to return.
     589     *                             Default: false (no limit).
     590     * @param string|bool $filter  Optional. Limit results to groups whose name or
     591     *                             description field matches search terms.
     592     *
    587593     * @return array {
    588594     *     @type array $groups Array of groups returned by paginated query.
    589      *     @type int $total Count of groups matching query.
     595     *     @type int   $total Count of groups matching query.
    590596     * }
    591597     */
     
    620626     *
    621627     * @param int $user_id Optional. Default: ID of the displayed user.
     628     *
    622629     * @return int Group count.
    623630     */
     
    640647     * Get a user's outstanding group invitations.
    641648     *
    642      * @param int $user_id ID of the invitee.
    643      * @param int|bool $limit Optional. Max number of results to return.
    644      *        Default: false (no limit).
    645      * @param int|bool $page Optional. Page offset of results to return.
    646      *        Default: false (no limit).
     649     * @param int               $user_id ID of the invitee.
     650     * @param int|bool          $limit  Optional. Max number of results to return.
     651     *                                   Default: false (no limit).
     652     * @param int|bool          $page    Optional. Page offset of results to return.
     653     *                                   Default: false (no limit).
    647654     * @param string|array|bool $exclude Optional. Array or comma-separated list
    648      *        of group IDs to exclude from results.
     655     *                                   of group IDs to exclude from results.
     656     *
    649657     * @return array {
    650658     *     @type array $groups Array of groups returned by paginated query.
    651      *     @type int $total Count of groups matching query.
     659     *     @type int   $total Count of groups matching query.
    652660     * }
    653661     */
     
    676684     * @since BuddyPress (2.0.0)
    677685     *
    678      * @param int $user_id The user ID
     686     * @param int $user_id The user ID.
     687     *
    679688     * @return int
    680689     */
     
    697706     * Check whether a user has an outstanding invitation to a given group.
    698707     *
    699      * @param int $user_id ID of the potential invitee.
    700      * @param int $group_id ID of the group.
    701      * @param string $type If 'sent', results are limited to those
    702      *        invitations that have actually been sent (non-draft).
    703      *        Default: 'sent'.
     708     * @param int    $user_id ID of the potential invitee.
     709     * @param int    $group_id ID of the group.
     710     * @param string $type     If 'sent', results are limited to those invitations
     711     *                         that have actually been sent (non-draft). Default: 'sent'.
     712     *
    704713     * @return int|null The ID of the invitation if found, otherwise null.
    705714     */
     
    726735     * @param  int $user_id  ID of the user.
    727736     * @param  int $group_id ID of the group.
     737     *
    728738     * @return int Number of records deleted.
    729739     */
     
    751761     * Delete an unconfirmed membership request, by user ID and group ID.
    752762     *
    753      * @param int $user_id ID of the user.
    754      * @param int $group_id ID of the group.
     763     * @param int $user_id  ID of the user.
     764     * @param int $group_id ID of the group.
     765     *
    755766     * @return int Number of records deleted.
    756767     */
     
    769780     * Check whether a user is an admin of a given group.
    770781     *
    771      * @param int $user_id ID of the user.
    772      * @param int $group_id ID of the group.
    773      * @param int|null ID of the membership if the user is an admin,
    774      *        otherwise null.
     782     * @param int $user_id  ID of the user.
     783     * @param int $group_id ID of the group.
    775784     *
    776785     * @return mixed
     
    790799     * Check whether a user is a mod of a given group.
    791800     *
    792      * @param int $user_id ID of the user.
    793      * @param int $group_id ID of the group.
    794      * @param int|null ID of the membership if the user is a mod,
    795      *        otherwise null.
     801     * @param int $user_id  ID of the user.
     802     * @param int $group_id ID of the group.
    796803     *
    797804     * @return mixed
     
    811818     * Check whether a user is a member of a given group.
    812819     *
    813      * @param int $user_id ID of the user.
    814      * @param int $group_id ID of the group.
    815      * @param int|null ID of the membership if the user is a member,
    816      *        otherwise null.
     820     * @param int $user_id  ID of the user.
     821     * @param int $group_id ID of the group.
    817822     *
    818823     * @return mixed
     
    832837     * Check whether a user is banned from a given group.
    833838     *
    834      * @param int $user_id ID of the user.
    835      * @param int $group_id ID of the group.
    836      * @param int|null ID of the membership if the user is banned,
    837      *        otherwise null.
     839     * @param int $user_id  ID of the user.
     840     * @param int $group_id ID of the group.
    838841     *
    839842     * @return mixed
     
    855858     * @since BuddyPress (1.2.6)
    856859     *
    857      * @param int $user_id ID of the user.
    858      * @param int $group_id ID of the group.
     860     * @param int $user_id  ID of the user.
     861     * @param int $group_id ID of the group.
     862     *
    859863     * @return int|null ID of the group if the user is the creator,
    860      *         otherwise false.
     864     *                  otherwise false.
    861865     */
    862866    public static function check_is_creator( $user_id, $group_id ) {
     
    874878     * Check whether a user has an outstanding membership request for a given group.
    875879     *
    876      * @param int $user_id ID of the user.
    877      * @param int $group_id ID of the group.
     880     * @param int $user_id  ID of the user.
     881     * @param int $group_id ID of the group.
     882     *
    878883     * @return int|null ID of the membership if found, otherwise false.
    879884     */
     
    892897     * Get a list of randomly selected IDs of groups that the member belongs to.
    893898     *
    894      * @param int $user_id ID of the user.
     899     * @param int $user_id      ID of the user.
    895900     * @param int $total_groups Max number of group IDs to return. Default: 5.
     901     *
    896902     * @return array Group IDs.
    897903     */
     
    913919     *
    914920     * @param int $group_id ID of the group.
     921     *
    915922     * @return array IDs of all group members.
    916923     */
     
    927934     *
    928935     * @param int $group_id ID of the group.
     936     *
    929937     * @return array Info about group admins (user_id + date_modified).
    930938     */
     
    948956     *
    949957     * @param int $group_id ID of the group.
     958     *
    950959     * @return array Info about group mods (user_id + date_modified).
    951960     */
     
    962971     *
    963972     * @param int $group_id ID of the group.
     973     *
    964974     * @return array IDs of users with outstanding membership requests.
    965975     */
     
    10691079     *
    10701080     * @param int $group_id ID of the group.
     1081     *
    10711082     * @return int Number of records deleted.
    10721083     */
Note: See TracChangeset for help on using the changeset viewer.