Rename tree terminology because of mismatch in meaning of Drupal nodes and Tree nodes

Created on 30 October 2024, 16 days ago

I think there is a need to refactor code and rename terminology used in this module because exists a mismatch between meaning od Drupal nodes and Tree nodes.

Reading code of this module is very confusing, e.g.

  public function getNodeId($entity) {
    return $entity->tid;
  }

When you see variables or methods or functions containing word 'node' but it is used in meaning element or item in rendered tree not content type is at least strange. In above example you see getting node id by returning tid (term id). What the heck is going on here? ;-)

Proposal:
Rename node'ish variables and methods not connected with Drupal entity type: node to element, item, leaf, parent, child terminology.

📌 Task
Status

Active

Version

2.4

Component

Code

Created by

🇵🇱Poland sebaz

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

Comments & Activities

Production build 0.71.5 2024