function FieldStorageConfigResourceTestBase::createEntity
Same name in other branches
- 9 core/modules/field/tests/src/Functional/Rest/FieldStorageConfigResourceTestBase.php \Drupal\Tests\field\Functional\Rest\FieldStorageConfigResourceTestBase::createEntity()
- 8.9.x core/modules/field/tests/src/Functional/Rest/FieldStorageConfigResourceTestBase.php \Drupal\Tests\field\Functional\Rest\FieldStorageConfigResourceTestBase::createEntity()
- 11.x core/modules/field/tests/src/Functional/Rest/FieldStorageConfigResourceTestBase.php \Drupal\Tests\field\Functional\Rest\FieldStorageConfigResourceTestBase::createEntity()
Overrides EntityResourceTestBase::createEntity
File
-
core/
modules/ field/ tests/ src/ Functional/ Rest/ FieldStorageConfigResourceTestBase.php, line 37
Class
Namespace
Drupal\Tests\field\Functional\RestCode
protected function createEntity() {
$field_storage = FieldStorageConfig::create([
'field_name' => 'true_llama',
'entity_type' => 'node',
'type' => 'boolean',
]);
$field_storage->save();
return $field_storage;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.