You are here

class ReloadConfigFormCommand in Purge 8.3

Ajax command to reload the purge configuration form from modal dialogs.

Hierarchy

Expanded class hierarchy of ReloadConfigFormCommand

File

modules/purge_ui/src/Form/ReloadConfigFormCommand.php, line 14

Namespace

Drupal\purge_ui\Form
View source
class ReloadConfigFormCommand extends RedirectCommand implements CommandInterface {

  /**
   * Route providing the main configuration form of the purge module.
   *
   * @var string
   */
  protected $route = 'purge_ui.dashboard';

  /**
   * Construct a ReloadConfigFormCommand object.
   *
   * @param string $fragment
   *   The fragment to jump to in the main config form.
   */
  public function __construct($fragment) {
    $options = [
      'fragment' => $fragment,
      'query' => [
        $fragment => time(),
      ],
    ];
    parent::__construct(Url::fromRoute($this->route, [], $options)
      ->toString());
  }

}

Members

Namesort descending Modifiers Type Description Overrides
RedirectCommand::$url protected property The URL that will be loaded into window.location.
RedirectCommand::render public function Implements \Drupal\Core\Ajax\CommandInterface:render(). Overrides CommandInterface::render
ReloadConfigFormCommand::$route protected property Route providing the main configuration form of the purge module.
ReloadConfigFormCommand::__construct public function Construct a ReloadConfigFormCommand object. Overrides RedirectCommand::__construct