Skip to content
Snippets Groups Projects
Unverified Commit da28128b authored by Eileen McNaughton's avatar Eileen McNaughton Committed by GitHub
Browse files

Merge pull request #19795 from MJCO/resetPathsAPI4

Add `resetPaths` as per issue #2458 #1
parents 536d35ff cfab3bdd
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;
/**
* Reset paths using doSiteMove().
*/
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