function SetSubtreesCommand::render

Same name in other branches
  1. 9 core/modules/toolbar/src/Ajax/SetSubtreesCommand.php \Drupal\toolbar\Ajax\SetSubtreesCommand::render()
  2. 8.9.x core/modules/toolbar/src/Ajax/SetSubtreesCommand.php \Drupal\toolbar\Ajax\SetSubtreesCommand::render()
  3. 10 core/modules/toolbar/src/Ajax/SetSubtreesCommand.php \Drupal\toolbar\Ajax\SetSubtreesCommand::render()

Overrides CommandInterface::render

File

core/modules/toolbar/src/Ajax/SetSubtreesCommand.php, line 32

Class

SetSubtreesCommand
Defines an AJAX command that sets the toolbar subtrees.

Namespace

Drupal\toolbar\Ajax

Code

public function render() {
    return [
        'command' => 'setToolbarSubtrees',
        'subtrees' => array_map('strval', $this->subtrees),
    ];
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.