Use entity type labels for user-facing operations

Created on 28 February 2024, 10 months ago
Updated 14 March 2024, 9 months ago

Problem/Motivation

We have non-technical users and we customise the entity type label of a few entity types (Eg a Group is a Committee). Microcontent is a declaration.

/**
 * Implements hook_entity_type_alter().
 */
function foo_entity_type_alter(array &$entity_types) {
  if (isset($entity_types['microcontent'])) {
    $entity_types['microcontent']->set('label_singular', new TranslatableMarkUP('Declaration'));
    $entity_types['microcontent']->set('label_plural', new TranslatableMarkUP('Declarations'));
  }
}

I would like to modify the entity form to use the label when displaying messages to the user interface.

Steps to reproduce

Proposed resolution

Small MR

Remaining tasks

User interface changes

API changes

Data model changes

✨ Feature request
Status

Fixed

Component

Code

Created by

πŸ‡¦πŸ‡ΊAustralia sime Melbourne

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024