Follow-up to #2513266: Twig templates can call delete() on entities and other objects
Problem/Motivation
#2513266: Twig templates can call delete() on entities and other objects removed some docs about node objects from node.html.twig, but a common use case is arguably to do {{ node.createdtime|format_date('my_great_date_format') }}
and this is obscure without those docs. Similar arguments probably apply to the other method docs that were removed.
- * - node: Full node entity.
- * - id: The node ID.
- * - bundle: The type of the node, for example, "page" or "article".
- * - authorid: The user ID of the node author.
- * - createdtime: Time the node was published formatted in Unix timestamp.
- * - changedtime: Time the node was changed formatted in Unix timestamp.
+ * - node: The node entity with limited access to object properties and methods.
+ Only "getter" methods (method names starting with "get", "has", or "is")
+ and a few common methods such as "id" and "label" are available. Calling
+ other methods (such as node.delete) will result in an exception.
Proposed resolution
Add back some or all of these docs.
Remaining tasks
Patch
Review
User interface changes
n/a
API changes
n/a
Data model changes
None.