Merge pull request #15830 from eileenmcnaughton/dedupe4
[civicrm-core.git] / Civi / Api4 / Action / System / Flush.php
CommitLineData
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
13/**
14 *
15 * @package CRM
ca5cec67 16 * @copyright CiviCRM LLC https://civicrm.org/licensing
380f3545
TO
17 * $Id$
18 *
19 */
20
19b53e5b
C
21namespace Civi\Api4\Action\System;
22
23/**
24 * Clear CiviCRM caches, and optionally rebuild triggers and reset sessions.
25 *
26 * @method bool getTriggers
27 * @method $this setTriggers(bool $triggers)
28 * @method bool getSession
29 * @method $this setSession(bool $session)
30 */
31class Flush extends \Civi\Api4\Generic\AbstractAction {
32
33 /**
34 * Rebuild db triggers
35 *
36 * @var bool
37 */
38 protected $triggers = FALSE;
39
40 /**
41 * Reset sessions
42 *
43 * @var bool
44 */
45 protected $session = FALSE;
46
47 public function _run(\Civi\Api4\Generic\Result $result) {
48 \CRM_Core_Invoke::rebuildMenuAndCaches($this->triggers, $this->session);
49 }
50
51}