You are here

public function GroupMembershipController::create in Group 7

Create a group membership.

We first set up the values that are specific to the group schema but then also run the EntityAPIController counterpart.

Parameters

array $values: An array of values to set, keyed by property name.

Return value

GroupMembership A new GroupMembership instance.

Overrides EntityAPIController::create

File

classes/group_membership.controller.inc, line 158
Defines the Entity API CRUD class for group memberships.

Class

GroupMembershipController
Controller for group membership entities.

Code

public function create(array $values = array()) {

  // Provide defaults that are needed for the db.
  $values += array(
    'roles' => array(),
    'status' => 'active',
  );
  return parent::create($values);
}