You are here

class WebformRefreshCommand in Webform 6.x

Same name and namespace in other branches
  1. 8.5 src/Ajax/WebformRefreshCommand.php \Drupal\webform\Ajax\WebformRefreshCommand

Provides an Ajax command for refreshing webform page.

This command is implemented in Drupal.AjaxCommands.prototype.webformRefresh.

Hierarchy

Expanded class hierarchy of WebformRefreshCommand

3 files declare their use of WebformRefreshCommand
WebformAjaxFormTrait.php in src/Form/WebformAjaxFormTrait.php
WebformEntityHandlersForm.php in src/WebformEntityHandlersForm.php
WebformEntityVariantsForm.php in src/WebformEntityVariantsForm.php

File

src/Ajax/WebformRefreshCommand.php, line 12

Namespace

Drupal\webform\Ajax
View source
class WebformRefreshCommand extends RedirectCommand {

  /**
   * Implements \Drupal\Core\Ajax\CommandInterface:render().
   */
  public function render() {
    return [
      'command' => 'webformRefresh',
      'url' => $this->url,
    ];
  }

}

Members

Namesort descending Modifiers Type Description Overrides
RedirectCommand::$url protected property The URL that will be loaded into window.location.
RedirectCommand::__construct public function Constructs an RedirectCommand object.
WebformRefreshCommand::render public function Implements \Drupal\Core\Ajax\CommandInterface:render(). Overrides RedirectCommand::render