You are here

class FancyLoginLoadFormCommand in Fancy Login 3.0.x

Same name and namespace in other branches
  1. 8.2 src/Ajax/FancyLoginLoadFormCommand.php \Drupal\fancy_login\Ajax\FancyLoginLoadFormCommand

Defines the load form ajax command.

Hierarchy

Expanded class hierarchy of FancyLoginLoadFormCommand

1 file declares its use of FancyLoginLoadFormCommand
FancyLoginController.php in src/Controller/FancyLoginController.php

File

src/Ajax/FancyLoginLoadFormCommand.php, line 10

Namespace

Drupal\fancy_login\Ajax
View source
class FancyLoginLoadFormCommand implements CommandInterface {

  /**
   * The loaded form.
   *
   * @var array
   */
  protected $form;

  /**
   * Constructs a FancyLoginLoadFormCommand object.
   */
  public function __construct(array $form) {
    $this->form = $form;
  }

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

}

Members

Namesort descending Modifiers Type Description Overrides
FancyLoginLoadFormCommand::$form protected property The loaded form.
FancyLoginLoadFormCommand::render public function Return an array to be run through json_encode and sent to the client. Overrides CommandInterface::render
FancyLoginLoadFormCommand::__construct public function Constructs a FancyLoginLoadFormCommand object.