Changeset 9982 for trunk/src/bp-groups/classes/class-bp-groups-member.php
- Timestamp:
- 06/30/2015 06:22:31 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-groups/classes/class-bp-groups-member.php
r9906 r9982 1 1 <?php 2 2 /** 3 * BuddyPress Groups Classes 3 * BuddyPress Groups Classes. 4 4 * 5 5 * @package BuddyPress … … 134 134 * Constructor method. 135 135 * 136 * @param int $user_idOptional. Along with $group_id, can be used to137 * look up a membership.138 * @param int $group_id Optional. Along with $user_id, can be used to139 * 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 the142 * 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. 143 143 */ 144 144 public function __construct( $user_id = 0, $group_id = 0, $id = false, $populate = true ) { … … 271 271 * 272 272 * @param string $status The new status. 'mod' or 'admin'. 273 * 273 274 * @return bool True on success, false on failure. 274 275 */ … … 397 398 * 398 399 * @param int $user_id ID of the user. 400 * 399 401 * @return bool True on success, false on failure. 400 402 */ … … 409 411 * 410 412 * @param int $group_id ID of the group. 413 * 411 414 * @return bool True on success, false on failure. 412 415 */ … … 418 421 * Delete a membership, based on user + group IDs. 419 422 * 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 * 422 426 * @return True on success, false on failure. 423 427 */ … … 460 464 * Get the IDs of the groups of which a specified user is a member. 461 465 * 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). 467 471 * @return array { 468 472 * @type array $groups Array of groups returned by paginated query. 469 * @type int $totalCount of groups matching query.473 * @type int $total Count of groups matching query. 470 474 * } 471 475 */ … … 496 500 * Get the IDs of the groups of which a specified user is a member, sorted by the date joined. 497 501 * 498 * @param int $user_id ID of the user.499 * @param int|bool $limitOptional. Max number of results to return.500 * Default: false (no limit).501 * @param int|bool $pageOptional. Page offset of results to return.502 * Default: false (no limit).503 * @param string|bool $filter Optional. Limit results to groups whose name or504 * 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. 505 509 * @return array { 506 510 * @type array $groups Array of groups returned by paginated query. 507 * @type int $totalCount of groups matching query.511 * @type int $total Count of groups matching query. 508 512 * } 509 513 */ … … 537 541 * Get the IDs of the groups of which a specified user is an admin. 538 542 * 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 * 546 551 * @return array { 547 552 * @type array $groups Array of groups returned by paginated query. 548 * @type int $totalCount of groups matching query.553 * @type int $total Count of groups matching query. 549 554 * } 550 555 */ … … 578 583 * Get the IDs of the groups of which a specified user is a moderator. 579 584 * 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 * 587 593 * @return array { 588 594 * @type array $groups Array of groups returned by paginated query. 589 * @type int $totalCount of groups matching query.595 * @type int $total Count of groups matching query. 590 596 * } 591 597 */ … … 620 626 * 621 627 * @param int $user_id Optional. Default: ID of the displayed user. 628 * 622 629 * @return int Group count. 623 630 */ … … 640 647 * Get a user's outstanding group invitations. 641 648 * 642 * @param int $user_id ID of the invitee.643 * @param int|bool $limitOptional. Max number of results to return.644 * Default: false (no limit).645 * @param int|bool $pageOptional. 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). 647 654 * @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 * 649 657 * @return array { 650 658 * @type array $groups Array of groups returned by paginated query. 651 * @type int $totalCount of groups matching query.659 * @type int $total Count of groups matching query. 652 660 * } 653 661 */ … … 676 684 * @since BuddyPress (2.0.0) 677 685 * 678 * @param int $user_id The user ID 686 * @param int $user_id The user ID. 687 * 679 688 * @return int 680 689 */ … … 697 706 * Check whether a user has an outstanding invitation to a given group. 698 707 * 699 * @param int $user_idID of the potential invitee.700 * @param int $group_id ID of the group.701 * @param string $type If 'sent', results are limited to those702 * 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 * 704 713 * @return int|null The ID of the invitation if found, otherwise null. 705 714 */ … … 726 735 * @param int $user_id ID of the user. 727 736 * @param int $group_id ID of the group. 737 * 728 738 * @return int Number of records deleted. 729 739 */ … … 751 761 * Delete an unconfirmed membership request, by user ID and group ID. 752 762 * 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 * 755 766 * @return int Number of records deleted. 756 767 */ … … 769 780 * Check whether a user is an admin of a given group. 770 781 * 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. 775 784 * 776 785 * @return mixed … … 790 799 * Check whether a user is a mod of a given group. 791 800 * 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. 796 803 * 797 804 * @return mixed … … 811 818 * Check whether a user is a member of a given group. 812 819 * 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. 817 822 * 818 823 * @return mixed … … 832 837 * Check whether a user is banned from a given group. 833 838 * 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. 838 841 * 839 842 * @return mixed … … 855 858 * @since BuddyPress (1.2.6) 856 859 * 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 * 859 863 * @return int|null ID of the group if the user is the creator, 860 * otherwise false.864 * otherwise false. 861 865 */ 862 866 public static function check_is_creator( $user_id, $group_id ) { … … 874 878 * Check whether a user has an outstanding membership request for a given group. 875 879 * 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 * 878 883 * @return int|null ID of the membership if found, otherwise false. 879 884 */ … … 892 897 * Get a list of randomly selected IDs of groups that the member belongs to. 893 898 * 894 * @param int $user_id ID of the user.899 * @param int $user_id ID of the user. 895 900 * @param int $total_groups Max number of group IDs to return. Default: 5. 901 * 896 902 * @return array Group IDs. 897 903 */ … … 913 919 * 914 920 * @param int $group_id ID of the group. 921 * 915 922 * @return array IDs of all group members. 916 923 */ … … 927 934 * 928 935 * @param int $group_id ID of the group. 936 * 929 937 * @return array Info about group admins (user_id + date_modified). 930 938 */ … … 948 956 * 949 957 * @param int $group_id ID of the group. 958 * 950 959 * @return array Info about group mods (user_id + date_modified). 951 960 */ … … 962 971 * 963 972 * @param int $group_id ID of the group. 973 * 964 974 * @return array IDs of users with outstanding membership requests. 965 975 */ … … 1069 1079 * 1070 1080 * @param int $group_id ID of the group. 1081 * 1071 1082 * @return int Number of records deleted. 1072 1083 */
Note: See TracChangeset
for help on using the changeset viewer.