function EntityViewModeResourceTestBase::createEntity
Same name in other branches
- 8.9.x core/tests/Drupal/FunctionalTests/Rest/EntityViewModeResourceTestBase.php \Drupal\FunctionalTests\Rest\EntityViewModeResourceTestBase::createEntity()
- 10 core/tests/Drupal/FunctionalTests/Rest/EntityViewModeResourceTestBase.php \Drupal\FunctionalTests\Rest\EntityViewModeResourceTestBase::createEntity()
- 11.x core/tests/Drupal/FunctionalTests/Rest/EntityViewModeResourceTestBase.php \Drupal\FunctionalTests\Rest\EntityViewModeResourceTestBase::createEntity()
Overrides EntityResourceTestBase::createEntity
File
-
core/
tests/ Drupal/ FunctionalTests/ Rest/ EntityViewModeResourceTestBase.php, line 37
Class
Namespace
Drupal\FunctionalTests\RestCode
protected function createEntity() {
$entity_view_mode = EntityViewMode::create([
'id' => 'user.test',
'label' => 'Test',
'targetEntityType' => 'user',
]);
$entity_view_mode->save();
return $entity_view_mode;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.