You are here

public function PartyActivityController::create in Party 7

Same name and namespace in other branches
  1. 8.2 modules/party_activity/party_activity.entity.inc \PartyActivityController::create()

Create a PartyActivity - we first set up the values that are specific to our party_activity schema

Overrides EntityAPIController::create

File

modules/party_activity/party_activity.entity.inc, line 30
Entity and Controller classes for the Party Activity entity

Class

PartyActivityController
The controller class for Party Activities

Code

public function create(array $values = array()) {
  global $user;
  $values += array(
    'id' => '',
    'is_new' => TRUE,
    'title' => '',
    'user' => $user->uid,
    'created' => REQUEST_TIME,
    'modified' => REQUEST_TIME,
  );
  $activity = parent::create($values);

  // @todo: Move this somewhere more general?
  $this
    ->invoke('create', $activity);
  return $activity;
}