You are here

public function TestEntityType::setKey in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/views/tests/src/Unit/EntityViewsDataTest.php \Drupal\Tests\views\Unit\TestEntityType::setKey()

Sets a specific entity key.

Parameters

string $key: The name of the entity key.

string $value: The new value of the key.

Return value

$this

File

core/modules/views/tests/src/Unit/EntityViewsDataTest.php, line 1192
Contains \Drupal\Tests\views\Unit\EntityViewsDataTest.

Class

TestEntityType

Namespace

Drupal\Tests\views\Unit

Code

public function setKey($key, $value) {
  $this->entity_keys[$key] = $value;
  return $this;
}