You are here

public function Message::setSenderName in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/contact/src/Entity/Message.php \Drupal\contact\Entity\Message::setSenderName()
  2. 9 core/modules/contact/src/Entity/Message.php \Drupal\contact\Entity\Message::setSenderName()

Sets the name of the message sender.

Parameters

string $sender_name: The name of the message sender.

Overrides MessageInterface::setSenderName

File

core/modules/contact/src/Entity/Message.php, line 68

Class

Message
Defines the contact message entity.

Namespace

Drupal\contact\Entity

Code

public function setSenderName($sender_name) {
  $this
    ->set('name', $sender_name);
}