Backup of db before drupal security update
[yaffs-website] / web / core / modules / views_ui / src / Ajax / SetFormCommand.php
1 <?php
2
3 namespace Drupal\views_ui\Ajax;
4
5 use Drupal\Core\Ajax\CommandInterface;
6
7 /**
8  * Provides an AJAX command for setting a form submit URL in modal forms.
9  *
10  * This command is implemented in Drupal.AjaxCommands.prototype.viewsSetForm.
11  */
12 class SetFormCommand implements CommandInterface {
13
14   /**
15    * The URL of the form.
16    *
17    * @var string
18    */
19   protected $url;
20
21   /**
22    * Constructs a SetFormCommand object.
23    *
24    * @param string $url
25    *   The URL of the form.
26    */
27   public function __construct($url) {
28     $this->url = $url;
29   }
30
31   /**
32    * {@inheritdoc}
33    */
34   public function render() {
35     return [
36       'command' => 'viewsSetForm',
37       'url' => $this->url,
38     ];
39   }
40
41 }