public static function FieldStorageConfig::loadByName in Zircon Profile 8.0
Same name and namespace in other branches
- 8 core/modules/field/src/Entity/FieldStorageConfig.php \Drupal\field\Entity\FieldStorageConfig::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 $field_name: Name of the field.
Return value
static The field config entity if one exists for the provided field name, otherwise NULL.
38 calls to FieldStorageConfig::loadByName()
- BlockContentFieldFilterTest::setUp in core/
modules/ block_content/ src/ Tests/ Views/ BlockContentFieldFilterTest.php - Sets up a Drupal site for running functional and integration tests.
- block_content_add_body_field in core/
modules/ block_content/ block_content.module - Adds the default body field to a custom block type.
- Comment::preCreate in core/
modules/ comment/ src/ Entity/ Comment.php - Changes the values of an entity before it is created.
- CommentFieldsTest::testCommentDefaultFields in core/
modules/ comment/ src/ Tests/ CommentFieldsTest.php - Tests that the default 'comment_body' field is correctly added.
- CommentFieldsTest::testCommentInstallAfterContentModule in core/
modules/ comment/ src/ Tests/ CommentFieldsTest.php - Tests that comment module works when installed after a content module.
File
- core/
modules/ field/ src/ Entity/ FieldStorageConfig.php, line 802 - Contains \Drupal\field\Entity\FieldStorageConfig.
Class
- FieldStorageConfig
- Defines the Field storage configuration entity.
Namespace
Drupal\field\EntityCode
public static function loadByName($entity_type_id, $field_name) {
return \Drupal::entityManager()
->getStorage('field_storage_config')
->load($entity_type_id . '.' . $field_name);
}