Issue #2610344 by mikeker, dimaro, mohit_aghera, andriyun, anil280988, Cottser, joelpittet: Re-add some documentation about what you can get from the node object in node.html.twig

8.2.x
Scott Reeves 2016-04-26 13:10:02 -04:00
parent ae233ac20d
commit 526501d01b
4 changed files with 40 additions and 12 deletions

View File

@ -5,9 +5,16 @@
*
* Available variables:
* - 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.
* Only method names starting with "get", "has", or "is" and a few common
* methods such as "id", "label", and "bundle" are available. For example:
* - node.getCreatedTime() will return the node creation timestamp.
* - node.hasField('field_example') returns TRUE if the node bundle includes
* field_example. (This does not indicate the presence of a value in this
* field.)
* - node.isPublished() will return whether the node is published or not.
* Calling other methods, such as node.delete(), will result in an exception.
* See \Drupal\node\Entity\Node for a full list of public properties and
* methods for the node object.
* - label: The title of the node.
* - content: All node items. Use {{ content }} to print them all,
* or print a subset such as {{ content.field_example }}. Use

View File

@ -5,9 +5,16 @@
*
* Available variables:
* - 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.
* Only method names starting with "get", "has", or "is" and a few common
* methods such as "id", "label", and "bundle" are available. For example:
* - node.getCreatedTime() will return the node creation timestamp.
* - node.hasField('field_example') returns TRUE if the node bundle includes
* field_example. (This does not indicate the presence of a value in this
* field.)
* - node.isPublished() will return whether the node is published or not.
* Calling other methods, such as node.delete(), will result in an exception.
* See \Drupal\node\Entity\Node for a full list of public properties and
* methods for the node object.
* - label: The title of the node.
* - content: All node items. Use {{ content }} to print them all,
* or print a subset such as {{ content.field_example }}. Use

View File

@ -5,9 +5,16 @@
*
* Available variables:
* - 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.
* Only method names starting with "get", "has", or "is" and a few common
* methods such as "id", "label", and "bundle" are available. For example:
* - node.getCreatedTime() will return the node creation timestamp.
* - node.hasField('field_example') returns TRUE if the node bundle includes
* field_example. (This does not indicate the presence of a value in this
* field.)
* - node.isPublished() will return whether the node is published or not.
* Calling other methods, such as node.delete(), will result in an exception.
* See \Drupal\node\Entity\Node for a full list of public properties and
* methods for the node object.
* - label: The title of the node.
* - content: All node items. Use {{ content }} to print them all,
* or print a subset such as {{ content.field_example }}. Use

View File

@ -5,9 +5,16 @@
*
* Available variables:
* - 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.
* Only method names starting with "get", "has", or "is" and a few common
* methods such as "id", "label", and "bundle" are available. For example:
* - node.getCreatedTime() will return the node creation timestamp.
* - node.hasField('field_example') returns TRUE if the node bundle includes
* field_example. (This does not indicate the presence of a value in this
* field.)
* - node.isPublished() will return whether the node is published or not.
* Calling other methods, such as node.delete(), will result in an exception.
* See \Drupal\node\Entity\Node for a full list of public properties and
* methods for the node object.
* - label: The title of the node.
* - content: All node items. Use {{ content }} to print them all,
* or print a subset such as {{ content.field_example }}. Use