Show bundle and field descriptions in pathbuilder

Created on 1 February 2024, 10 months ago

Problem/Motivation

Show bundle and field description in the pathbuilder, maybe via title attribute? This could be result in a lag of performance, if we load it every time, so maybe we could cache this? If we recreate a field, the descriptions will be gone, so we may have to store and sync it anyway.

API changes

Maybe useful

  public function getArticleBundleDescription() {
    $entity_type_bundle_info = \Drupal::service('entity_type.bundle.info');
    $bundles = $entity_type_bundle_info->getBundleInfo('wisski_individual');
    return $bundles['bf698b4afd5b65582c6a9039a8e64dd8']['description'] ?? '';
  }

use Drupal\field\Entity\FieldConfig;

  public function getFieldDescription() {
    $field_config = FieldConfig::loadByName('wisski_individual', 'bf698b4afd5b65582c6a9039a8e64dd8', 'f3d1f52ebbb68aa7539ee9843821baa8');
    return $field_config->getDescription();
  }
📌 Task
Status

Active

Version

3.0

Component

User interface

Created by

🇩🇪Germany rnsrk

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024