class SetFormCommand in Drupal 8
Same name and namespace in other branches
- 9 core/modules/views_ui/src/Ajax/SetFormCommand.php \Drupal\views_ui\Ajax\SetFormCommand
- 10 core/modules/views_ui/src/Ajax/SetFormCommand.php \Drupal\views_ui\Ajax\SetFormCommand
Provides an AJAX command for setting a form submit URL in modal forms.
This command is implemented in Drupal.AjaxCommands.prototype.viewsSetForm.
Hierarchy
- class \Drupal\views_ui\Ajax\SetFormCommand implements CommandInterface
Expanded class hierarchy of SetFormCommand
1 file declares its use of SetFormCommand
- ViewsFormBase.php in core/modules/ views_ui/ src/ Form/ Ajax/ ViewsFormBase.php 
File
- core/modules/ views_ui/ src/ Ajax/ SetFormCommand.php, line 12 
Namespace
Drupal\views_ui\AjaxView source
class SetFormCommand implements CommandInterface {
  /**
   * The URL of the form.
   *
   * @var string
   */
  protected $url;
  /**
   * Constructs a SetFormCommand object.
   *
   * @param string $url
   *   The URL of the form.
   */
  public function __construct($url) {
    $this->url = $url;
  }
  /**
   * {@inheritdoc}
   */
  public function render() {
    return [
      'command' => 'viewsSetForm',
      'url' => $this->url,
    ];
  }
}Members
| Name   | Modifiers | Type | Description | Overrides | 
|---|---|---|---|---|
| SetFormCommand:: | protected | property | The URL of the form. | |
| SetFormCommand:: | public | function | Return an array to be run through json_encode and sent to the client. Overrides CommandInterface:: | |
| SetFormCommand:: | public | function | Constructs a SetFormCommand object. | 
