Skip to content
Snippets Groups Projects
Commit f8e87067 authored by homotechsual's avatar homotechsual
Browse files

Add ResetPaths API4 endpoint #2458

parent 3a8f45dd
Branches
Tags
No related merge requests found
<?php
/*
+--------------------------------------------------------------------+
| Copyright CiviCRM LLC. All rights reserved. |
| |
| This work is published under the GNU AGPLv3 license with some |
| permitted exceptions and without any warranty. For full license |
| and copyright information, see https://civicrm.org/licensing |
+--------------------------------------------------------------------+
*/
namespace Civi\Api4\Action\System;
/**
* Clear CiviCRM caches, and optionally rebuild triggers and reset sessions.
*
* @method bool getTriggers
* @method $this setTriggers(bool $triggers)
* @method bool getSession
* @method $this setSession(bool $session)
*/
class ResetPaths extends \Civi\Api4\Generic\AbstractAction {
public function _run(\Civi\Api4\Generic\Result $result) {
\CRM_Core_BAO_ConfigSetting::doSiteMove();
}
}
......@@ -63,4 +63,13 @@ class System extends Generic\AbstractEntity {
}))->setCheckPermissions($checkPermissions);
}
/**
* @param bool $checkPermissions
* @return Action\System\ResetPaths
*/
public static function resetPaths($checkPermissions = TRUE) {
return (new Action\System\ResetPaths(__CLASS__, __FUNCTION__))
->setCheckPermissions($checkPermissions);
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment