function node_get_type_label

Returns the node type label for the passed node.

Parameters

Drupal\node\Node $node: A node entity to return the node type's label for.

Return value

string|false The node type label or FALSE if the node type is not found.

21 calls to node_get_type_label()
hook_mail in drupal/core/modules/system/system.api.php
Prepare a message based on parameters; called from drupal_mail().
hook_search_execute in drupal/core/modules/search/search.api.php
Execute a search for a set of key words.
NodeFormController::save in drupal/core/modules/node/lib/Drupal/node/NodeFormController.php
Overrides Drupal\Core\Entity\EntityFormController::save().
NodeTranslationController::entityFormTitle in drupal/core/modules/node/lib/Drupal/node/NodeTranslationController.php
Overrides EntityTranslationController::entityFormTitle().
node_admin_nodes in drupal/core/modules/node/node.admin.inc
Returns the admin form object to node_admin_content().

... See full list

File

drupal/core/modules/node/node.module, line 390
The core module that allows content to be submitted to the site.

Code

function node_get_type_label($node) {
  $types = _node_types_build()->names;
  return isset($types[$node->type]) ? $types[$node->type] : FALSE;
}