Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $types = Drupal::entityTypeManager()
- ->getStorage('node_type')
- ->loadMultiple();
- $node_types = DrupalnodeEntityNodeType::loadMultiple();
- // If you need to display them in a drop down:
- $options = [];
- foreach ($node_types as $node_type) {
- $options[$node_type->id()] = $node_type->label();
- }
Add Comment
Please, Sign In to add comment