CRM_Utils_System_Soap
class CRM_Utils_System_Soap extends CRM_Utils_System_Base
Soap specific stuff goes here.
Properties
bool | $is_drupal | Deprecated property to check if this is a drupal install. | from CRM_Utils_System_Base |
bool | $is_joomla | Deprecated property to check if this is a joomla install. The correct method is to have functions on the UF classes for all UF specific functions and leave the codebase oblivious to the type of CMS | from CRM_Utils_System_Base |
bool | $is_wordpress | deprecated property to check if this is a wordpress install. The correct method is to have functions on the UF classes for all UF specific functions and leave the codebase oblivious to the type of CMS | from CRM_Utils_System_Base |
bool | $supports_UF_Logging | Does this CMS / UF support a CMS specific logging mechanism? | from CRM_Utils_System_Base |
bool | $supports_form_extensions | from CRM_Utils_System_Base | |
static string | $uf | UF container variables. | |
static | $ufClass |
Methods
No description
Append an additional breadcrumb tag to the existing breadcrumb.
Reset an additional breadcrumb tag to the existing breadcrumb.
FIXME: Can this override be removed in favor of the parent?
No description
No description
Set a message in the CMS to display to a user.
Immediately stop script execution and display a 401 "Access Denied" page.
Immediately stop script execution, log out the user and redirect to the home page.
Clear CMS caches related to the user registration/profile forms.
If we are using a theming system, invoke theme, else just print the content.
Get the absolute path to the site's base url.
Format the url as per language Negotiation.
Create a user in the CMS.
Update a user's email address in the CMS.
Check if user registration is permitted.
Check if user can create passwords or is initially assigned a system-generated one.
Get user login URL for hosting CMS (method declared in each CMS system class)
Set the localisation from the user framework.
Reset any system caches that may be required for proper CiviCRM integration.
Sets the title of the page.
Determine the default location for file storage.
Determine the location of the CiviCRM source tree.
Perform any post login activities required by the CMS.
Set timezone in mysql so that timestamp fields show the correct time.
Get Unique Identifier from UserFramework system (CMS).
Get User ID from UserFramework system (CMS).
Get an array of user details for a contact, containing at minimum the user ID & name.
Get currently logged in user unique identifier - this tends to be the email address or user name.
Return a UFID (user account ID from the UserFramework / CMS system.
Return a unique identifier (usually an email address or username) from the UserFramework / CMS system.
List modules installed in the CMS, including enabled and disabled ones.
Get Url to view user record.
Is the current user permitted to add a user.
Send an HTTP Response base on PSR HTTP RespnseInterface response.
Given a permission string, check for access requirements
Set the email address of the user.
Swap the current UF for soap.
Details
in CRM_Utils_System_Base at line 53
initialize()
at line 128
loadBootStrap($params = [], $loadUser = TRUE, $throwError = TRUE, $realPath = NULL)
in CRM_Utils_System_Base at line 66
appendBreadCrumb(array $breadCrumbs)
Append an additional breadcrumb tag to the existing breadcrumb.
in CRM_Utils_System_Base at line 72
resetBreadCrumb()
Reset an additional breadcrumb tag to the existing breadcrumb.
in CRM_Utils_System_Base at line 81
addHTMLHead(string $head)
Append a string to the head of the html file.
in CRM_Utils_System_Base at line 87
mapConfigToSSL()
Rewrite various system urls to https.
at line 77
string
postURL(string $action)
FIXME: Can this override be removed in favor of the parent?
at line 62
string
url(string $path = NULL, string $query = NULL, bool $absolute = TRUE, string $fragment = NULL)
at line 93
array|bool
authenticate(string $name, $pass)
in CRM_Utils_System_Base at line 166
setMessage(string $message)
Set a message in the CMS to display to a user.
in CRM_Utils_System_Base at line 176
bool
loadUser(obj $user)
Load user into session.
in CRM_Utils_System_Base at line 183
permissionDenied()
Immediately stop script execution and display a 401 "Access Denied" page.
in CRM_Utils_System_Base at line 193
logout()
deprecated
deprecated
Immediately stop script execution, log out the user and redirect to the home page.
in CRM_Utils_System_Base at line 201
updateCategories()
Clear CMS caches related to the user registration/profile forms.
Used when updating/embedding profiles on CMS user forms.
in CRM_Utils_System_Base at line 210
string|null
getUFLocale()
Get the locale set in the CMS.
in CRM_Utils_System_Base at line 232
string|null
theme(string $content, bool $print = FALSE, bool $maintenance = FALSE)
If we are using a theming system, invoke theme, else just print the content.
in CRM_Utils_System_Base at line 287
string
getDefaultBlockLocation()
in CRM_Utils_System_Base at line 296
bool|mixed|string
getAbsoluteBaseURL()
Get the absolute path to the site's base url.
in CRM_Utils_System_Base at line 318
bool
getRelativeBaseURL()
Get the relative path to the sites base url.
in CRM_Utils_System_Base at line 333
string
getVersion()
Get CMS Version.
in CRM_Utils_System_Base at line 347
string
languageNegotiationURL(string $url, bool $addLanguagePart = TRUE, bool $removeLanguagePart = FALSE)
Format the url as per language Negotiation.
in CRM_Utils_System_Base at line 361
string|null
cmsRootPath()
Determine the location of the CMS root.
in CRM_Utils_System_Base at line 375
int|bool
createUser(array $params, string $mail)
Create a user in the CMS.
in CRM_Utils_System_Base at line 387
updateCMSName(int $ufID, string $email)
Update a user's email address in the CMS.
in CRM_Utils_System_Base at line 395
bool
isUserLoggedIn()
Check if user is logged in to the CMS.
in CRM_Utils_System_Base at line 404
bool
isUserRegistrationPermitted()
Check if user registration is permitted.
in CRM_Utils_System_Base at line 413
bool
isPasswordUserGenerated()
Check if user can create passwords or is initially assigned a system-generated one.
in CRM_Utils_System_Base at line 426
bool
isFrontEndPage()
Is a front end page being accessed.
Generally this would be a contribution form or other public page as opposed to a backoffice page (like contact edit).
at line 124
string
getLoginURL(string $destination = '')
Get user login URL for hosting CMS (method declared in each CMS system class)
in CRM_Utils_System_Base at line 452
string|NULL
getLoginDestination(CRM_Core_Form $form)
Get the login destination string.
When this is passed in the URL the user will be directed to it after filling in the CMS form.
in CRM_Utils_System_Base at line 463
getUfId(string $username)
Determine the native ID of the CMS user.
in CRM_Utils_System_Base at line 475
bool
setUFLocale(string $civicrm_language)
Set the localisation from the user framework.
in CRM_Utils_System_Base at line 485
setUserSession(array $data)
Set a init session with user object.
in CRM_Utils_System_Base at line 495
flush()
Reset any system caches that may be required for proper CiviCRM integration.
in CRM_Utils_System_Base at line 502
clearResourceCache()
Flush css/js caches.
in CRM_Utils_System_Base at line 519
bool
addScriptUrl(string $url, string $region)
Add a script file.
Note: This function is not to be called directly
in CRM_Utils_System_Base at line 536
bool
addScript(string $code, string $region)
Add an inline script.
Note: This function is not to be called directly
in CRM_Utils_System_Base at line 553
bool
addStyleUrl(string $url, string $region)
Add a css file.
Note: This function is not to be called directly
in CRM_Utils_System_Base at line 570
bool
addStyle(string $code, string $region)
Add an inline style.
Note: This function is not to be called directly
in CRM_Utils_System_Base at line 582
setTitle(string $title, string|null $pageTitle = NULL)
Sets the title of the page.
in CRM_Utils_System_Base at line 595
array
getDefaultSiteSettings(string $dir)
Return default Site Settings.
in CRM_Utils_System_Base at line 614
array
getDefaultFileStorage()
Determine the default location for file storage.
FIXME: 1. This was pulled out from a bigger function. It should be split into even smaller pieces and marked abstract. 2. This would be easier to compute by a calling a CMS API, but for whatever reason Civi gets it from config data.
in CRM_Utils_System_Base at line 654
array
getCiviSourceStorage()
Determine the location of the CiviCRM source tree.
FIXME: 1. This was pulled out from a bigger function. It should be split into even smaller pieces and marked abstract. 2. This would be easier to compute by a calling a CMS API, but for whatever reason we take the hard way.
in CRM_Utils_System_Base at line 711
userLoginFinalize(array $params = [])
Perform any post login activities required by the CMS.
e.g. for drupal: records a watchdog message about the new session, saves the login timestamp, calls hook_user op 'login' and generates a new session.
in CRM_Utils_System_Base at line 717
setMySQLTimeZone()
Set timezone in mysql so that timestamp fields show the correct time.
in CRM_Utils_System_Base at line 730
string|false|null
getTimeZoneOffset()
Get timezone from CMS.
in CRM_Utils_System_Base at line 765
string
getTimeZoneString()
Get timezone as a string.
in CRM_Utils_System_Base at line 778
mixed
getUniqueIdentifierFromUserObject(object $user)
Get Unique Identifier from UserFramework system (CMS).
in CRM_Utils_System_Base at line 790
null|int
getUserIDFromUserObject(object $user)
Get User ID from UserFramework system (CMS).
in CRM_Utils_System_Base at line 804
array
getUser(int $contactID)
Get an array of user details for a contact, containing at minimum the user ID & name.
in CRM_Utils_System_Base at line 821
int|null
getLoggedInUfID()
Get currently logged in user uf id.
in CRM_Utils_System_Base at line 831
string|null
getLoggedInUniqueIdentifier()
Get currently logged in user unique identifier - this tends to be the email address or user name.
in CRM_Utils_System_Base at line 851
int
getBestUFID(object $user = NULL)
Return a UFID (user account ID from the UserFramework / CMS system.
ID is based on the user object passed, defaulting to the logged in user if not passed.
Note that ambiguous situation occurs in CRM_Core_BAO_UFMatch::synchronize - a cleaner approach would seem to be resolving the user id before calling the function.
Note there is already a function getUFId which takes $username as a param - we could add $user as a second param to it but it seems messy - just overloading it because the name is taken.
in CRM_Utils_System_Base at line 871
string
getBestUFUniqueIdentifier(object $user = NULL)
Return a unique identifier (usually an email address or username) from the UserFramework / CMS system.
This is based on the user object passed, defaulting to the logged in user if not passed.
Note that ambiguous situation occurs in CRM_Core_BAO_UFMatch::synchronize - a cleaner approach would seem to be resolving the unique identifier before calling the function.
in CRM_Utils_System_Base at line 884
array
getModules()
List modules installed in the CMS, including enabled and disabled ones.
in CRM_Utils_System_Base at line 896
string|null
getUserRecordUrl(int $contactID)
Get Url to view user record.
in CRM_Utils_System_Base at line 905
bool
checkPermissionAddUser()
Is the current user permitted to add a user.
in CRM_Utils_System_Base at line 914
outputError(string $content)
Output code from error function.
in CRM_Utils_System_Base at line 923
logger(string $message)
Log error to CMS.
in CRM_Utils_System_Base at line 931
appendCoreResources(GenericHookEvent $e)
Append to coreResourcesList.
in CRM_Utils_System_Base at line 939
alterAssetUrl(GenericHookEvent $e)
Modify dynamic assets.
in CRM_Utils_System_Base at line 946
setHttpHeader(string $name, string $value)
in CRM_Utils_System_Base at line 956
array
synchronizeUsers()
Create CRM contacts for all existing CMS users
in CRM_Utils_System_Base at line 966
sendResponse(ResponseInterface $response)
Send an HTTP Response base on PSR HTTP RespnseInterface response.
at line 55
bool
checkPermission(string $str)
Given a permission string, check for access requirements
at line 87
setEmail(object $user)
Set the email address of the user.
at line 107
swapUF()
Swap the current UF for soap.