You are here

public function GroupTypeController::create in Group 7

Create a group type.

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

Parameters

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

Return value

GroupType A new GroupType instance.

Overrides EntityAPIController::create

File

classes/group_type.controller.inc, line 110
Defines the Entity API CRUD class for group types.

Class

GroupTypeController
Controller for group type entities.

Code

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

  // Provide defaults that are needed in group_type_form().
  $values += array(
    'name' => '',
    'label' => '',
    'anonymous_permissions' => array(),
    'outsider_permissions' => array(),
    'member_permissions' => array(),
    'config' => array(),
  );
  return parent::create($values);
}