function EntityViewModeResourceTestBase::createEntity
Same name in other branches
- 9 core/tests/Drupal/FunctionalTests/Rest/EntityViewModeResourceTestBase.php \Drupal\FunctionalTests\Rest\EntityViewModeResourceTestBase::createEntity()
- 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()
Overrides EntityResourceTestBase::createEntity
File
-
core/
tests/ Drupal/ FunctionalTests/ Rest/ EntityViewModeResourceTestBase.php, line 39
Class
Namespace
Drupal\FunctionalTests\RestCode
protected function createEntity() {
$entity_view_mode = EntityViewMode::create([
'id' => 'user.test',
'label' => 'Test',
'description' => '',
'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.