You are here

public function Node::setTitle in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/node/src/Entity/Node.php \Drupal\node\Entity\Node::setTitle()

Sets the node title.

Parameters

string $title: The node title.

Return value

\Drupal\node\NodeInterface The called node entity.

Overrides NodeInterface::setTitle

File

core/modules/node/src/Entity/Node.php, line 196
Contains \Drupal\node\Entity\Node.

Class

Node
Defines the node entity class.

Namespace

Drupal\node\Entity

Code

public function setTitle($title) {
  $this
    ->set('title', $title);
  return $this;
}