Timeline for How to use dependency injection to load node data?
Current License: CC BY-SA 4.0
15 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jun 13, 2023 at 9:09 | history | reopened | avpaderno♦ | ||
May 25, 2023 at 14:02 | history | closed |
mona lisa Clive♦ entities Users with the entities badge or a synonym can single-handedly close entities questions as duplicates and reopen them as needed. |
Duplicate of Dependency injection to load node data | |
May 22, 2023 at 4:35 | vote | accept | Free Radical | ||
May 21, 2023 at 13:53 | comment | added | Kevin | amazon.com/Drupal-Development-Cookbook-experiences-applications/… | |
May 21, 2023 at 13:48 | comment | added | Kevin | Controllers have to return a Response object or a render array. You need to use xdebug if you want to step through and debug during development. Devel won't cut it here. You're getting that error because dpm doesn't halt execution for code inspection like xdebug would. | |
May 21, 2023 at 13:39 | history | edited | Free Radical | CC BY-SA 4.0 |
Explained how I arrived at a solution.
|
May 21, 2023 at 7:54 | comment | added | avpaderno♦ |
@cilefen It could be, but that should be a change that happened after adding ControllerBase as parent class, or Drupal could not first complain that Drupal\mymodule\Controller\MyModuleController::entityTypeManager() is an undefined method (which means Drupal found the Drupal\mymodule\Controller\MyModuleController class).
|
|
May 20, 2023 at 22:03 | comment | added | mona lisa | It is possible the controller class file is in the wrong place or has the wrong name. | |
May 20, 2023 at 19:16 | history | edited | Free Radical | CC BY-SA 4.0 |
added 741 characters in body
|
May 20, 2023 at 18:59 | comment | added | Free Radical | @leymannx No it does not. It is linked on the first line on my question, and while I try to use exactly that code, there is too little detail to help me. I'll try to expand the question to make the problem clearer. | |
May 20, 2023 at 18:55 | review | Close votes | |||
May 21, 2023 at 7:37 | |||||
May 20, 2023 at 18:33 | comment | added | leymannx | Does this answer your question? Dependency injection to load node data | |
May 20, 2023 at 18:05 | answer | added | avpaderno♦ | timeline score: 2 | |
May 20, 2023 at 18:01 | history | edited | Free Radical | CC BY-SA 4.0 |
Added comment about it not working without parenthesises.
|
May 20, 2023 at 17:52 | history | asked | Free Radical | CC BY-SA 4.0 |