You are here

FancyLoginRefreshPageCommand.php in Fancy Login 8.2

Same filename and directory in other branches
  1. 3.0.x src/Ajax/FancyLoginRefreshPageCommand.php

File

src/Ajax/FancyLoginRefreshPageCommand.php
View source
<?php

namespace Drupal\fancy_login\Ajax;

use Drupal\Core\Ajax\CommandInterface;

/**
 * Defines the refresh page ajax command.
 */
class FancyLoginRefreshPageCommand implements CommandInterface {

  /**
   * A boolean indicating whether or not the popup should be closed first.
   *
   * @var bool
   */
  protected $closePopup;

  /**
   * Constructs a FancyLoginRefreshPageCommand object.
   *
   * @param bool $closePopup
   *   A boolean indicating whether or not the popup should be closed before
   *   refreshing.
   */
  public function __construct($closePopup) {
    $this->closePopup = $closePopup;
  }

  /**
   * {@inheritdoc}
   */
  public function render() {
    return [
      'command' => 'fancyLoginRefreshPage',
      'closePopup' => $this->closePopup,
    ];
  }

}

Classes

Namesort descending Description
FancyLoginRefreshPageCommand Defines the refresh page ajax command.