You are here

function _subscriptions_og_compare_groups in Subscriptions 2.0.x

Same name and namespace in other branches
  1. 7 contrib/subscriptions_og/subscriptions_og.module \_subscriptions_og_compare_groups()

Helper function so sort organic groups.

Intended for use with usort() and similar functions.

Parameters

object $first: An organic group node.

object $second: An organic group node.

Return value

int < 0 if $first comes before $second, > 0 if $second comes before $first, and 0 if they are equal in sorting order.

1 string reference to '_subscriptions_og_compare_groups'
subscriptions_og_page in subscriptions_og/subscriptions_og.module
Defines a user's overview of which groups she is subscribed to.

File

subscriptions_og/subscriptions_og.module, line 308
Allow users to subscribe to content posted to an organic group.

Code

function _subscriptions_og_compare_groups($first, $second) {
  return strcmp($first->title, $second->title);
}