class FancyLoginRedirectCommand in Fancy Login 3.0.x
Same name and namespace in other branches
- 8.2 src/Ajax/FancyLoginRedirectCommand.php \Drupal\fancy_login\Ajax\FancyLoginRedirectCommand
Defines the redirect command.
Hierarchy
- class \Drupal\fancy_login\Ajax\FancyLoginRedirectCommand implements CommandInterface
Expanded class hierarchy of FancyLoginRedirectCommand
1 file declares its use of FancyLoginRedirectCommand
- fancy_login.module in ./
fancy_login.module - Holds hooks for the Fancy Login module.
File
- src/
Ajax/ FancyLoginRedirectCommand.php, line 10
Namespace
Drupal\fancy_login\AjaxView source
class FancyLoginRedirectCommand implements CommandInterface {
/**
* A boolean indicating whether or not the popup should be closed first.
*
* @var bool
*/
protected $closePopup;
/**
* The redirect destination.
*
* @var string
*/
protected $destination;
/**
* Constructs a FancyLoginRedirectCommand object.
*
* @param bool $closePopup
* A boolean indicating whether or not the popup should be closed before
* redirecting.
* @param string $destination
* The redirect destination.
*/
public function __construct($closePopup, $destination) {
$this->closePopup = $closePopup;
$this->destination = $destination;
}
/**
* {@inheritdoc}
*/
public function render() {
return [
'command' => 'fancyLoginRedirect',
'closePopup' => $this->closePopup,
'destination' => $this->destination,
];
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
FancyLoginRedirectCommand:: |
protected | property | A boolean indicating whether or not the popup should be closed first. | |
FancyLoginRedirectCommand:: |
protected | property | The redirect destination. | |
FancyLoginRedirectCommand:: |
public | function |
Return an array to be run through json_encode and sent to the client. Overrides CommandInterface:: |
|
FancyLoginRedirectCommand:: |
public | function | Constructs a FancyLoginRedirectCommand object. |