Mercurial > hg > cmmr2012-drupal-site
comparison core/modules/views/src/Ajax/ShowButtonsCommand.php @ 0:c75dbcec494b
Initial commit from drush-created site
author | Chris Cannam |
---|---|
date | Thu, 05 Jul 2018 14:24:15 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:c75dbcec494b |
---|---|
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 } |