* If we are using a theming system, invoke theme, else just print the
* content
*
- * @param string $content the content that will be themed
- * @param boolean $print are we displaying to the screen or bypassing theming?
- * @param boolean $maintenance for maintenance mode
+ * @param string $content
+ * The content that will be themed.
+ * @param bool $print
+ * Are we displaying to the screen or bypassing theming?.
+ * @param bool $maintenance
+ * For maintenance mode.
*
* @throws Exception
* @return string|null
throw new \Exception('Constant "ABSPATH" is not defined, even though WordPress is the user framework.');
}
if (is_admin()) {
- require_once (ABSPATH . 'wp-admin/admin-header.php');
+ require_once ABSPATH . 'wp-admin/admin-header.php';
}
else {
// FIXME: we need to figure out to replace civicrm content on the frontend pages
/**
* Get user login URL for hosting CMS (method declared in each CMS system class)
*
- * @param string $destination - if present, add destination to querystring (works for Drupal only)
+ * @param string $destination
+ * If present, add destination to querystring (works for Drupal only).
*
* @return string - loginURL for the current CMS
* @static
*
* FIXME: Document values accepted/required by $params
*/
- public function userLoginFinalize($params = array()){
+ public function userLoginFinalize($params = array()) {
}
/**
* Set timezone in mysql so that timestamp fields show the correct time
*/
- public function setMySQLTimeZone(){
+ public function setMySQLTimeZone() {
$timeZoneOffset = $this->getTimeZoneOffset();
- if($timeZoneOffset){
+ if ($timeZoneOffset) {
$sql = "SET time_zone = '$timeZoneOffset'";
CRM_Core_DAO::executequery($sql);
}
*
* @return string|false|null
*/
- public function getTimeZoneOffset(){
+ public function getTimeZoneOffset() {
$timezone = $this->getTimeZoneString();
if ($timezone) {
$tzObj = new DateTimeZone($timezone);
return FALSE;
}
- $timeZoneOffset = sprintf("%02d:%02d", $tz / 3600, abs(($tz/60)%60));
+ $timeZoneOffset = sprintf("%02d:%02d", $tz / 3600, abs(($tz / 60) % 60));
if ($timeZoneOffset > 0) {
$timeZoneOffset = '+' . $timeZoneOffset;
/**
* Get Unique Identifier from UserFramework system (CMS)
- * @param object $user object as described by the User Framework
+ * @param object $user
+ * Object as described by the User Framework.
* @return mixed $uniqueIdentifer Unique identifier from the user Framework system
*
*/
- public function getUniqueIdentifierFromUserObject($user) {}
+ public function getUniqueIdentifierFromUserObject($user) {
+ }
/**
* Get User ID from UserFramework system (CMS)
- * @param object $user object as described by the User Framework
+ * @param object $user
+ * Object as described by the User Framework.
* @return mixed <NULL, number>
*
*/
- public function getUserIDFromUserObject($user) {}
+ public function getUserIDFromUserObject($user) {
+ }
/**
* Get currently logged in user uf id.
*
* @return int $userID logged in user uf id.
*/
- public function getLoggedInUfID() {}
+ public function getLoggedInUfID() {
+ }
/**
* Get currently logged in user unique identifier - this tends to be the email address or user name.
*
* @return string $userID logged in user unique identifier
*/
- public function getLoggedInUniqueIdentifier() {}
+ public function getLoggedInUniqueIdentifier() {
+ }
/**
* Return a UFID (user account ID from the UserFramework / CMS system being based on the user object
* @return int $ufid - user ID of UF System
*/
public function getBestUFID($user = NULL) {
- if($user) {
+ if ($user) {
return $this->getUserIDFromUserObject($user);
}
return $this->getLoggedInUfID();
* @return string $uniqueIdentifier - unique identifier from the UF System
*/
public function getBestUFUniqueIdentifier($user = NULL) {
- if($user) {
+ if ($user) {
return $this->getUniqueIdentifierFromUserObject($user);
}
return $this->getLoggedInUniqueIdentifier();
/**
* Get Url to view user record
- * @param integer $contactID Contact ID
+ * @param int $contactID
+ * Contact ID.
*
* @return string
*/
/**
* Append to coreResourcesList
*/
- public function appendCoreResources(&$list) {}
+ public function appendCoreResources(&$list) {
+ }
}