SetSubtreesCommand::render

public SetSubtreesCommand::render()

Return an array to be run through json_encode and sent to the client.

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

1
2
3
4
5
6
public function render() {
  return [
    'command' => 'setToolbarSubtrees',
    'subtrees' => array_map('strval', $this->subtrees),
  ];
}
doc_Drupal
2025-01-10 15:47:30
Comments
Leave a Comment

Please login to continue.