3 namespace Drupal\views\Ajax;
5 use Drupal\Core\Ajax\CommandInterface;
8 * Provides an AJAX command for replacing the page title.
10 * This command is implemented in Drupal.AjaxCommands.prototype.viewsReplaceTitle.
12 class ReplaceTitleCommand implements CommandInterface {
15 * The page title to replace.
22 * Constructs a \Drupal\views\Ajax\ReplaceTitleCommand object.
24 * @param string $title
25 * The title of the page.
27 public function __construct($title) {
28 $this->title = $title;
34 public function render() {
36 'command' => 'viewsReplaceTitle',
37 'selector' => $this->title,