You are here

public function GroupRoleController::create in Group 7

Create a group role.

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

Parameters

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

Return value

GroupRole A new GroupRole instance.

Overrides EntityAPIController::create

File

classes/group_role.controller.inc, line 92
Defines the Entity API CRUD class for group roles.

Class

GroupRoleController
Controller for group role entities.

Code

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

  // Provide defaults that are needed in group_role_form().
  $values += array(
    'type' => '',
    'name' => '',
    'label' => '',
    'global' => 1,
    'permissions' => array(),
  );
  return parent::create($values);
}