Skip to main content
Hostdog docs
Documentation & API reference
Main menu
Drupal 7
Drupal 8
Drupal 9
You are here
Home
»
API reference
»
Drupal 8.x
»
field.crud.inc
»
field_create_field
Search Drupal 8.x
Function, class, file, topic, etc.
*
Partial match search is supported
API Navigation
Drupal 8.x
Topics
Classes
Functions
Files
Namespaces
Services
Constants
Globals
Deprecated
121 calls to field_create_field()
ActiveTest::testActive
in drupal/
core/
modules/
field/
lib/
Drupal/
field/
Tests/
ActiveTest.php
Test that fields are properly marked active or inactive.
ArbitraryRebuildTest::setUp
in drupal/
core/
modules/
system/
lib/
Drupal/
system/
Tests/
Form/
ArbitraryRebuildTest.php
Sets up a Drupal site for running functional and integration tests.
BulkDeleteTest::setUp
in drupal/
core/
modules/
field/
lib/
Drupal/
field/
Tests/
BulkDeleteTest.php
Set the default field storage backend for fields created during tests.
ContactFieldsTest::setUp
in drupal/
core/
modules/
contact/
lib/
Drupal/
contact/
Tests/
Views/
ContactFieldsTest.php
Sets up a Drupal site for running functional and integration tests.
CrudTest::testCreateField
in drupal/
core/
modules/
field/
lib/
Drupal/
field/
Tests/
CrudTest.php
Test the creation of a field.
CrudTest::testCreateFieldFail
in drupal/
core/
modules/
field/
lib/
Drupal/
field/
Tests/
CrudTest.php
Test failure to create a field.
CrudTest::testDeleteField
in drupal/
core/
modules/
field/
lib/
Drupal/
field/
Tests/
CrudTest.php
Test the deletion of a field.
CrudTest::testFieldIndexes
in drupal/
core/
modules/
field/
lib/
Drupal/
field/
Tests/
CrudTest.php
Test creation of indexes on data column.
CrudTest::testReadField
in drupal/
core/
modules/
field/
lib/
Drupal/
field/
Tests/
CrudTest.php
Tests reading a single field definition.
CrudTest::testReadFields
in drupal/
core/
modules/
field/
lib/
Drupal/
field/
Tests/
CrudTest.php
Tests reading field definitions.
CrudTest::testUpdateField
in drupal/
core/
modules/
field/
lib/
Drupal/
field/
Tests/
CrudTest.php
Test updating a field.
CrudTest::testUpdateFieldForbid
in drupal/
core/
modules/
field/
lib/
Drupal/
field/
Tests/
CrudTest.php
Test field type modules forbidding an update.
CrudTest::testUpdateFieldType
in drupal/
core/
modules/
field/
lib/
Drupal/
field/
Tests/
CrudTest.php
CustomBlockFieldTest::testBlockFields
in drupal/
core/
modules/
block/
custom_block/
lib/
Drupal/
custom_block/
Tests/
CustomBlockFieldTest.php
Checks block edit functionality.
custom_block_add_body_field
in drupal/
core/
modules/
block/
custom_block/
custom_block.module
Adds the default body field to a custom block type.
DatetimeFieldTest::setUp
in drupal/
core/
modules/
datetime/
lib/
Drupal/
datetime/
Tests/
DatetimeFieldTest.php
Sets up a Drupal site for running functional and integration tests.
DefaultViewsTest::setUp
in drupal/
core/
modules/
views/
lib/
Drupal/
views/
Tests/
DefaultViewsTest.php
Sets up a Drupal site for running functional and integration tests.
DisplayApiTest::setUp
in drupal/
core/
modules/
field/
lib/
Drupal/
field/
Tests/
DisplayApiTest.php
Set the default field storage backend for fields created during tests.
DrupalUnitTestBaseTest::testEnableModulesFixedList
in drupal/
core/
modules/
simpletest/
lib/
Drupal/
simpletest/
Tests/
DrupalUnitTestBaseTest.php
Tests that the module list is retained after enabling/installing/disabling modules.
EditTestBase::createFieldWithInstance
in drupal/
core/
modules/
edit/
lib/
Drupal/
edit/
Tests/
EditTestBase.php
Creates a field and an instance of it.
EmailFieldTest::testEmailField
in drupal/
core/
modules/
email/
lib/
Drupal/
email/
Tests/
EmailFieldTest.php
Tests e-mail field.
EmailItemTest::setUp
in drupal/
core/
modules/
email/
lib/
Drupal/
email/
Tests/
EmailItemTest.php
Set the default field storage backend for fields created during tests.
EntityDisplayTest::testFieldComponent
in drupal/
core/
modules/
entity/
lib/
Drupal/
entity/
Tests/
EntityDisplayTest.php
Tests the behavior of a field component within an EntityDisplay object.
EntityFormDisplayTest::testFieldComponent
in drupal/
core/
modules/
entity/
lib/
Drupal/
entity/
Tests/
EntityFormDisplayTest.php
Tests the behavior of a field component within an EntityFormDisplay object.
EntityQueryAggregateTest::setUp
in drupal/
core/
modules/
system/
lib/
Drupal/
system/
Tests/
Entity/
EntityQueryAggregateTest.php
Sets up Drupal unit test environment.
EntityQueryRelationshipTest::setUp
in drupal/
core/
modules/
system/
lib/
Drupal/
system/
Tests/
Entity/
EntityQueryRelationshipTest.php
Sets up Drupal unit test environment.
EntityQueryTest::setUp
in drupal/
core/
modules/
system/
lib/
Drupal/
system/
Tests/
Entity/
EntityQueryTest.php
Sets up Drupal unit test environment.
EntityReferenceAutoCreateTest::setUp
in drupal/
core/
modules/
entity_reference/
lib/
Drupal/
entity_reference/
Tests/
EntityReferenceAutoCreateTest.php
Sets up a Drupal site for running functional and integration tests.
EntityReferenceSelectionSortTest::testSort
in drupal/
core/
modules/
entity_reference/
lib/
Drupal/
entity_reference/
Tests/
EntityReferenceSelectionSortTest.php
Assert sorting by field and property.
EntityResolverTest::setUp
in drupal/
core/
modules/
serialization/
lib/
Drupal/
serialization/
Tests/
EntityResolverTest.php
Sets up Drupal unit test environment.
EntityTranslationSyncImageTest::setupTestFields
in drupal/
core/
modules/
translation_entity/
lib/
Drupal/
translation_entity/
Tests/
EntityTranslationSyncImageTest.php
Creates the test image field.
EntityTranslationTest::setUp
in drupal/
core/
modules/
system/
lib/
Drupal/
system/
Tests/
Entity/
EntityTranslationTest.php
Sets up Drupal unit test environment.
EntityTranslationTestBase::setupTestFields
in drupal/
core/
modules/
translation_entity/
lib/
Drupal/
translation_entity/
Tests/
EntityTranslationTestBase.php
Creates the test fields.
entity_reference_create_instance
in drupal/
core/
modules/
entity_reference/
entity_reference.module
Creates an instance of a entity reference field on the specified bundle.
entity_test_install
in drupal/
core/
modules/
system/
tests/
modules/
entity_test/
entity_test.install
Implements
hook_install
().
FieldAccessTest::setUp
in drupal/
core/
modules/
field/
lib/
Drupal/
field/
Tests/
FieldAccessTest.php
Sets up a Drupal site for running functional and integration tests.
FieldAttachStorageTest::testEntityDeleteBundle
in drupal/
core/
modules/
field/
lib/
Drupal/
field/
Tests/
FieldAttachStorageTest.php
Test entity_bundle_delete().
FieldAttachStorageTest::testFieldAttachLoadMultiple
in drupal/
core/
modules/
field/
lib/
Drupal/
field/
Tests/
FieldAttachStorageTest.php
Test the 'multiple' load feature.
FieldAttachStorageTest::testFieldAttachSaveLoadDifferentStorage
in drupal/
core/
modules/
field/
lib/
Drupal/
field/
Tests/
FieldAttachStorageTest.php
Test saving and loading fields using different storage backends.
FieldAttachStorageTest::testFieldStorageDetailsAlter
in drupal/
core/
modules/
field/
lib/
Drupal/
field/
Tests/
FieldAttachStorageTest.php
Test storage details alteration.
FieldInfoTest::testFieldInfo
in drupal/
core/
modules/
field/
lib/
Drupal/
field/
Tests/
FieldInfoTest.php
Test that field types and field definitions are correctly cached.
FieldInfoTest::testFieldInfoCache
in drupal/
core/
modules/
field/
lib/
Drupal/
field/
Tests/
FieldInfoTest.php
Tests that the field info cache can be built correctly.
FieldInfoTest::testFieldMap
in drupal/
core/
modules/
field/
lib/
Drupal/
field/
Tests/
FieldInfoTest.php
Test
field_info_field_map
().
FieldInfoTest::testFieldPrepare
in drupal/
core/
modules/
field/
lib/
Drupal/
field/
Tests/
FieldInfoTest.php
Test that cached field definitions are ready for current runtime context.
FieldInfoTest::testInstanceDisabledEntityType
in drupal/
core/
modules/
field/
lib/
Drupal/
field/
Tests/
FieldInfoTest.php
Test that instances on disabled entity types are filtered out.
FieldInfoTest::testInstancePrepare
in drupal/
core/
modules/
field/
lib/
Drupal/
field/
Tests/
FieldInfoTest.php
Test that cached instance definitions are ready for current runtime context.
FieldInstanceCrudTest::setUp
in drupal/
core/
modules/
field/
lib/
Drupal/
field/
Tests/
FieldInstanceCrudTest.php
Set the default field storage backend for fields created during tests.
FieldInstanceCrudTest::testCreateFieldInstance
in drupal/
core/
modules/
field/
lib/
Drupal/
field/
Tests/
FieldInstanceCrudTest.php
Test the creation of a field instance.
FieldSqlStorageTest::setUp
in drupal/
core/
modules/
field_sql_storage/
lib/
Drupal/
field_sql_storage/
Tests/
FieldSqlStorageTest.php
Sets up Drupal unit test environment.
FieldSqlStorageTest::testFieldSqlStorageForeignKeys
in drupal/
core/
modules/
field_sql_storage/
lib/
Drupal/
field_sql_storage/
Tests/
FieldSqlStorageTest.php
Test foreign key support.
FieldSqlStorageTest::testFieldUpdateFailure
in drupal/
core/
modules/
field_sql_storage/
lib/
Drupal/
field_sql_storage/
Tests/
FieldSqlStorageTest.php
Test that failure to create fields is handled gracefully.
FieldSqlStorageTest::testFieldUpdateIndexesWithData
in drupal/
core/
modules/
field_sql_storage/
lib/
Drupal/
field_sql_storage/
Tests/
FieldSqlStorageTest.php
Test adding and removing indexes while data is present.
FieldSqlStorageTest::testUpdateFieldSchemaWithData
in drupal/
core/
modules/
field_sql_storage/
lib/
Drupal/
field_sql_storage/
Tests/
FieldSqlStorageTest.php
Test trying to update a field with data.
FieldTestBase::setUpFields
in drupal/
core/
modules/
field/
lib/
Drupal/
field/
Tests/
Views/
FieldTestBase.php
FieldUnitTestBase::createFieldWithInstance
in drupal/
core/
modules/
field/
lib/
Drupal/
field/
Tests/
FieldUnitTestBase.php
Create a field and an instance of it.
FileFieldTestBase::createFileField
in drupal/
core/
modules/
file/
lib/
Drupal/
file/
Tests/
FileFieldTestBase.php
Creates a new file field.
FileItemTest::setUp
in drupal/
core/
modules/
file/
lib/
Drupal/
file/
Tests/
FileItemTest.php
Set the default field storage backend for fields created during tests.
FormTest::testFieldFormAccess
in drupal/
core/
modules/
field/
lib/
Drupal/
field/
Tests/
FormTest.php
Tests fields with no 'edit' access.
FormTest::testFieldFormDefaultValue
in drupal/
core/
modules/
field/
lib/
Drupal/
field/
Tests/
FormTest.php
Tests field widget default values on entity forms.
FormTest::testFieldFormHiddenWidget
in drupal/
core/
modules/
field/
lib/
Drupal/
field/
Tests/
FormTest.php
Tests the Hidden widget.
FormTest::testFieldFormJSAddMore
in drupal/
core/
modules/
field/
lib/
Drupal/
field/
Tests/
FormTest.php
FormTest::testFieldFormMultipleWidget
in drupal/
core/
modules/
field/
lib/
Drupal/
field/
Tests/
FormTest.php
Tests widgets handling multiple values.
FormTest::testFieldFormMultivalueWithRequiredRadio
in drupal/
core/
modules/
field/
lib/
Drupal/
field/
Tests/
FormTest.php
Tests widget handling of multiple required radios.
FormTest::testFieldFormSingle
in drupal/
core/
modules/
field/
lib/
Drupal/
field/
Tests/
FormTest.php
FormTest::testFieldFormSingleRequired
in drupal/
core/
modules/
field/
lib/
Drupal/
field/
Tests/
FormTest.php
FormTest::testFieldFormUnlimited
in drupal/
core/
modules/
field/
lib/
Drupal/
field/
Tests/
FormTest.php
FormTest::testNestedFieldForm
in drupal/
core/
modules/
field/
lib/
Drupal/
field/
Tests/
FormTest.php
Tests Field API form integration within a subform.
forum_enable
in drupal/
core/
modules/
forum/
forum.install
Implements
hook_enable
().
HandlerFieldFieldTest::setUp
in drupal/
core/
modules/
field/
lib/
Drupal/
field/
Tests/
Views/
HandlerFieldFieldTest.php
@todo.
ImageFieldTestBase::createImageField
in drupal/
core/
modules/
image/
lib/
Drupal/
image/
Tests/
ImageFieldTestBase.php
Create a new image field.
ImageItemTest::setUp
in drupal/
core/
modules/
image/
lib/
Drupal/
image/
Tests/
ImageItemTest.php
Set the default field storage backend for fields created during tests.
LinkFieldTest::testLinkFormatter
in drupal/
core/
modules/
link/
lib/
Drupal/
link/
Tests/
LinkFieldTest.php
Tests the default 'link' formatter.
LinkFieldTest::testLinkSeparateFormatter
in drupal/
core/
modules/
link/
lib/
Drupal/
link/
Tests/
LinkFieldTest.php
Tests the 'link_separate' formatter.
LinkFieldTest::testLinkTitle
in drupal/
core/
modules/
link/
lib/
Drupal/
link/
Tests/
LinkFieldTest.php
Tests the link title settings of a link field.
LinkFieldTest::testURLValidation
in drupal/
core/
modules/
link/
lib/
Drupal/
link/
Tests/
LinkFieldTest.php
Tests link field URL validation.
LinkItemTest::setUp
in drupal/
core/
modules/
link/
lib/
Drupal/
link/
Tests/
LinkItemTest.php
Set the default field storage backend for fields created during tests.
ManageFieldsTest::setUp
in drupal/
core/
modules/
field_ui/
lib/
Drupal/
field_ui/
Tests/
ManageFieldsTest.php
Sets up a Drupal site for running functional and integration tests.
ManageFieldsTest::testDefaultValue
in drupal/
core/
modules/
field_ui/
lib/
Drupal/
field_ui/
Tests/
ManageFieldsTest.php
Tests that default value is correctly validated and saved.
ManageFieldsTest::testHiddenFields
in drupal/
core/
modules/
field_ui/
lib/
Drupal/
field_ui/
Tests/
ManageFieldsTest.php
Tests that Field UI respects the 'no_ui' option in
hook_field_info
().
MultiFormTest::setUp
in drupal/
core/
modules/
system/
lib/
Drupal/
system/
Tests/
Ajax/
MultiFormTest.php
Sets up a Drupal site for running functional and integration tests.
MultiStepNodeFormBasicOptionsTest::testMultiStepNodeFormBasicOptions
in drupal/
core/
modules/
node/
lib/
Drupal/
node/
Tests/
MultiStepNodeFormBasicOptionsTest.php
Tests changing the default values of basic options to ensure they persist.
NodeAccessFieldTest::setUp
in drupal/
core/
modules/
node/
lib/
Drupal/
node/
Tests/
NodeAccessFieldTest.php
Sets up a Drupal site for running functional and integration tests.
node_access_test_language_enable
in drupal/
core/
modules/
node/
tests/
modules/
node_access_test_language/
node_access_test_language.module
Implements
hook_enable
().
node_add_body_field
in drupal/
core/
modules/
node/
node.module
Adds the default body field to a node type.
NormalizerTestBase::setUp
in drupal/
core/
modules/
serialization/
lib/
Drupal/
serialization/
Tests/
NormalizerTestBase.php
Sets up Drupal unit test environment.
NormalizerTestBase::setUp
in drupal/
core/
modules/
hal/
lib/
Drupal/
hal/
Tests/
NormalizerTestBase.php
Overrides
\Drupal\simpletest\DrupalUnitTestBase::setup
().
NumberFieldTest::testNumberDecimalField
in drupal/
core/
modules/
number/
lib/
Drupal/
number/
Tests/
NumberFieldTest.php
Test number_decimal field.
NumberItemTest::setUp
in drupal/
core/
modules/
number/
lib/
Drupal/
number/
Tests/
NumberItemTest.php
Set the default field storage backend for fields created during tests.
OptionsDynamicValuesTest::setUp
in drupal/
core/
modules/
options/
lib/
Drupal/
options/
Tests/
OptionsDynamicValuesTest.php
Sets up a Drupal site for running functional and integration tests.
OptionsFieldTest::testUpdateAllowedValues
in drupal/
core/
modules/
options/
lib/
Drupal/
options/
Tests/
OptionsFieldTest.php
Test that allowed values can be updated.
OptionsFieldUITest::createOptionsField
in drupal/
core/
modules/
options/
lib/
Drupal/
options/
Tests/
OptionsFieldUITest.php
Helper function to create list field of a given type.
OptionsWidgetsTest::setUp
in drupal/
core/
modules/
options/
lib/
Drupal/
options/
Tests/
OptionsWidgetsTest.php
Sets up a Drupal site for running functional and integration tests.
PagePreviewTest::setUp
in drupal/
core/
modules/
node/
lib/
Drupal/
node/
Tests/
PagePreviewTest.php
Sets up a Drupal site for running functional and integration tests.
RdfaMarkupTest::testAttributesInMarkupFile
in drupal/
core/
modules/
rdf/
lib/
Drupal/
rdf/
Tests/
RdfaMarkupTest.php
Tests if file fields in teasers have correct resources.
RebuildTest::testPreserveFormActionAfterAJAX
in drupal/
core/
modules/
system/
lib/
Drupal/
system/
Tests/
Form/
RebuildTest.php
Tests that a form's action is retained after an Ajax submission.
RssTest::setUp
in drupal/
core/
modules/
taxonomy/
lib/
Drupal/
taxonomy/
Tests/
RssTest.php
Sets up a Drupal site for running functional and integration tests.
ShapeItemTest::setUp
in drupal/
core/
modules/
field/
lib/
Drupal/
field/
Tests/
ShapeItemTest.php
Set the default field storage backend for fields created during tests.
TaggedWithTest::setUp
in drupal/
core/
modules/
views/
lib/
Drupal/
views/
Tests/
Wizard/
TaggedWithTest.php
Sets up a Drupal site for running functional and integration tests.
TaxonomyTermReferenceItemTest::setUp
in drupal/
core/
modules/
taxonomy/
lib/
Drupal/
taxonomy/
Tests/
TaxonomyTermReferenceItemTest.php
Set the default field storage backend for fields created during tests.
TaxonomyTestBase::mockStandardInstall
in drupal/
core/
modules/
taxonomy/
lib/
Drupal/
taxonomy/
Tests/
Views/
TaxonomyTestBase.php
Provides a workaround for the inability to use the standard profile.
TelephoneFieldTest::testTelephoneField
in drupal/
core/
modules/
telephone/
lib/
Drupal/
telephone/
Tests/
TelephoneFieldTest.php
Helper function for testTelephoneField().
TelephoneItemTest::setUp
in drupal/
core/
modules/
telephone/
lib/
Drupal/
telephone/
Tests/
TelephoneItemTest.php
Set the default field storage backend for fields created during tests.
TermFieldMultipleVocabularyTest::setUp
in drupal/
core/
modules/
taxonomy/
lib/
Drupal/
taxonomy/
Tests/
TermFieldMultipleVocabularyTest.php
Sets up a Drupal site for running functional and integration tests.
TermFieldTest::setUp
in drupal/
core/
modules/
taxonomy/
lib/
Drupal/
taxonomy/
Tests/
TermFieldTest.php
Sets up a Drupal site for running functional and integration tests.
TermIndexTest::setUp
in drupal/
core/
modules/
taxonomy/
lib/
Drupal/
taxonomy/
Tests/
TermIndexTest.php
Sets up a Drupal site for running functional and integration tests.
TermTest::setUp
in drupal/
core/
modules/
taxonomy/
lib/
Drupal/
taxonomy/
Tests/
TermTest.php
Sets up a Drupal site for running functional and integration tests.
TestItemTest::setUp
in drupal/
core/
modules/
field/
lib/
Drupal/
field/
Tests/
TestItemTest.php
Set the default field storage backend for fields created during tests.
TextFieldTest::testTextFieldValidation
in drupal/
core/
modules/
text/
lib/
Drupal/
text/
Tests/
TextFieldTest.php
Test text field validation.
TextFieldTest::_testTextfieldWidgets
in drupal/
core/
modules/
text/
lib/
Drupal/
text/
Tests/
TextFieldTest.php
Helper function for testTextfieldWidgets().
TextFieldTest::_testTextfieldWidgetsFormatted
in drupal/
core/
modules/
text/
lib/
Drupal/
text/
Tests/
TextFieldTest.php
Helper function for testTextfieldWidgetsFormatted().
TextPlainUnitTest::setUp
in drupal/
core/
modules/
text/
lib/
Drupal/
text/
Tests/
Formatter/
TextPlainUnitTest.php
Sets up Drupal unit test environment.
TokenReplaceTest::setUp
in drupal/
core/
modules/
taxonomy/
lib/
Drupal/
taxonomy/
Tests/
TokenReplaceTest.php
Sets up a Drupal site for running functional and integration tests.
TranslationTest::setUp
in drupal/
core/
modules/
field/
lib/
Drupal/
field/
Tests/
TranslationTest.php
Set the default field storage backend for fields created during tests.
TranslationTest::testFieldDisplayLanguage
in drupal/
core/
modules/
field/
lib/
Drupal/
field/
Tests/
TranslationTest.php
Tests display language logic for translatable fields.
TranslationTest::testTranslatableFieldSaveLoad
in drupal/
core/
modules/
field/
lib/
Drupal/
field/
Tests/
TranslationTest.php
Test translatable fields storage/retrieval.
TranslationWebTest::setUp
in drupal/
core/
modules/
field/
lib/
Drupal/
field/
Tests/
TranslationWebTest.php
Sets up a Drupal site for running functional and integration tests.
UserRegistrationTest::testRegistrationWithUserFields
in drupal/
core/
modules/
user/
lib/
Drupal/
user/
Tests/
UserRegistrationTest.php
Tests Field API fields on user registration forms.
user_install_picture_field
in drupal/
core/
modules/
user/
user.install
Creates a user picture image field for the User entity.
VocabularyUnitTest::testTaxonomyVocabularyChangeMachineName
in drupal/
core/
modules/
taxonomy/
lib/
Drupal/
taxonomy/
Tests/
VocabularyUnitTest.php
Tests that machine name changes are properly reflected.
VocabularyUnitTest::testUninstallReinstall
in drupal/
core/
modules/
taxonomy/
lib/
Drupal/
taxonomy/
Tests/
VocabularyUnitTest.php
Test uninstall and reinstall of the taxonomy module.
_comment_body_field_create
in drupal/
core/
modules/
comment/
comment.module
Creates a comment_body field instance for a given node type.