[1.0.0-alpha2] Handle icon id and friendly name

Created on 8 August 2024, 3 months ago
Updated 26 August 2024, 3 months ago

Problem/Motivation

Currently he icon_id is used as name, with related getName() method. And it's used to create the id as iconset_id:icon_id.
We have getId() and getName() methods, but name is always icon_id.

Proposed resolution

Change IconDefinition constructor with $id instead of $name and add/adpat:

getId(): return $this->getIconsetId() . ':' . $this->getIconId();
getIconId(): return $this->id;

Create a new getName() that will generate friendly name from id, ie replace '-_' by space, ucFirst all words.

Data model changes

Update the IconDefinitionInterface, currently IconDefinition is internal but not final to allow unit test without bypass.

📌 Task
Status

Fixed

Version

1.0

Component

Code

Created by

🇫🇷France mogtofu33

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