Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. BaseFieldOverride.php

function BaseFieldOverride::loadByName

Loads a base field bundle override config entity.

Parameters

string $entity_type_id: ID of the entity type.

string $bundle: Bundle name.

string $field_name: Name of the field.

Return value

\Drupal\Core\Field\FieldConfigInterface|null The base field bundle override config entity if one exists for the provided field name, otherwise NULL.

1 call to BaseFieldOverride::loadByName()
BaseFieldDefinition::getConfig in core/lib/Drupal/Core/Field/BaseFieldDefinition.php
Gets an object that can be saved in configuration.

File

core/lib/Drupal/Core/Field/Entity/BaseFieldOverride.php, line 264

Class

BaseFieldOverride
Defines the base field override entity.

Namespace

Drupal\Core\Field\Entity

Code

public static function loadByName($entity_type_id, $bundle, $field_name) {
    return \Drupal::entityTypeManager()->getStorage('base_field_override')
        ->load($entity_type_id . '.' . $bundle . '.' . $field_name);
}
RSS feed
Powered by Drupal