* 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
*
- * @deprecated
* @var bool
+ * @deprecated
* TRUE, if the CMS is Drupal.
*/
- var $is_drupal = FALSE;
+ public $is_drupal = FALSE;
/**
* 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
*
- * @deprecated
* @var bool
+ * @deprecated
* TRUE, if the CMS is Joomla!.
*/
- var $is_joomla = FALSE;
+ public $is_joomla = FALSE;
/**
* 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
*
- * @deprecated
* @var bool
+ * @deprecated
* TRUE, if the CMS is WordPress.
*/
- var $is_wordpress = FALSE;
+ public $is_wordpress = FALSE;
/**
* Does this CMS / UF support a CMS specific logging mechanism?
- * @todo - we should think about offering up logging mechanisms in a way that is also extensible by extensions
* @var bool
+ * @todo - we should think about offering up logging mechanisms in a way that is also extensible by extensions
*/
- var $supports_UF_Logging = FALSE;
+ public $supports_UF_Logging = FALSE;
/**
* @var bool
* TRUE, if the CMS allows CMS forms to be extended by hooks.
*/
- var $supports_form_extensions = FALSE;
+ public $supports_form_extensions = FALSE;
public function initialize() {
if (\CRM_Utils_System::isSSL()) {
}
}
+ abstract public function loadBootStrap($params = [], $loadUser = TRUE, $throwError = TRUE, $realPath = NULL);
+
/**
* Append an additional breadcrumb tag to the existing breadcrumb.
*
if ($region = CRM_Core_Region::instance('html-header', FALSE)) {
CRM_Utils_System::addHTMLHead($region->render(''));
}
- print theme('maintenance_page', array('content' => $content));
+ print theme('maintenance_page', ['content' => $content]);
exit();
}
// TODO: Figure out why D7 returns but everyone else prints
}
$out = $content;
- $config = &CRM_Core_Config::singleton();
if (
!$print &&
- $config->userFramework == 'WordPress'
+ CRM_Core_Config::singleton()->userFramework == 'WordPress'
) {
if (!function_exists('is_admin')) {
throw new \Exception('Function "is_admin()" is missing, even though WordPress is the user framework.');
* @return string
* loginURL for the current CMS
*/
- public abstract function getLoginURL($destination = '');
+ abstract public function getLoginURL($destination = '');
/**
* Get the login destination string.
public function getDefaultSiteSettings($dir) {
$config = CRM_Core_Config::singleton();
$url = $config->userFrameworkBaseURL;
- return array($url, NULL, NULL);
+ return [$url, NULL, NULL];
}
/**
throw new CRM_Core_Exception("Failed to locate default file storage ($config->userFramework)");
}
- return array(
+ return [
'url' => $filesURL,
'path' => CRM_Utils_File::baseFilePath(),
- );
+ ];
}
/**
$userFrameworkResourceURL = NULL;
}
- return array(
+ return [
'url' => CRM_Utils_File::addTrailingSlash($userFrameworkResourceURL),
'path' => CRM_Utils_File::addTrailingSlash($civicrm_root),
- );
+ ];
}
/**
*
* FIXME: Document values accepted/required by $params
*/
- public function userLoginFinalize($params = array()) {
+ public function userLoginFinalize($params = []) {
}
/**
}
}
-
/**
* Get timezone from CMS.
*
* - name (ie the system user name.
*/
public function getUser($contactID) {
- $ufMatch = civicrm_api3('UFMatch', 'getsingle', array(
+ $ufMatch = civicrm_api3('UFMatch', 'getsingle', [
'contact_id' => $contactID,
'domain_id' => CRM_Core_Config::domainID(),
- ));
- return array(
+ ]);
+ return [
'id' => $ufMatch['uf_id'],
'name' => $ufMatch['uf_name'],
- );
+ ];
}
/**
* [CRM_Core_Module]
*/
public function getModules() {
- return array();
+ return [];
}
/**
/**
* Append to coreResourcesList.
*
- * @param array $list
+ * @param \Civi\Core\Event\GenericHookEvent $e
*/
- public function appendCoreResources(&$list) {
+ public function appendCoreResources(\Civi\Core\Event\GenericHookEvent $e) {
}
/**
*/
public function synchronizeUsers() {
throw new Exception('CMS user creation not supported for this framework');
- return array();
+ return [];
}
}