You are here

public function WebformWorkflowStateController::create in Webform Workflow 7

Overrides parent::create().

Overrides EntityAPIController::create

File

includes/webform_workflow_state.controller.inc, line 12
Entity controller for a webform workflow state.

Class

WebformWorkflowStateController
@file Entity controller for a webform workflow state.

Code

public function create(array $values = array()) {
  $default_values = array(
    'wsid' => NULL,
    'uid' => NULL,
    'label' => NULL,
    'color' => NULL,
    'permissions' => array(),
    'created' => NULL,
    'changed' => NULL,
  );

  // Overwrite default values with supplied values.
  $values = array_merge($default_values, $values);
  $values['permissions'] += $this
    ->getPermissionsDefaults();
  return parent::create($values);
}