Documentation

CRM_Utils_System_Joomla extends CRM_Utils_System_Base
in package

Joomla specific stuff goes here.

Table of Contents

Properties

$is_drupal  : bool
Deprecated property to check if this is a drupal install.
$is_joomla  : bool
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
$is_wordpress  : bool
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
$supports_form_extensions  : bool
$supports_UF_Logging  : bool
Does this CMS / UF support a CMS specific logging mechanism?

Methods

__construct()  : mixed
Class constructor.
addHTMLHead()  : mixed
Append a string to the head of the html file.
addScript()  : bool
Add an inline script.
addScriptUrl()  : bool
Add a script file.
addStyle()  : bool
Add an inline style.
addStyleUrl()  : bool
Add a css file.
allowSynchronizeUsers()  : bool
Whether to allow access to CMS user sync action
alterAssetUrl()  : mixed
Modify dynamic assets.
appendBreadCrumb()  : mixed
Append an additional breadcrumb tag to the existing breadcrumb.
appendCoreResources()  : mixed
Append to coreResourcesList.
authenticate()  : array<string|int, mixed>|bool
Authenticate the user against the CMS db.
canSetBasePage()  : bool
Can set base page for CiviCRM By default, CiviCRM will generate front-facing pages using the home page. This allows a different template for CiviCRM pages.
checkCleanurls()  : mixed
checkPermissionAddUser()  : bool
Is the current user permitted to add a user.
checkUserNameEmailExists()  : mixed
Check if username and email exists in the CMS.
clearResourceCache()  : mixed
Flush css/js caches.
cmsRootPath()  : string|null
Determine the location of the CMS root.
createUser()  : int|bool
Create a user in the CMS.
currentPath()  : string|null
Path of the current page e.g. 'civicrm/contact/view'
flush()  : mixed
Reset any system caches that may be required for proper CiviCRM integration.
getAbsoluteBaseURL()  : bool|mixed|string
Get the absolute path to the site's base url.
getBasePath()  : mixed
Setup the base path related constant.
getBestUFID()  : int
Return a UFID (user account ID from the UserFramework / CMS system.
getBestUFUniqueIdentifier()  : string
Return a unique identifier (usually an email address or username) from the UserFramework / CMS system.
getCiviSourceStorage()  : array<string|int, mixed>
Determine the location of the CiviCRM source tree.
getCMSPermissionsUrlParams()  : array<string|int, mixed>
Return the CMS-specific url for its permissions page
getContactDetailsFromUser()  : array<string|int, mixed>
Get Contact details from User The contact parameters here will be used to create a Contact record to match the user record.
getContentTemplate()  : string
Returns the Smarty template path to the main template that renders the content.
getCRMDatabasePrefix()  : string
Get the CRM database as a 'prefix'.
getDefaultBlockLocation()  : string
getDefaultFileStorage()  : array<string|int, mixed>
Determine the default location for file storage.
getDefaultSiteSettings()  : array<string|int, mixed>
Return default Site Settings.
getEmailFieldName()  : string
Get email field name from form values
getJVersion()  : mixed
getLoggedInUfID()  : int|null
Get currently logged in user uf id.
getLoggedInUniqueIdentifier()  : string|null
Get currently logged in user unique identifier - this tends to be the email address or user name.
getLoginDestination()  : string|null
Get the login destination string.
getLoginURL()  : string
Get user login URL for hosting CMS (method declared in each CMS system class)
getModules()  : array<string|int, mixed>
Get a list of all installed modules, including enabled and disabled ones
getNotifyUrl()  : string
Return the Notification URL for Payments.
getRelativeBaseURL()  : string|false
Get the relative path to the sites base url.
getRoleNames()  : array<string|int, mixed>|null
Get role names
getSessionId()  : mixed
This exists because of https://www.drupal.org/node/3006306 where they changed so that they don't start sessions for anonymous, but we want that.
getTimeZoneOffset()  : string|false|null
Get timezone offset from CMS
getTimeZoneString()  : string
Get timezone from CMS as a string.
getUfGroupTypes()  : array<string|int, mixed>
Return the CMS-specific UF Group Types for profiles.
getUfId()  : mixed
Determine the native ID of the CMS user.
getUFLocale()  : string|null
Get the locale set in the CMS.
getUniqueIdentifierFromUserObject()  : mixed
Get Unique Identifier from UserFramework system (CMS).
getUser()  : array<string|int, mixed>
Get an array of user details for a contact, containing at minimum the user ID & name.
getUserIDFromUserObject()  : null|int
Get User ID from UserFramework system (CMS).
getUserRecordUrl()  : string|null
Get Url to view user record.
getVersion()  : string
Get CMS Version.
hasUsersTable()  : bool
Has CMS users table
initialize()  : mixed
invalidateRouteCache()  : mixed
Invalidates the cache of dynamic routes and forces a rebuild.
ipAddress()  : string
Get the client's IP address.
isFrontEndPage()  : bool
Is a front end page being accessed.
isPasswordUserGenerated()  : bool
Check if user can create passwords or is initially assigned a system-generated one.
isUserLoggedIn()  : bool
Check if user is logged in to the CMS.
isUserRegistrationPermitted()  : bool
Check if user registration is permitted.
languageNegotiationURL()  : string
Format the url as per language Negotiation.
loadBootStrap()  : bool
Load joomla bootstrap.
loadUser()  : bool
Load user into session.
logger()  : mixed
Log error to CMS.
logout()  : mixed
Immediately stop script execution, log out the user and redirect to the home page.
mailingWorkflowIsEnabled()  : bool
Check if mailing workflow is enabled
mapConfigToSSL()  : mixed
Rewrite various system urls to https.
modifyStandaloneProfile()  : string
Modify standalone profile
outputError()  : mixed
Output code from error function.
permissionDenied()  : mixed
FIXME: Use CMS-native approach
postContainerBoot()  : void
Hook for further system boot once the main CiviCRM Container is up (only used in Standalone currently)
postURL()  : string
Figure out the post url for QuickForm.
prePostRedirect()  : mixed
Perform any necessary actions prior to redirecting via POST.
resetBreadCrumb()  : mixed
Reset an additional breadcrumb tag to the existing breadcrumb.
sendResponse()  : mixed
Send an HTTP Response base on PSR HTTP RespnseInterface response.
sessionStart()  : mixed
Start a new session.
setEmail()  : mixed
Set the email address of the user.
setHttpHeader()  : mixed
setMessage()  : mixed
FIXME: Do something
setMySQLTimeZone()  : mixed
Set MySQL timezone so that timestamp fields show the correct time.
setPhpTimeZone()  : mixed
Set PHP timezone
setTimeZone()  : mixed
Set system timezone (both PHP + MySQL)
setTitle()  : mixed
Sets the title of the page.
setUFLocale()  : bool
Set the localisation from the user framework.
setUserSession()  : mixed
Set a init session with user object.
showPasswordFieldWhenAdminCreatesUser()  : mixed
Should the admin be able to set the password when creating a user or does the CMS want it a different way.
suppressProfileFormErrors()  : bool
Suppress profile form errors
synchronizeUsers()  : array<string|int, mixed>
Create CRM contacts for all existing CMS users
synchronizeUsersIfAllowed()  : array<string|int, mixed>
Run CMS user sync if allowed, otherwise just returns empty array
theme()  : string|null
If we are using a theming system, invoke theme, else just print the content.
updateCategories()  : mixed
Clear CMS caches related to the user registration/profile forms.
updateCMSName()  : mixed
Update a user's email address in the CMS.
url()  : string
Generate the url string to a CiviCRM path.
userLoginFinalize()  : mixed
Perform any post login activities required by the CMS.
verifyPassword()  : mixed
Verify password
viewsExists()  : bool
Determine if the Views module exists.
viewsIntegration()  : string
CiviCRM Table prefixes To display for CMS integration.

Properties

$is_drupal

Deprecated property to check if this is a drupal install.

TRUE, if the CMS is Drupal.

public bool $is_drupal = \FALSE

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

$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

TRUE, if the CMS is Joomla!.

public bool $is_joomla = \FALSE

$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

TRUE, if the CMS is WordPress.

public bool $is_wordpress = \FALSE

$supports_form_extensions

public bool $supports_form_extensions = \FALSE

TRUE, if the CMS allows CMS forms to be extended by hooks.

$supports_UF_Logging

Does this CMS / UF support a CMS specific logging mechanism?

public bool $supports_UF_Logging = \FALSE
Tags
todo
  • we should think about offering up logging mechanisms in a way that is also extensible by extensions

Methods

__construct()

Class constructor.

public __construct() : mixed

addHTMLHead()

Append a string to the head of the html file.

public addHTMLHead([mixed $string = NULL ]) : mixed
Parameters
$string : mixed = NULL
Tags
inheritDoc

addScript()

Add an inline script.

public addScript(string $code, string $region) : bool

Note: This function is not to be called directly

Parameters
$code : string

javascript code

$region : string

location within the document: 'html-header', 'page-header', 'page-footer'.

Tags
see
CRM_Core_Region::render()
Return values
bool

TRUE if we support this operation in this CMS, FALSE otherwise

addScriptUrl()

Add a script file.

public addScriptUrl(string $url, string $region) : bool

Note: This function is not to be called directly

Parameters
$url : string

absolute path to file

$region : string

location within the document: 'html-header', 'page-header', 'page-footer'.

Tags
see
CRM_Core_Region::render()
Return values
bool

TRUE if we support this operation in this CMS, FALSE otherwise

addStyle()

Add an inline style.

public addStyle(mixed $code, mixed $region) : bool
Parameters
$code : mixed

css code

$region : mixed

location within the document: 'html-header', 'page-header', 'page-footer'.

Tags
inheritDoc
Return values
bool

TRUE if we support this operation in this CMS, FALSE otherwise

addStyleUrl()

Add a css file.

public addStyleUrl(mixed $url, mixed $region) : bool
Parameters
$url : mixed

absolute path to file

$region : mixed

location within the document: 'html-header', 'page-header', 'page-footer'.

Tags
inheritDoc
Return values
bool

TRUE if we support this operation in this CMS, FALSE otherwise

allowSynchronizeUsers()

Whether to allow access to CMS user sync action

public allowSynchronizeUsers() : bool
Return values
bool

appendBreadCrumb()

Append an additional breadcrumb tag to the existing breadcrumb.

public appendBreadCrumb(mixed $breadCrumbs) : mixed
Parameters
$breadCrumbs : mixed
Tags
inheritDoc

authenticate()

Authenticate the user against the CMS db.

public authenticate(mixed $name, mixed $password[, mixed $loadCMSBootstrap = FALSE ][, mixed $realPath = NULL ]) : array<string|int, mixed>|bool
Parameters
$name : mixed

The user name.

$password : mixed

The password for the above user.

$loadCMSBootstrap : mixed = FALSE

Load cms bootstrap?.

$realPath : mixed = NULL

Filename of script

Tags
inheritDoc
Return values
array<string|int, mixed>|bool

[contactID, ufID, unique string] else false if no auth

canSetBasePage()

Can set base page for CiviCRM By default, CiviCRM will generate front-facing pages using the home page. This allows a different template for CiviCRM pages.

public canSetBasePage() : bool
Return values
bool

checkCleanurls()

public checkCleanurls() : mixed

checkPermissionAddUser()

Is the current user permitted to add a user.

public checkPermissionAddUser() : bool
Tags
inheritDoc
Return values
bool

checkUserNameEmailExists()

Check if username and email exists in the CMS.

public checkUserNameEmailExists(mixed &$params, mixed &$errors[, mixed $emailName = 'email' ]) : mixed
Parameters
$params : mixed

Array of name and mail values.

$errors : mixed

Array of errors.

$emailName : mixed = 'email'

Field label for the 'email'.

Tags
inheritdoc

clearResourceCache()

Flush css/js caches.

public clearResourceCache() : mixed

cmsRootPath()

Determine the location of the CMS root.

public cmsRootPath() : string|null
Return values
string|null

local file system path to CMS root, or NULL if it cannot be determined

createUser()

Create a user in the CMS.

public createUser(mixed &$params, mixed $mailParam) : int|bool
Parameters
$params : mixed
$mailParam : mixed

Name of the $param which contains the email address. Because. Right. OK. That's what it is.

Tags
inheritDoc
Return values
int|bool

uid if user exists, false otherwise

currentPath()

Path of the current page e.g. 'civicrm/contact/view'

public static currentPath() : string|null
Return values
string|null

the current menu path

flush()

Reset any system caches that may be required for proper CiviCRM integration.

public flush() : mixed

getAbsoluteBaseURL()

Get the absolute path to the site's base url.

public getAbsoluteBaseURL() : bool|mixed|string
Return values
bool|mixed|string

getBasePath()

Setup the base path related constant.

public getBasePath() : mixed

getBestUFID()

Return a UFID (user account ID from the UserFramework / CMS system.

public getBestUFID([object $user = NULL ]) : int

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.

Parameters
$user : object = NULL
Return values
int

User ID of UF System

getBestUFUniqueIdentifier()

Return a unique identifier (usually an email address or username) from the UserFramework / CMS system.

public getBestUFUniqueIdentifier([object $user = NULL ]) : string

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.

Parameters
$user : object = NULL
Return values
string

unique identifier from the UF System

getCiviSourceStorage()

Determine the location of the CiviCRM source tree.

public getCiviSourceStorage() : array<string|int, mixed>

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.
Return values
array<string|int, mixed>
  • url: string. ex: "http://example.com/sites/all/modules/civicrm"
  • path: string. ex: "/var/www/sites/all/modules/civicrm"

getCMSPermissionsUrlParams()

Return the CMS-specific url for its permissions page

public getCMSPermissionsUrlParams() : array<string|int, mixed>
Return values
array<string|int, mixed>

getContactDetailsFromUser()

Get Contact details from User The contact parameters here will be used to create a Contact record to match the user record.

public getContactDetailsFromUser(mixed $uf_match) : array<string|int, mixed>
Parameters
$uf_match : mixed

Array of user object, unique ID.

Tags
inheritdoc
Return values
array<string|int, mixed>

Array of contact parameters.

getContentTemplate()

Returns the Smarty template path to the main template that renders the content.

public static getContentTemplate([mixed $print = 0 ]) : string

In CMS contexts, this goes inside their theme, but Standalone needs to render the full HTML page.

Parameters
$print : mixed = 0
Return values
string

getCRMDatabasePrefix()

Get the CRM database as a 'prefix'.

public getCRMDatabasePrefix() : string

This returns a string that can be prepended to a query to include a CRM table.

However, this string should contain backticks, or not, in accordance with the CMS's drupal views expectations, if any.

Return values
string

getDefaultBlockLocation()

public getDefaultBlockLocation() : string
Return values
string

getDefaultFileStorage()

Determine the default location for file storage.

public getDefaultFileStorage() : array<string|int, mixed>

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.
Return values
array<string|int, mixed>
  • url: string. ex: "http://example.com/sites/foo.com/files/civicrm"
  • path: string. ex: "/var/www/sites/foo.com/files/civicrm"

getDefaultSiteSettings()

Return default Site Settings.

public getDefaultSiteSettings([mixed $dir = NULL ]) : array<string|int, mixed>
Parameters
$dir : mixed = NULL
Tags
inheritDoc
Return values
array<string|int, mixed>
  • $url, (Joomla - non admin url)
  • $siteName,
  • $siteRoot

getEmailFieldName()

Get email field name from form values

public getEmailFieldName(CRM_Core_Form $form, array<string|int, mixed> $fields) : string
Parameters
$form : CRM_Core_Form
$fields : array<string|int, mixed>
Tags
inheritdoc
Return values
string

getJVersion()

public getJVersion(mixed $joomlaBase) : mixed
Parameters
$joomlaBase : mixed

getLoggedInUfID()

Get currently logged in user uf id.

public getLoggedInUfID() : int|null
Tags
inheritDoc
Return values
int|null

logged in user uf id.

getLoggedInUniqueIdentifier()

Get currently logged in user unique identifier - this tends to be the email address or user name.

public getLoggedInUniqueIdentifier() : string|null
Tags
inheritDoc
Return values
string|null

logged in user unique identifier

getLoginDestination()

Get the login destination string.

public getLoginDestination(mixed &$form) : string|null
Parameters
$form : mixed

Form object representing the 'current' form - to which the user will be returned.

Tags
inheritDoc
Return values
string|null

destination value for URL

getLoginURL()

Get user login URL for hosting CMS (method declared in each CMS system class)

public getLoginURL([mixed $destination = '' ]) : string
Parameters
$destination : mixed = ''

If present, add destination to querystring (works for Drupal and WordPress only).

Tags
inheritDoc
Return values
string

loginURL for the current CMS

getModules()

Get a list of all installed modules, including enabled and disabled ones

public getModules() : array<string|int, mixed>
Return values
array<string|int, mixed>

CRM_Core_Module

getNotifyUrl()

Return the Notification URL for Payments.

public getNotifyUrl([string $path = NULL ][, string $query = NULL ][, bool $absolute = FALSE ][, string $fragment = NULL ][, bool $frontend = FALSE ][, bool $forceBackend = FALSE ]) : string

The default is to pass the params through to url(). However the WordPress CMS class overrides this method because Notification URLs must always target the Base Page to avoid IPN failures when Forms are embedded in pages that require authentication.

Parameters
$path : string = NULL

The path being linked to, such as "civicrm/add".

$query : string = NULL

A query string to append to the link.

$absolute : bool = FALSE

Whether to force the output to be an absolute link (beginning with http). Useful for links that will be displayed outside the site, such as in an RSS feed.

$fragment : string = NULL

A fragment identifier (named anchor) to append to the link.

$frontend : bool = FALSE

This link should be to the CMS front end (applies to WP & Joomla).

$forceBackend : bool = FALSE

This link should be to the CMS back end (applies to WP & Joomla).

Return values
string

The Notification URL.

getRelativeBaseURL()

Get the relative path to the sites base url.

public getRelativeBaseURL() : string|false
Return values
string|false

getRoleNames()

Get role names

public getRoleNames() : array<string|int, mixed>|null
Return values
array<string|int, mixed>|null

getSessionId()

This exists because of https://www.drupal.org/node/3006306 where they changed so that they don't start sessions for anonymous, but we want that.

public getSessionId() : mixed

getTimeZoneOffset()

Get timezone offset from CMS

public getTimeZoneOffset() : string|false|null
Return values
string|false|null

getTimeZoneString()

Get timezone from CMS as a string.

public getTimeZoneString() : string
Tags
inheritDoc
Return values
string

Timezone string e.g. 'America/Los_Angeles'

getUfGroupTypes()

Return the CMS-specific UF Group Types for profiles.

public getUfGroupTypes() : array<string|int, mixed>
Return values
array<string|int, mixed>

getUfId()

Determine the native ID of the CMS user.

public getUfId(mixed $username) : mixed
Parameters
$username : mixed

getUFLocale()

Get the locale set in the CMS.

public getUFLocale() : string|null
Tags
inheritDoc
Return values
string|null

Locale or null for none

getUniqueIdentifierFromUserObject()

Get Unique Identifier from UserFramework system (CMS).

public getUniqueIdentifierFromUserObject(mixed $user) : mixed
Parameters
$user : mixed

Object as described by the User Framework.

Tags
inheritDoc
Return values
mixed

Unique identifier from the user Framework system

getUser()

Get an array of user details for a contact, containing at minimum the user ID & name.

public getUser(mixed $contactID) : array<string|int, mixed>
Parameters
$contactID : mixed
Tags
inheritDoc
Return values
array<string|int, mixed>

CMS user details including

  • id
  • name (ie the system user name.

getUserIDFromUserObject()

Get User ID from UserFramework system (CMS).

public getUserIDFromUserObject(mixed $user) : null|int
Parameters
$user : mixed

Object as described by the User Framework.

Tags
inheritDoc
Return values
null|int

getUserRecordUrl()

Get Url to view user record.

public getUserRecordUrl(mixed $contactID) : string|null
Parameters
$contactID : mixed

Contact ID.

Tags
inheritDoc
Return values
string|null

getVersion()

Get CMS Version.

public getVersion() : string
Tags
inheritDoc
Return values
string

hasUsersTable()

Has CMS users table

public hasUsersTable() : bool
Return values
bool

initialize()

public initialize() : mixed

invalidateRouteCache()

Invalidates the cache of dynamic routes and forces a rebuild.

public invalidateRouteCache() : mixed

ipAddress()

Get the client's IP address.

public ipAddress() : string
Return values
string

IP address

isFrontEndPage()

Is a front end page being accessed.

public isFrontEndPage() : bool

Generally this would be a contribution form or other public page as opposed to a backoffice page (like contact edit).

Tags
todo

Drupal uses the is_public setting - clarify & rationalise. See https://github.com/civicrm/civicrm-drupal/pull/546/files

Return values
bool

isPasswordUserGenerated()

Check if user can create passwords or is initially assigned a system-generated one.

public isPasswordUserGenerated() : bool
Tags
inheritDoc
Return values
bool

isUserLoggedIn()

Check if user is logged in to the CMS.

public isUserLoggedIn() : bool
Tags
inheritDoc
Return values
bool

isUserRegistrationPermitted()

Check if user registration is permitted.

public isUserRegistrationPermitted() : bool
Tags
inheritDoc
Return values
bool

languageNegotiationURL()

Format the url as per language Negotiation.

public languageNegotiationURL(string $url[, bool $addLanguagePart = TRUE ][, bool $removeLanguagePart = FALSE ]) : string
Parameters
$url : string
$addLanguagePart : bool = TRUE
$removeLanguagePart : bool = FALSE
Return values
string

Formatted url.

loadBootStrap()

Load joomla bootstrap.

public loadBootStrap([array<string|int, mixed> $params = [] ][, bool $loadUser = TRUE ][, bool|throw $throwError = TRUE ][, null $realPath = NULL ][, bool $loadDefines = TRUE ]) : bool
Parameters
$params : array<string|int, mixed> = []

with uid or name and password.

$loadUser : bool = TRUE

load cms user?.

$throwError : bool|throw = TRUE

throw error on failure?

$realPath : null = NULL
$loadDefines : bool = TRUE
Return values
bool

loadUser()

Load user into session.

public loadUser(string $username[, string $password = NULL ]) : bool
Parameters
$username : string
$password : string = NULL
Return values
bool

logger()

Log error to CMS.

public logger(string $message[, string|null $priority = NULL ]) : mixed
Parameters
$message : string
$priority : string|null = NULL

logout()

Immediately stop script execution, log out the user and redirect to the home page.

public logout() : mixed
Tags
inheritDoc

mailingWorkflowIsEnabled()

Check if mailing workflow is enabled

public mailingWorkflowIsEnabled() : bool
Return values
bool

mapConfigToSSL()

Rewrite various system urls to https.

public mapConfigToSSL() : mixed

modifyStandaloneProfile()

Modify standalone profile

public modifyStandaloneProfile(mixed $profile, mixed $params) : string
Parameters
$profile : mixed
$params : mixed
Tags
inheritdoc
Return values
string

outputError()

Output code from error function.

public outputError(string $content) : mixed
Parameters
$content : string

postContainerBoot()

Hook for further system boot once the main CiviCRM Container is up (only used in Standalone currently)

public postContainerBoot() : void

postURL()

Figure out the post url for QuickForm.

public postURL(string $action) : string
Parameters
$action : string

The default url if one is pre-specified.

Return values
string

The url to post the form.

prePostRedirect()

Perform any necessary actions prior to redirecting via POST.

public prePostRedirect() : mixed

resetBreadCrumb()

Reset an additional breadcrumb tag to the existing breadcrumb.

public resetBreadCrumb() : mixed
Tags
inheritDoc

sendResponse()

Send an HTTP Response base on PSR HTTP RespnseInterface response.

public sendResponse(ResponseInterface $response) : mixed
Parameters
$response : ResponseInterface

sessionStart()

Start a new session.

public sessionStart() : mixed

setEmail()

Set the email address of the user.

public setEmail(object &$user) : mixed
Parameters
$user : object

Handle to the user object.

setHttpHeader()

public setHttpHeader(string $name, string $value) : mixed
Parameters
$name : string
$value : string

setMessage()

FIXME: Do something

public setMessage(string $message) : mixed
Parameters
$message : string

setMySQLTimeZone()

Set MySQL timezone so that timestamp fields show the correct time.

public setMySQLTimeZone([string|null $timeZone = NULL ]) : mixed
Parameters
$timeZone : string|null = NULL

Timezone string - if none provided will be fetched from system

setPhpTimeZone()

Set PHP timezone

public setPhpTimeZone([string|null $timeZone = NULL ]) : mixed
Parameters
$timeZone : string|null = NULL

Timezone string - default value will be fetched using getTimeZoneString if not provided or falsey

setTimeZone()

Set system timezone (both PHP + MySQL)

public setTimeZone([string|null $timeZone = NULL ]) : mixed
Parameters
$timeZone : string|null = NULL

setTitle()

Sets the title of the page.

public setTitle(mixed $title[, mixed $pageTitle = NULL ]) : mixed
Parameters
$title : mixed

Title to set in html header

$pageTitle : mixed = NULL

Title to set in html body (if different)

Tags
inheritDoc

setUFLocale()

Set the localisation from the user framework.

public setUFLocale(mixed $civicrm_language) : bool
Parameters
$civicrm_language : mixed
Tags
inheritDoc
Return values
bool

setUserSession()

Set a init session with user object.

public setUserSession(array<string|int, mixed> $data) : mixed
Parameters
$data : array<string|int, mixed>

Array with user specific data.

showPasswordFieldWhenAdminCreatesUser()

Should the admin be able to set the password when creating a user or does the CMS want it a different way.

public showPasswordFieldWhenAdminCreatesUser() : mixed

suppressProfileFormErrors()

Suppress profile form errors

public suppressProfileFormErrors() : bool
Return values
bool

synchronizeUsers()

Create CRM contacts for all existing CMS users

public synchronizeUsers() : array<string|int, mixed>
Tags
inheritDoc
Return values
array<string|int, mixed>

synchronizeUsersIfAllowed()

Run CMS user sync if allowed, otherwise just returns empty array

public synchronizeUsersIfAllowed() : array<string|int, mixed>
Return values
array<string|int, mixed>

theme()

If we are using a theming system, invoke theme, else just print the content.

public theme(string &$content[, bool $print = FALSE ][, bool $maintenance = FALSE ]) : string|null
Parameters
$content : string

The content that will be themed.

$print : bool = FALSE

Are we displaying to the screen or bypassing theming?.

$maintenance : bool = FALSE

For maintenance mode.

Tags
throws
Exception
todo

The return value is inconsistent.

todo

Better to always return, and never print.

Return values
string|null

NULL, If $print is FALSE, and some other criteria match up. The themed string, otherwise.

updateCategories()

Clear CMS caches related to the user registration/profile forms.

public updateCategories() : mixed

Used when updating/embedding profiles on CMS user forms.

Tags
see

CRM-3600

updateCMSName()

Update a user's email address in the CMS.

public updateCMSName(mixed $ufID, mixed $ufName) : mixed
Parameters
$ufID : mixed

User ID in CMS.

$ufName : mixed
Tags
inheritDoc

url()

Generate the url string to a CiviCRM path.

public url([mixed $path = NULL ][, mixed $query = NULL ][, mixed $absolute = FALSE ][, mixed $fragment = NULL ][, mixed $frontend = FALSE ][, mixed $forceBackend = FALSE ]) : string
Parameters
$path : mixed = NULL

The path being linked to, such as "civicrm/add".

$query : mixed = NULL

A query string to append to the link.

$absolute : mixed = FALSE

Whether to force the output to be an absolute link (beginning with http). Useful for links that will be displayed outside the site, such as in an RSS feed.

$fragment : mixed = NULL

A fragment identifier (named anchor) to append to the link.

$frontend : mixed = FALSE

This link should be to the CMS front end (applies to WP & Joomla).

$forceBackend : mixed = FALSE

This link should be to the CMS back end (applies to WP & Joomla).

Tags
inheritDoc
Return values
string

userLoginFinalize()

Perform any post login activities required by the CMS.

public userLoginFinalize([array<string|int, mixed> $params = [] ]) : mixed

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.

Parameters
$params : array<string|int, mixed> = []

FIXME: Document values accepted/required by $params

verifyPassword()

Verify password

public verifyPassword(array<string|int, mixed> $params, array<string|int, mixed> &$errors) : mixed
Parameters
$params : array<string|int, mixed>

Array of name, mail and password values.

$errors : array<string|int, mixed>

Array of errors.

viewsExists()

Determine if the Views module exists.

public viewsExists() : bool
Return values
bool

viewsIntegration()

CiviCRM Table prefixes To display for CMS integration.

public viewsIntegration() : string
Return values
string

        
On this page

Search results