1. drupal
    1. 8
    2. 7
7 – 8 field_info_instance($entity_type, $field_name, $bundle_name)

Returns an array of instance data for a specific field and bundle.


$entity_type The entity type for the instance.

$field_name The field name for the instance.

$bundle_name The bundle name for the instance.

Related topics

▾ 41 functions call field_info_instance()

CommentTokenReplaceTestCase::testCommentTokenReplacement in modules/comment/comment.test
Creates a comment, then tests the tokens generated from it.
comment_tokens in modules/comment/
Implements hook_tokens().
FieldAttachStorageTestCase::testFieldAttachCreateRenameBundle in modules/field/tests/field.test
Test field_attach_create_bundle() and field_attach_rename_bundle().
FieldAttachStorageTestCase::testFieldStorageDetailsAlter in modules/field/tests/field.test
Test storage details alteration.
FieldBulkDeleteTestCase::testDeleteFieldInstance in modules/field/tests/field.test
Verify that deleting an instance leaves the field data items in the database and that the appropriate Field API functions can operate on the deleted data and instance.
FieldBulkDeleteTestCase::testPurgeField in modules/field/tests/field.test
Verify that fields are preserved and purged correctly as multiple instances are deleted and purged.
FieldBulkDeleteTestCase::testPurgeInstance in modules/field/tests/field.test
Verify that field data items and instances are purged when an instance is deleted.
FieldInfoTestCase::testInstanceDisabledEntityType in modules/field/tests/field.test
Test that instances on disabled entity types are filtered out.
FieldInfoTestCase::testInstancePrepare in modules/field/tests/field.test
Test that cached instance definitions are ready for current runtime context.
FieldSqlStorageTestCase::testFieldStorageDetails in modules/field/modules/field_sql_storage/field_sql_storage.test
Test the storage details.
FieldUIManageDisplayTestCase::testFormatterUI in modules/field_ui/field_ui.test
Test formatter formatter settings.
FieldUIManageFieldsTestCase::assertFieldSettings in modules/field_ui/field_ui.test
Assert the field settings.
FieldUIManageFieldsTestCase::testDefaultValue in modules/field_ui/field_ui.test
Tests that default value is correctly validated and saved.
FieldUIManageFieldsTestCase::testDeleteField in modules/field_ui/field_ui.test
Tests that deletion removes fields and instances as expected.
field_delete_field in modules/field/
Marks a field and its instances and data for deletion.
field_ui_existing_field_options in modules/field_ui/
Return an array of existing field to be added to a bundle.
field_ui_field_delete_form_submit in modules/field_ui/
Removes a field instance from a bundle.
field_ui_field_overview_form in modules/field_ui/
Menu callback; listing of fields for a bundle.
field_ui_field_settings_form_submit in modules/field_ui/
Save a field's settings after editing.
field_ui_menu_load in modules/field_ui/field_ui.module
Menu loader; Load a field instance based on field and bundle name.
FileFieldDisplayTestCase::testNodeDisplay in modules/file/tests/file.test
Test normal formatter display on node display.
FileFieldRevisionTestCase::testRevisions in modules/file/tests/file.test
Test creating multiple revisions of a node and managing the attached files.
FileFieldTestCase::updateFileField in modules/file/tests/file.test
Update an existing file field with new settings.
FileFieldValidateTestCase::testFileExtension in modules/file/tests/file.test
Test the file extension, do additional checks if mimedetect is installed.
FileFieldValidateTestCase::testFileMaxSize in modules/file/tests/file.test
Test the max file size validator.
FileFieldValidateTestCase::testRequired in modules/file/tests/file.test
Test required property on file fields.
FileFieldWidgetTestCase::testMultiValuedWidget in modules/file/tests/file.test
Tests upload and remove buttons, with and without Ajax, for multiple multi-valued File field.
FileFieldWidgetTestCase::testPrivateFileSetting in modules/file/tests/file.test
Tests a file field with a "Private files" upload destination setting.
FileFieldWidgetTestCase::testSingleValuedWidget in modules/file/tests/file.test
Tests upload and remove buttons, with and without Ajax, for a single-valued File field.
FileTokenReplaceTestCase::testFileTokenReplacement in modules/file/tests/file.test
Creates a file, then tests the tokens generated from it.
ImageFieldDisplayTestCase::testImageFieldSettings in modules/image/image.test
Tests for image field settings.
ImageFieldDisplayTestCase::_testImageFieldFormatters in modules/image/image.test
Test image formatters on node display.
NodeTokenReplaceTestCase::testNodeTokenReplacement in modules/node/node.test
Creates a node, then tests the tokens generated from it.
NodeTypeTestCase::testNodeTypeEditing in modules/node/node.test
Test editing a node type using the UI.
node_add_body_field in modules/node/node.module
Add default body field to a node type.
node_example_install in examples/node_example/node_example.install
Implements hook_install().
node_tokens in modules/node/
Implements hook_tokens().
SummaryLengthTestCase::testSummaryLength in modules/node/node.test
Creates a node and then an anonymous and unpermissioned user attempt to edit the node.
TaxonomyVocabularyUnitTest::testTaxonomyVocabularyChangeMachineName in modules/taxonomy/taxonomy.test
Tests that machine name changes are properly reflected.
_field_invoke_get_instances in modules/field/
Helper for _field_invoke(): retrieves a list of instances to operate on.
_forum_node_check_node_type in modules/forum/forum.module
Check whether a content type can be used in a forum.


modules/field/, line 711

function field_info_instance($entity_type, $field_name, $bundle_name) {
  $info = _field_info_collate_fields();
  if (isset($info['instances'][$entity_type][$bundle_name][$field_name])) {
    return $info['instances'][$entity_type][$bundle_name][$field_name];