Mercurial > hg > isophonics-drupal-site
view core/modules/toolbar/src/Ajax/SetSubtreesCommand.php @ 14:1fec387a4317
Update Drupal core to 8.5.2 via Composer
author | Chris Cannam |
---|---|
date | Mon, 23 Apr 2018 09:46:53 +0100 |
parents | 4c8ae668cc8c |
children |
line wrap: on
line source
<?php namespace Drupal\toolbar\Ajax; use Drupal\Core\Ajax\CommandInterface; /** * Defines an AJAX command that sets the toolbar subtrees. */ class SetSubtreesCommand implements CommandInterface { /** * The toolbar subtrees. * * @var array */ protected $subtrees; /** * Constructs a SetSubtreesCommand object. * * @param array $subtrees * The toolbar subtrees that will be set. */ public function __construct($subtrees) { $this->subtrees = $subtrees; } /** * {@inheritdoc} */ public function render() { return [ 'command' => 'setToolbarSubtrees', 'subtrees' => array_map('strval', $this->subtrees), ]; } }