"Fossies" - the Fresh Open Source Software Archive

Member "drupal-8.9.10/core/lib/Drupal/Core/Ajax/SetDialogTitleCommand.php" (26 Nov 2020, 683 Bytes) of package /linux/www/drupal-8.9.10.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) PHP source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "SetDialogTitleCommand.php" see the Fossies "Dox" file reference documentation.

    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 }