class PrivateMessageMemberUsernameValidatedCommand in Private Message 8.2
Same name and namespace in other branches
- 8 src/Ajax/PrivateMessageMemberUsernameValidatedCommand.php \Drupal\private_message\Ajax\PrivateMessageMemberUsernameValidatedCommand
Ajax command to tell the browser whether a username has been validated.
Hierarchy
- class \Drupal\private_message\Ajax\PrivateMessageMemberUsernameValidatedCommand implements CommandInterface
Expanded class hierarchy of PrivateMessageMemberUsernameValidatedCommand
1 file declares its use of PrivateMessageMemberUsernameValidatedCommand
- AjaxController.php in src/
Controller/ AjaxController.php
File
- src/
Ajax/ PrivateMessageMemberUsernameValidatedCommand.php, line 10
Namespace
Drupal\private_message\AjaxView source
class PrivateMessageMemberUsernameValidatedCommand implements CommandInterface {
/**
* The username that was validated.
*
* @var string
*/
protected $username;
/**
* The user information to be returned sent to the browser.
*
* @var bool
* A boolean indicating whether the given username is valid to be used as
* a member in a private message thread.
*/
protected $validUsername;
/**
* Constructs a PrivateMessageMembersAutocompleteResponseCommand object.
*
* @param string $username
* The username that was validated.
* @param bool $validUsername
* A boolean indicating whether the given username is valid to be used as
* a member in a private message thread.
*/
public function __construct($username, $validUsername) {
$this->username = $username;
$this->validUsername = $validUsername;
}
/**
* {@inheritdoc}
*/
public function render() {
return [
'command' => 'privateMessageMemberUsernameValidated',
'username' => $this->username,
'validUsername' => $this->validUsername,
];
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
PrivateMessageMemberUsernameValidatedCommand:: |
protected | property | The username that was validated. | |
PrivateMessageMemberUsernameValidatedCommand:: |
protected | property | The user information to be returned sent to the browser. | |
PrivateMessageMemberUsernameValidatedCommand:: |
public | function |
Return an array to be run through json_encode and sent to the client. Overrides CommandInterface:: |
|
PrivateMessageMemberUsernameValidatedCommand:: |
public | function | Constructs a PrivateMessageMembersAutocompleteResponseCommand object. |