You are here

public function RelationStorage::create in Relation 8

Same name and namespace in other branches
  1. 8.2 src/RelationStorage.php \Drupal\relation\RelationStorage::create()

TODO, what's this?.

Overrides EntityStorageBase::create

File

src/RelationStorage.php, line 23
Contains \Drupal\relation\RelationStorage.

Class

RelationStorage
Relation controller class.

Namespace

Drupal\relation

Code

public function create(array $values = array()) {
  $account = \Drupal::currentUser();
  $values += array(
    'created' => REQUEST_TIME,
    'uid' => $account
      ->id(),
  );
  return parent::create($values);
}