You are here

class UltimenuHtmlCommand in Ultimenu 8.2

Overrides core HtmlCommand.

Hierarchy

Expanded class hierarchy of UltimenuHtmlCommand

1 file declares its use of UltimenuHtmlCommand
UltimenuController.php in src/Controller/UltimenuController.php

File

src/Ajax/UltimenuHtmlCommand.php, line 12

Namespace

Drupal\ultimenu\Ajax
View source
class UltimenuHtmlCommand extends HtmlCommand {

  /**
   * The caller for the method to reduce deep checks, to deal with AJAX errors.
   *
   * @var string
   */
  protected $caller;

  /**
   * Overrides an HtmlCommand object.
   */
  public function __construct($selector, $content, array $settings = NULL, $caller = 'region') {
    parent::__construct($selector, $content, $settings);
    $this->caller = $caller;
  }

  /**
   * Implements Drupal\Core\Ajax\CommandInterface:render().
   */
  public function render() {
    return [
      'ultimenu' => $this->caller,
    ] + parent::render();
  }

}

Members

Namesort descending Modifiers Type Description Overrides
CommandWithAttachedAssetsTrait::$attachedAssets protected property The attached assets for this Ajax command.
CommandWithAttachedAssetsTrait::getAttachedAssets public function Gets the attached assets.
CommandWithAttachedAssetsTrait::getRenderedContent protected function Processes the content for output.
InsertCommand::$content protected property The content for the matched element(s).
InsertCommand::$selector protected property A CSS selector string.
InsertCommand::$settings protected property A settings array to be passed to any attached JavaScript behavior.
UltimenuHtmlCommand::$caller protected property The caller for the method to reduce deep checks, to deal with AJAX errors.
UltimenuHtmlCommand::render public function Implements Drupal\Core\Ajax\CommandInterface:render(). Overrides HtmlCommand::render
UltimenuHtmlCommand::__construct public function Overrides an HtmlCommand object. Overrides InsertCommand::__construct