class AuthorizationResponse in Authorization 8
Response object for the output of grantsAndRevokes().
Hierarchy
- class \Drupal\authorization\AuthorizationResponse
Expanded class hierarchy of AuthorizationResponse
1 file declares its use of AuthorizationResponse
- AuthorizationProfile.php in src/
Entity/ AuthorizationProfile.php
File
- src/
AuthorizationResponse.php, line 10
Namespace
Drupal\authorizationView source
class AuthorizationResponse {
/**
* Label of authorization message plus optional information (e.g. skipped).
*
* @var string
*/
private $message;
/**
* Whether the profile was skipped outright.
*
* @var bool
*/
private $skipped;
/**
* Any authorizations applied.
*
* @var array
*/
private $authorizationsApplied = [];
/**
* AuthorizationResponse constructor.
*
* @param string $message
* Message.
* @param bool $skipped
* Authorization skipped.
* @param array $authorizations_applied
* Authorizations applied.
*/
public function __construct(string $message, bool $skipped, array $authorizations_applied) {
$this->message = $message;
$this->skipped = $skipped;
$this->authorizationsApplied = $authorizations_applied;
}
/**
* Get the message.
*
* @return string
* The message.
*/
public function getMessage() : string {
return $this->message;
}
/**
* If the authorization was skipped.
*
* @return bool
* If skipped.
*/
public function getSkipped() : bool {
return $this->skipped;
}
/**
* The authorizations applied.
*
* @return array
* Authorizations.
*/
public function getAuthorizationsApplied() : array {
return $this->authorizationsApplied;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
AuthorizationResponse:: |
private | property | Any authorizations applied. | |
AuthorizationResponse:: |
private | property | Label of authorization message plus optional information (e.g. skipped). | |
AuthorizationResponse:: |
private | property | Whether the profile was skipped outright. | |
AuthorizationResponse:: |
public | function | The authorizations applied. | |
AuthorizationResponse:: |
public | function | Get the message. | |
AuthorizationResponse:: |
public | function | If the authorization was skipped. | |
AuthorizationResponse:: |
public | function | AuthorizationResponse constructor. |