public static function FieldConfig::loadByName in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/field/src/Entity/FieldConfig.php \Drupal\field\Entity\FieldConfig::loadByName()
Loads a field config entity based on the entity type and field name.
Parameters
string $entity_type_id: ID of the entity type.
string $bundle: Bundle name.
string $field_name: Name of the field.
Return value
static The field config entity if one exists for the provided field name, otherwise NULL.
42 calls to FieldConfig::loadByName()
- block_content_add_body_field in core/
modules/ block_content/ block_content.module - Adds the default body field to a custom block type.
- BulkDeleteTest::testDeleteField in core/
modules/ field/ src/ Tests/ BulkDeleteTest.php - Verify that deleting a field leaves the field data items in the database and that the appropriate Field API functions can operate on the deleted data and field definition.
- BulkDeleteTest::testPurgeField in core/
modules/ field/ src/ Tests/ BulkDeleteTest.php - Verify that field data items and fields are purged when a field storage is deleted.
- BulkDeleteTest::testPurgeFieldStorage in core/
modules/ field/ src/ Tests/ BulkDeleteTest.php - Verify that field storages are preserved and purged correctly as multiple fields are deleted and purged.
- CommentCacheTagsTest::createEntity in core/
modules/ comment/ src/ Tests/ CommentCacheTagsTest.php - Creates the entity to be tested.
File
- core/
modules/ field/ src/ Entity/ FieldConfig.php, line 345 - Contains \Drupal\field\Entity\FieldConfig.
Class
- FieldConfig
- Defines the Field entity.
Namespace
Drupal\field\EntityCode
public static function loadByName($entity_type_id, $bundle, $field_name) {
return \Drupal::entityManager()
->getStorage('field_config')
->load($entity_type_id . '.' . $bundle . '.' . $field_name);
}