protected function EntityViewModeResourceTestBase::createEntity in Drupal 10
Same name and namespace in other branches
- 8 core/tests/Drupal/FunctionalTests/Rest/EntityViewModeResourceTestBase.php \Drupal\FunctionalTests\Rest\EntityViewModeResourceTestBase::createEntity()
- 9 core/tests/Drupal/FunctionalTests/Rest/EntityViewModeResourceTestBase.php \Drupal\FunctionalTests\Rest\EntityViewModeResourceTestBase::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;
}