public static FieldStorageConfig::loadByName($entity_type_id, $field_name)
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.
File
- core/modules/field/src/Entity/FieldStorageConfig.php, line 798
Class
- FieldStorageConfig
- Defines the Field storage configuration entity.
Namespace
Drupal\field\Entity
Code
1 2 3 | public static function loadByName( $entity_type_id , $field_name ) { return \Drupal::entityManager()->getStorage( 'field_storage_config' )->load( $entity_type_id . '.' . $field_name ); } |
Please login to continue.