Commit | Line | Data |
---|---|---|
19b53e5b | 1 | <?php |
380f3545 TO |
2 | |
3 | /* | |
4 | +--------------------------------------------------------------------+ | |
41498ac5 | 5 | | Copyright CiviCRM LLC. All rights reserved. | |
380f3545 | 6 | | | |
41498ac5 TO |
7 | | This work is published under the GNU AGPLv3 license with some | |
8 | | permitted exceptions and without any warranty. For full license | | |
9 | | and copyright information, see https://civicrm.org/licensing | | |
380f3545 TO |
10 | +--------------------------------------------------------------------+ |
11 | */ | |
12 | ||
19b53e5b C |
13 | namespace Civi\Api4\Action\System; |
14 | ||
15 | /** | |
16 | * Clear CiviCRM caches, and optionally rebuild triggers and reset sessions. | |
17 | * | |
18 | * @method bool getTriggers | |
19 | * @method $this setTriggers(bool $triggers) | |
20 | * @method bool getSession | |
21 | * @method $this setSession(bool $session) | |
22 | */ | |
23 | class Flush extends \Civi\Api4\Generic\AbstractAction { | |
24 | ||
25 | /** | |
26 | * Rebuild db triggers | |
27 | * | |
28 | * @var bool | |
29 | */ | |
30 | protected $triggers = FALSE; | |
31 | ||
32 | /** | |
33 | * Reset sessions | |
34 | * | |
35 | * @var bool | |
36 | */ | |
37 | protected $session = FALSE; | |
38 | ||
39 | public function _run(\Civi\Api4\Generic\Result $result) { | |
40 | \CRM_Core_Invoke::rebuildMenuAndCaches($this->triggers, $this->session); | |
41 | } | |
42 | ||
43 | } |