Updated to Drupal 8.5. Core Media not yet in use.
[yaffs-website] / web / core / lib / Drupal / Core / Ajax / SetDialogTitleCommand.php
1 <?php
2
3 namespace Drupal\Core\Ajax;
4
5 /**
6  * Defines an AJAX command that sets jQuery UI dialog properties.
7  *
8  * @ingroup ajax
9  */
10 class SetDialogTitleCommand extends SetDialogOptionCommand {
11
12   /**
13    * Constructs a SetDialogTitleCommand object.
14    *
15    * @param string $selector
16    *   The selector of the dialog whose title will be set. If set to an empty
17    *   value, the default modal dialog will be selected.
18    * @param string $title
19    *   The title that will be set on the dialog.
20    */
21   public function __construct($selector, $title) {
22     $this->selector = $selector ? $selector : '#drupal-modal';
23     $this->optionName = 'title';
24     $this->optionValue = $title;
25   }
26
27 }