getFieldSettingsSummary example

return $header + parent::buildHeader();
  }

  /** * {@inheritdoc} */
  public function buildRow(EntityInterface $field_config) {
    /** @var \Drupal\field\FieldConfigInterface $field_config */
    $field_storage = $field_config->getFieldStorageDefinition();

    $storage_summary = $this->fieldTypeManager->getStorageSettingsSummary($field_storage);
    $instance_summary = $this->fieldTypeManager->getFieldSettingsSummary($field_config);
    $summary_list = [...$storage_summary, ...$instance_summary];

    $settings_summary = [
      'data' => [
        '#theme' => 'item_list',
        '#items' => [
          $this->fieldTypeManager->getDefinitions()[$field_storage->getType()]['label'],
          ...$summary_list,
        ],
      ],
      'class' => ['field-settings-summary-cell'],
    ];
Home | Imprint | This part of the site doesn't use cookies.