function node_type_get_names

Returns a list of available node type names.

This list can include types that are queued for addition or deletion. See _node_types_build() for details.

Return value

An array of node type labels, keyed by the node type name.

See also

_node_types_build()

8 calls to node_type_get_names()
BookSettingsForm::buildForm in drupal/core/modules/book/lib/Drupal/book/BookSettingsForm.php
Implements \Drupal\Core\Form\FormInterface::buildForm().
comment_entity_bundle_info in drupal/core/modules/comment/comment.module
Implements hook_entity_bundle_info().
NodeTypeTest::testNodeTypeGetFunctions in drupal/core/modules/node/lib/Drupal/node/Tests/NodeTypeTest.php
Ensures that node type functions (node_type_get_*) work correctly.
node_entity_bundle_info in drupal/core/modules/node/node.module
Implements hook_entity_bundle_info().
node_form_block_form_alter in drupal/core/modules/node/node.module
Implements hook_form_FORM_ID_alter() for block_form().

... See full list

File

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

Code

function node_type_get_names() {
  return _node_types_build()->names;
}