node_type_get_types

node_type_get_types()

Returns a list of all the available node types.

This list can include types that are queued for addition or deletion.

Return value

\Drupal\node\NodeTypeInterface[] An array of node type entities, keyed by ID.

Deprecated

in Drupal 8.x, will be removed before Drupal 9.0. Use \Drupal\node\Entity\NodeType::loadMultiple().

See also

\Drupal\node\Entity\NodeType::load()

File

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

Code

function node_type_get_types() {
  return NodeType::loadMultiple();
}
doc_Drupal
2016-10-29 09:32:00
Comments
Leave a Comment

Please login to continue.