CRM_Utils_System_Joomla
class CRM_Utils_System_Joomla extends CRM_Utils_System_Base
Joomla 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 |
Methods
No description
No description
No description
No description
No description
FIXME: Do something
No description
FIXME: Use CMS-native approach
No description
Clear CMS caches related to the user registration/profile forms.
No description
If we are using a theming system, invoke theme, else just print the content.
Get the absolute path to the site's base url.
No description
Format the url as per language Negotiation.
Determine the location of the CMS root.
No description
No description
No description
No description
No description
Set a init session with user object.
Reset any system caches that may be required for proper CiviCRM integration.
No description
No description
No description
No description
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.
No description
No description
No description
Get an array of user details for a contact, containing at minimum the user ID & name.
No description
No description
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.
Get a list of all installed modules, including enabled and disabled ones
No description
No description
Output code from error function.
Append Joomla js to coreResourcesList.
No description
Class constructor.
Check if username and email exists in the Joomla db.
Set the email address of the user.
Load joomla bootstrap.
Details
in CRM_Utils_System_Base at line 53
initialize()
at line 185
appendBreadCrumb(array $breadCrumbs)
at line 211
resetBreadCrumb()
at line 217
addHTMLHead($string = NULL)
in CRM_Utils_System_Base at line 85
mapConfigToSSL()
Rewrite various system urls to https.
in CRM_Utils_System_Base at line 98
string
postURL(string $action)
Figure out the post url for QuickForm.
at line 251
string
url(string $path = NULL, string $query = NULL, bool $absolute = FALSE, string $fragment = NULL, bool $frontend = FALSE, bool $forceBackend = FALSE)
at line 329
array|bool
authenticate(string $name, string $password, bool $loadCMSBootstrap = FALSE, string $realPath = NULL)
at line 431
setMessage(string $message)
FIXME: Do something
at line 440
bool
loadUser(string $username, string $password = NULL)
at line 465
permissionDenied()
FIXME: Use CMS-native approach
at line 472
logout()
in CRM_Utils_System_Base at line 199
updateCategories()
Clear CMS caches related to the user registration/profile forms.
Used when updating/embedding profiles on CMS user forms.
at line 480
string|null
getUFLocale()
in CRM_Utils_System_Base at line 230
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 286
string
getDefaultBlockLocation()
in CRM_Utils_System_Base at line 295
bool|mixed|string
getAbsoluteBaseURL()
Get the absolute path to the site's base url.
in CRM_Utils_System_Base at line 317
bool
getRelativeBaseURL()
Get the relative path to the sites base url.
at line 500
string
getVersion()
in CRM_Utils_System_Base at line 346
string
languageNegotiationURL(string $url, bool $addLanguagePart = TRUE, bool $removeLanguagePart = FALSE)
Format the url as per language Negotiation.
at line 696
string|null
cmsRootPath()
Determine the location of the CMS root.
at line 54
int|bool
createUser(array $params, string $mail)
at line 97
updateCMSName(int $ufID, $ufName)
at line 572
bool
isUserLoggedIn()
at line 642
string
getLoginURL(string $destination = '')
at line 658
string|NULL
getLoginDestination(CRM_Core_Form $form)
in CRM_Utils_System_Base at line 431
getUfId(string $username)
Determine the native ID of the CMS user.
at line 492
bool
setUFLocale(string $civicrm_language)
at line 417
setUserSession(array $data)
Set a init session with user object.
in CRM_Utils_System_Base at line 463
flush()
Reset any system caches that may be required for proper CiviCRM integration.
in CRM_Utils_System_Base at line 470
clearResourceCache()
Flush css/js caches.
in CRM_Utils_System_Base at line 487
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 504
bool
addScript(string $code, string $region)
Add an inline script.
Note: This function is not to be called directly
at line 227
bool
addStyleUrl(string $url, string $region)
at line 239
bool
addStyle(string $code, string $region)
at line 170
setTitle(string $title, string|null $pageTitle = NULL)
at line 708
array
getDefaultSiteSettings(string $dir = NULL)
in CRM_Utils_System_Base at line 582
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 631
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 688
userLoginFinalize(array $params = array())
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 694
setMySQLTimeZone()
Set timezone in mysql so that timestamp fields show the correct time.
in CRM_Utils_System_Base at line 708
string|false|null
getTimeZoneOffset()
Get timezone from CMS.
at line 610
string
getTimeZoneString()
at line 603
mixed
getUniqueIdentifierFromUserObject(object $user)
at line 596
null|int
getUserIDFromUserObject(object $user)
in CRM_Utils_System_Base at line 777
array
getUser(int $contactID)
Get an array of user details for a contact, containing at minimum the user ID & name.
at line 580
int|null
getLoggedInUfID()
at line 588
string|null
getLoggedInUniqueIdentifier()
in CRM_Utils_System_Base at line 824
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 844
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.
at line 621
array
getModules()
Get a list of all installed modules, including enabled and disabled ones
at line 738
string|null
getUserRecordUrl(int $contactID)
at line 753
bool
checkPermissionAddUser()
at line 763
outputError(string $content)
Output code from error function.
in CRM_Utils_System_Base at line 896
logger(string $message)
Log error to CMS.
at line 781
appendCoreResources(array $list)
Append Joomla js to coreResourcesList.
in CRM_Utils_System_Base at line 911
setHttpHeader(string $name, string $value)
at line 788
array
synchronizeUsers()
at line 41
__construct()
Class constructor.
at line 120
checkUserNameEmailExists(array $params, array $errors, string $emailName = 'email')
Check if username and email exists in the Joomla db.
at line 316
setEmail(object $user)
Set the email address of the user.
at line 523
bool
loadBootStrap(array $params = array(), bool $loadUser = TRUE, bool|throw $throwError = TRUE, null $realPath = NULL, bool $loadDefines = TRUE)
Load joomla bootstrap.