Skip to content
Snippets Groups Projects

Issue #3386762: Open field settings form in a modal in the field creation flow

Open Harumi Jang requested to merge issue/drupal-3386762:3386762-open-field-settings into 11.x
Compare and
33 files
+ 977
596
Compare changes
  • Side-by-side
  • Inline
Files
33
<?php
namespace Drupal\Core\Ajax;
/**
* Provides an AJAX command for opening a modal with URL.
*/
class OpenModalDialogWithUrl implements CommandInterface {
/**
* Constructs a OpenModalWithUrl object.
*
* @param string $url
* The URL of the page.
* @param array $settings
* The dialog settings.
*/
public function __construct(
protected string $url,
protected array $settings
) {}
/**
* {@inheritdoc}
*/
public function render() {
return [
'command' => 'openDialogWithUrl',
'url' => $this->url,
'dialogOptions' => $this->settings,
];
}
}
Loading