* api - through which it is properly tested - so can be refactored with some comfort.)
* @param bool|int $checkPermission
* Either a CRM_Core_Permission constant or FALSE to disable checks
- * @param string|int $singleRecord
- * holds 'new' or id if view/edit/copy form for a single record is being loaded.
- * @param bool $showPublicOnly
*
* @return array
* Custom field 'tree'.
*
* @throws \CRM_Core_Exception
*/
- public static function getTree(
+ private static function getTree(
$entityType,
$toReturn = [],
$entityID = NULL,
$fromCache = TRUE,
$onlySubType = NULL,
$returnAll = FALSE,
- $checkPermission = CRM_Core_Permission::EDIT,
- $singleRecord = NULL,
- $showPublicOnly = FALSE
+ $checkPermission = CRM_Core_Permission::EDIT
) {
+ $singleRecord = NULL;
+ $showPublicOnly = FALSE;
if ($checkPermission === TRUE) {
CRM_Core_Error::deprecatedWarning('Unexpected TRUE passed to CustomGroup::getTree $checkPermission param.');
$checkPermission = CRM_Core_Permission::EDIT;