function EntityTest::getOwner

Same name in other branches
  1. 9 core/modules/system/tests/modules/entity_test/src/Entity/EntityTest.php \Drupal\entity_test\Entity\EntityTest::getOwner()
  2. 8.9.x core/modules/system/tests/modules/entity_test/src/Entity/EntityTest.php \Drupal\entity_test\Entity\EntityTest::getOwner()
  3. 10 core/modules/system/tests/modules/entity_test/src/Entity/EntityTest.php \Drupal\entity_test\Entity\EntityTest::getOwner()

Overrides EntityOwnerInterface::getOwner

File

core/modules/system/tests/modules/entity_test/src/Entity/EntityTest.php, line 119

Class

EntityTest
Defines the test entity class.

Namespace

Drupal\entity_test\Entity

Code

public function getOwner() {
    return $this->get('user_id')->entity;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.