You are here

public function Message::setArguments in Message 8

Set the arguments of the message.

$values = [
  '@name_without_callback' => 'John doe',
  '@name_with_callback' => [
    'callback' => 'User::load',
    'arguments' => [
      1,
    ],
  ],
];

Parameters

array $values: Array of arguments.

Return value

\Drupal\message\MessageInterface Returns the message object.

Overrides MessageInterface::setArguments

1 call to Message::setArguments()
Message::save in src/Entity/Message.php
Saves an entity permanently.

File

src/Entity/Message.php, line 151

Class

Message
Defines the Message entity class.

Namespace

Drupal\message\Entity

Code

public function setArguments(array $values) {
  $this
    ->set('arguments', $values);
  return $this;
}