You are here

class FancyLoginRefreshPageCommand in Fancy Login 8.2

Same name and namespace in other branches
  1. 3.0.x src/Ajax/FancyLoginRefreshPageCommand.php \Drupal\fancy_login\Ajax\FancyLoginRefreshPageCommand

Defines the refresh page ajax command.

Hierarchy

Expanded class hierarchy of FancyLoginRefreshPageCommand

1 file declares its use of FancyLoginRefreshPageCommand
fancy_login.module in ./fancy_login.module
Holds hooks for the Fancy Login module.

File

src/Ajax/FancyLoginRefreshPageCommand.php, line 10

Namespace

Drupal\fancy_login\Ajax
View source
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,
    ];
  }

}

Members

Namesort descending Modifiers Type Description Overrides
FancyLoginRefreshPageCommand::$closePopup protected property A boolean indicating whether or not the popup should be closed first.
FancyLoginRefreshPageCommand::render public function Return an array to be run through json_encode and sent to the client. Overrides CommandInterface::render
FancyLoginRefreshPageCommand::__construct public function Constructs a FancyLoginRefreshPageCommand object.