You are here

public function PrivateMessageMemberUsernameValidatedCommand::render in Private Message 8

Same name and namespace in other branches
  1. 8.2 src/Ajax/PrivateMessageMemberUsernameValidatedCommand.php \Drupal\private_message\Ajax\PrivateMessageMemberUsernameValidatedCommand::render()

Return an array to be run through json_encode and sent to the client.

Overrides CommandInterface::render

File

src/Ajax/PrivateMessageMemberUsernameValidatedCommand.php, line 45

Class

PrivateMessageMemberUsernameValidatedCommand
Ajax command to tell the browser whether a username has been validated.

Namespace

Drupal\private_message\Ajax

Code

public function render() {
  return [
    'command' => 'privateMessageMemberUsernameValidated',
    'username' => $this->username,
    'validUsername' => $this->validUsername,
  ];
}