Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
CiviCRM Core
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container registry
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Development
CiviCRM Core
Commits
f8e87067
Commit
f8e87067
authored
4 years ago
by
homotechsual
Browse files
Options
Downloads
Patches
Plain Diff
Add ResetPaths API4 endpoint
#2458
parent
3a8f45dd
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Civi/Api4/Action/System/ResetPaths.php
+29
-0
29 additions, 0 deletions
Civi/Api4/Action/System/ResetPaths.php
Civi/Api4/System.php
+9
-0
9 additions, 0 deletions
Civi/Api4/System.php
with
38 additions
and
0 deletions
Civi/Api4/Action/System/ResetPaths.php
0 → 100644
+
29
−
0
View file @
f8e87067
<?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
();
}
}
This diff is collapsed.
Click to expand it.
Civi/Api4/System.php
+
9
−
0
View file @
f8e87067
...
...
@@ -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
);
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment