node_get_type_label(NodeInterface $node)
Returns the node type label for the passed node.
@todo Add this as generic helper method for config entities representing entity bundles.
\Drupal\node\NodeInterface $node: A node entity to return the node type's label for.
string|false The node type label or FALSE if the node type is not found.
function node_get_type_label(NodeInterface $node) { $type = NodeType::load($node->bundle()); return $type ? $type->label() : FALSE; }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!modules!node!node.module/function/node_get_type_label/8.1.x