Mercurial > hg > isophonics-drupal-site
comparison core/modules/views/src/Ajax/ShowButtonsCommand.php @ 0:4c8ae668cc8c
Initial import (non-working)
author | Chris Cannam |
---|---|
date | Wed, 29 Nov 2017 16:09:58 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:4c8ae668cc8c |
---|---|
1 <?php | |
2 | |
3 namespace Drupal\views\Ajax; | |
4 | |
5 use Drupal\Core\Ajax\CommandInterface; | |
6 | |
7 /** | |
8 * Provides an AJAX command for showing the save and cancel buttons. | |
9 * | |
10 * This command is implemented in Drupal.AjaxCommands.prototype.viewsShowButtons. | |
11 */ | |
12 class ShowButtonsCommand implements CommandInterface { | |
13 | |
14 | |
15 /** | |
16 * Whether the view has been changed. | |
17 * | |
18 * @var bool | |
19 */ | |
20 protected $changed; | |
21 | |
22 /** | |
23 * Constructs a \Drupal\views\Ajax\ShowButtonsCommand object. | |
24 * | |
25 * @param bool $changed | |
26 * Whether the view has been changed. | |
27 */ | |
28 public function __construct($changed) { | |
29 $this->changed = $changed; | |
30 } | |
31 | |
32 /** | |
33 * {@inheritdoc} | |
34 */ | |
35 public function render() { | |
36 return [ | |
37 'command' => 'viewsShowButtons', | |
38 'changed' => $this->changed, | |
39 ]; | |
40 } | |
41 | |
42 } |