Node::load calls should be avoided in classes, use dependency injection instead

Created on 6 June 2023, about 1 year ago

Problem/Motivation

The following files give the error as mentioned in the title:
BookBlocksTOCBlock.php,
BookBlocksNavigationBlock.php,
BookBlocksEditBlock.php,
BookBlocksChildrenBlock.php.

Steps to reproduce

Run the phpcs command on the module.

Proposed resolution

Inject the entity type manager service and use that instead.

Remaining tasks

User interface changes

API changes

Data model changes

📌 Task
Status

Fixed

Version

1.8

Component

Code

Created by

🇮🇳India sidharth_soman Bangalore

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

Comments & Activities

Production build 0.69.0 2024