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

Breadcrumb

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

function FieldConfig::postCreate

Overrides FieldConfigBase::postCreate

File

core/modules/field/src/Entity/FieldConfig.php, line 148

Class

FieldConfig
Defines the Field entity.

Namespace

Drupal\field\Entity

Code

public function postCreate(EntityStorageInterface $storage) {
    parent::postCreate($storage);
    // Validate that we have a valid storage for this field. This throws an
    // exception if the storage is invalid.
    $this->getFieldStorageDefinition();
    // 'Label' defaults to the field name (mostly useful for fields created in
    // tests).
    if (empty($this->label)) {
        $this->label = $this->getName();
    }
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal