Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
See #1880976: [meta] Port examples (including submodules) to D9.4+
Nodes are completely different in D8. Change notice here: https://drupal.org/node/2029519
We can still demonstrate node type hooks, such as hook_node_type_insert(), and also entity hooks such as hook_entity_load(). I think we should focus on entity_example instead of this one.
There's a very basic version of creating a node type with a YAML file here: #2165259: Create node_type_example
Comments
Comment #1
Pierre Paul Lefebvre CreditAttribution: Pierre Paul Lefebvre commentedComment #2
Pierre Paul Lefebvre CreditAttribution: Pierre Paul Lefebvre commentedI moved to the twig team, unassigning myself.
Comment #3
tyjamessmith CreditAttribution: tyjamessmith commentedStarting development on this issue. Assigning to me.
Comment #4
tyjamessmith CreditAttribution: tyjamessmith commentedThis is getting ready to be ripped out. Do not work on this.
Comment #5
Mile23Comment #6
Mile23We really don't need this, because there's no such thing as Node API any more. See node_type_example and/or content_entity_example.