function Node::getType

Same name and namespace in other branches
  1. 10 core/modules/node/src/Entity/Node.php \Drupal\node\Entity\Node::getType()
  2. 9 core/modules/node/src/Entity/Node.php \Drupal\node\Entity\Node::getType()
  3. 8.9.x core/modules/node/src/Entity/Node.php \Drupal\node\Entity\Node::getType()
  4. main core/modules/node/src/Entity/Node.php \Drupal\node\Entity\Node::getType()

Gets the node type.

Return value

string The node type.

Overrides NodeInterface::getType

File

core/modules/node/src/Entity/Node.php, line 204

Class

Node
Defines the node entity class.

Namespace

Drupal\node\Entity

Code

public function getType() {
  return $this->bundle();
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.