| 1 | <?php |
| 2 | |
| 3 | /** |
| 4 | * Base class for UF system integrations |
| 5 | */ |
| 6 | abstract class CRM_Utils_System_Base { |
| 7 | /** |
| 8 | * Deprecated property to check if this is a drupal install. The correct method is to have functions on the UF classes for all UF specific |
| 9 | * functions and leave the codebase oblivious to the type of CMS |
| 10 | * |
| 11 | * @deprecated |
| 12 | * @var bool |
| 13 | * TRUE, if the CMS is Drupal. |
| 14 | */ |
| 15 | var $is_drupal = FALSE; |
| 16 | |
| 17 | /** |
| 18 | * 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 |
| 19 | * functions and leave the codebase oblivious to the type of CMS |
| 20 | * |
| 21 | * @deprecated |
| 22 | * @var bool |
| 23 | * TRUE, if the CMS is Joomla!. |
| 24 | */ |
| 25 | var $is_joomla = FALSE; |
| 26 | |
| 27 | /** |
| 28 | * 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 |
| 29 | * functions and leave the codebase oblivious to the type of CMS |
| 30 | * |
| 31 | * @deprecated |
| 32 | * @var bool |
| 33 | * TRUE, if the CMS is WordPress. |
| 34 | */ |
| 35 | var $is_wordpress = FALSE; |
| 36 | |
| 37 | /** |
| 38 | * Does this CMS / UF support a CMS specific logging mechanism? |
| 39 | * @todo - we should think about offering up logging mechanisms in a way that is also extensible by extensions |
| 40 | * @var bool |
| 41 | */ |
| 42 | var $supports_UF_Logging = FALSE; |
| 43 | |
| 44 | /** |
| 45 | * @var bool |
| 46 | * TRUE, if the CMS allows CMS forms to be extended by hooks. |
| 47 | */ |
| 48 | var $supports_form_extensions = FALSE; |
| 49 | |
| 50 | /** |
| 51 | * Append an additional breadcrumb tag to the existing breadcrumb. |
| 52 | * |
| 53 | * @param array $breadCrumbs |
| 54 | */ |
| 55 | public function appendBreadCrumb($breadCrumbs) { |
| 56 | } |
| 57 | |
| 58 | /** |
| 59 | * Reset an additional breadcrumb tag to the existing breadcrumb. |
| 60 | */ |
| 61 | public function resetBreadCrumb() { |
| 62 | } |
| 63 | |
| 64 | /** |
| 65 | * Append a string to the head of the html file. |
| 66 | * |
| 67 | * @param string $head |
| 68 | * The new string to be appended. |
| 69 | */ |
| 70 | public function addHTMLHead($head) { |
| 71 | } |
| 72 | |
| 73 | /** |
| 74 | * Rewrite various system urls to https. |
| 75 | */ |
| 76 | public function mapConfigToSSL() { |
| 77 | // dont need to do anything, let CMS handle their own switch to SSL |
| 78 | } |
| 79 | |
| 80 | /** |
| 81 | * Figure out the post url for QuickForm. |
| 82 | * |
| 83 | * @param string $action |
| 84 | * The default url if one is pre-specified. |
| 85 | * |
| 86 | * @return string |
| 87 | * The url to post the form. |
| 88 | */ |
| 89 | public function postURL($action) { |
| 90 | $config = CRM_Core_Config::singleton(); |
| 91 | if (!empty($action)) { |
| 92 | return $action; |
| 93 | } |
| 94 | |
| 95 | return $this->url(CRM_Utils_Array::value($config->userFrameworkURLVar, $_GET), |
| 96 | NULL, TRUE, NULL, FALSE |
| 97 | ); |
| 98 | } |
| 99 | |
| 100 | /** |
| 101 | * Generate the url string to a CiviCRM path. |
| 102 | * |
| 103 | * @param string $path |
| 104 | * The path being linked to, such as "civicrm/add". |
| 105 | * @param string $query |
| 106 | * A query string to append to the link. |
| 107 | * @param bool $absolute |
| 108 | * Whether to force the output to be an absolute link (beginning with http). |
| 109 | * Useful for links that will be displayed outside the site, such as in an RSS feed. |
| 110 | * @param string $fragment |
| 111 | * A fragment identifier (named anchor) to append to the link. |
| 112 | * @param bool $htmlize |
| 113 | * Whether to encode special html characters such as &. |
| 114 | * @param bool $frontend |
| 115 | * This link should be to the CMS front end (applies to WP & Joomla). |
| 116 | * @param bool $forceBackend |
| 117 | * This link should be to the CMS back end (applies to WP & Joomla). |
| 118 | * |
| 119 | * @return string |
| 120 | */ |
| 121 | public function url( |
| 122 | $path = NULL, |
| 123 | $query = NULL, |
| 124 | $absolute = FALSE, |
| 125 | $fragment = NULL, |
| 126 | $htmlize = TRUE, |
| 127 | $frontend = FALSE, |
| 128 | $forceBackend = FALSE |
| 129 | ) { |
| 130 | return NULL; |
| 131 | } |
| 132 | |
| 133 | /** |
| 134 | * Authenticate the user against the CMS db. |
| 135 | * |
| 136 | * @param string $name |
| 137 | * The user name. |
| 138 | * @param string $password |
| 139 | * The password for the above user. |
| 140 | * @param bool $loadCMSBootstrap |
| 141 | * Load cms bootstrap?. |
| 142 | * @param string $realPath |
| 143 | * Filename of script |
| 144 | * |
| 145 | * @return array|bool |
| 146 | * [contactID, ufID, unique string] else false if no auth |
| 147 | */ |
| 148 | public function authenticate($name, $password, $loadCMSBootstrap = FALSE, $realPath = NULL) { |
| 149 | return FALSE; |
| 150 | } |
| 151 | |
| 152 | /** |
| 153 | * Set a message in the CMS to display to a user. |
| 154 | * |
| 155 | * @param string $message |
| 156 | * The message to set. |
| 157 | */ |
| 158 | public function setMessage($message) { |
| 159 | } |
| 160 | |
| 161 | /** |
| 162 | * Load user into session. |
| 163 | * |
| 164 | * @param $user |
| 165 | * |
| 166 | * @return bool |
| 167 | */ |
| 168 | public function loadUser($user) { |
| 169 | return TRUE; |
| 170 | } |
| 171 | |
| 172 | /** |
| 173 | * Immediately stop script execution and display a 401 "Access Denied" page |
| 174 | */ |
| 175 | public function permissionDenied() { |
| 176 | CRM_Core_Error::fatal(ts('You do not have permission to access this page.')); |
| 177 | } |
| 178 | |
| 179 | /** |
| 180 | * Immediately stop script execution, log out the user and redirect to the home page |
| 181 | * |
| 182 | * @deprecated |
| 183 | * This function should be removed in favor of linking to the CMS's logout page |
| 184 | */ |
| 185 | public function logout() { |
| 186 | } |
| 187 | |
| 188 | /** |
| 189 | * Clear CMS caches related to the user registration/profile forms. |
| 190 | * Used when updating/embedding profiles on CMS user forms. |
| 191 | * @see CRM-3600 |
| 192 | */ |
| 193 | public function updateCategories() { |
| 194 | } |
| 195 | |
| 196 | /** |
| 197 | * Get the locale set in the CMS. |
| 198 | * |
| 199 | * @return string|null |
| 200 | * Locale or null for none |
| 201 | */ |
| 202 | public function getUFLocale() { |
| 203 | return NULL; |
| 204 | } |
| 205 | |
| 206 | /** |
| 207 | * If we are using a theming system, invoke theme, else just print the |
| 208 | * content |
| 209 | * |
| 210 | * @param string $content |
| 211 | * The content that will be themed. |
| 212 | * @param bool $print |
| 213 | * Are we displaying to the screen or bypassing theming?. |
| 214 | * @param bool $maintenance |
| 215 | * For maintenance mode. |
| 216 | * |
| 217 | * @throws Exception |
| 218 | * @return string|null |
| 219 | * NULL, If $print is FALSE, and some other criteria match up. |
| 220 | * The themed string, otherwise. |
| 221 | * |
| 222 | * @todo The return value is inconsistent. |
| 223 | * @todo Better to always return, and never print. |
| 224 | */ |
| 225 | public function theme(&$content, $print = FALSE, $maintenance = FALSE) { |
| 226 | $ret = FALSE; |
| 227 | |
| 228 | // TODO: Split up; this was copied verbatim from CiviCRM 4.0's multi-UF theming function |
| 229 | // but the parts should be copied into cleaner subclass implementations |
| 230 | $config = CRM_Core_Config::singleton(); |
| 231 | if ( |
| 232 | $config->userSystem->is_drupal && |
| 233 | function_exists('theme') && |
| 234 | !$print |
| 235 | ) { |
| 236 | if ($maintenance) { |
| 237 | drupal_set_breadcrumb(''); |
| 238 | drupal_maintenance_theme(); |
| 239 | if ($region = CRM_Core_Region::instance('html-header', FALSE)) { |
| 240 | CRM_Utils_System::addHTMLHead($region->render('')); |
| 241 | } |
| 242 | print theme('maintenance_page', array('content' => $content)); |
| 243 | exit(); |
| 244 | } |
| 245 | $ret = TRUE; // TODO: Figure out why D7 returns but everyone else prints |
| 246 | } |
| 247 | $out = $content; |
| 248 | |
| 249 | $config = &CRM_Core_Config::singleton(); |
| 250 | if ( |
| 251 | !$print && |
| 252 | $config->userFramework == 'WordPress' |
| 253 | ) { |
| 254 | if (!function_exists('is_admin')) { |
| 255 | throw new \Exception('Function "is_admin()" is missing, even though WordPress is the user framework.'); |
| 256 | } |
| 257 | if (!defined('ABSPATH')) { |
| 258 | throw new \Exception('Constant "ABSPATH" is not defined, even though WordPress is the user framework.'); |
| 259 | } |
| 260 | if (is_admin()) { |
| 261 | require_once ABSPATH . 'wp-admin/admin-header.php'; |
| 262 | } |
| 263 | else { |
| 264 | // FIXME: we need to figure out to replace civicrm content on the frontend pages |
| 265 | } |
| 266 | } |
| 267 | |
| 268 | if ($ret) { |
| 269 | return $out; |
| 270 | } |
| 271 | else { |
| 272 | print $out; |
| 273 | return NULL; |
| 274 | } |
| 275 | } |
| 276 | |
| 277 | /** |
| 278 | * @return string |
| 279 | */ |
| 280 | public function getDefaultBlockLocation() { |
| 281 | return 'left'; |
| 282 | } |
| 283 | |
| 284 | /** |
| 285 | * Get CMS Version. |
| 286 | * |
| 287 | * @return string |
| 288 | */ |
| 289 | public function getVersion() { |
| 290 | return 'Unknown'; |
| 291 | } |
| 292 | |
| 293 | /** |
| 294 | * Format the url as per language Negotiation. |
| 295 | * |
| 296 | * @param string $url |
| 297 | * @param bool $addLanguagePart |
| 298 | * @param bool $removeLanguagePart |
| 299 | * |
| 300 | * @return string |
| 301 | * Formatted url. |
| 302 | */ |
| 303 | public function languageNegotiationURL( |
| 304 | $url, |
| 305 | $addLanguagePart = TRUE, |
| 306 | $removeLanguagePart = FALSE |
| 307 | ) { |
| 308 | return $url; |
| 309 | } |
| 310 | |
| 311 | /** |
| 312 | * Determine the location of the CMS root. |
| 313 | * |
| 314 | * @return string|null |
| 315 | * Local file system path to CMS root, or NULL if it cannot be determined |
| 316 | */ |
| 317 | public function cmsRootPath() { |
| 318 | return NULL; |
| 319 | } |
| 320 | |
| 321 | /** |
| 322 | * Create a user in the CMS. |
| 323 | * |
| 324 | * @param array $params |
| 325 | * @param string $mail |
| 326 | * Email id for cms user. |
| 327 | * |
| 328 | * @return int|bool |
| 329 | * uid if user exists, false otherwise |
| 330 | */ |
| 331 | public function createUser(&$params, $mail) { |
| 332 | return FALSE; |
| 333 | } |
| 334 | |
| 335 | /** |
| 336 | * Update a user's email address in the CMS. |
| 337 | * |
| 338 | * @param int $ufID |
| 339 | * User ID in CMS. |
| 340 | * @param string $email |
| 341 | * Primary contact email address. |
| 342 | */ |
| 343 | public function updateCMSName($ufID, $email) { |
| 344 | } |
| 345 | |
| 346 | /** |
| 347 | * Check if user is logged in to the CMS. |
| 348 | * |
| 349 | * @return bool |
| 350 | */ |
| 351 | public function isUserLoggedIn() { |
| 352 | return FALSE; |
| 353 | } |
| 354 | |
| 355 | /** |
| 356 | * Get user login URL for hosting CMS (method declared in each CMS system class) |
| 357 | * |
| 358 | * @param string $destination |
| 359 | * If present, add destination to querystring (works for Drupal only). |
| 360 | * |
| 361 | * @return string |
| 362 | * loginURL for the current CMS |
| 363 | */ |
| 364 | public abstract function getLoginURL($destination = ''); |
| 365 | |
| 366 | /** |
| 367 | * Get the login destination string. When this is passed in the |
| 368 | * URL the user will be directed to it after filling in the CMS form |
| 369 | * |
| 370 | * @param CRM_Core_Form $form |
| 371 | * Form object representing the 'current' form - to which the user will be returned. |
| 372 | * @return string|NULL |
| 373 | * destination value for URL |
| 374 | */ |
| 375 | public function getLoginDestination(&$form) { |
| 376 | return NULL; |
| 377 | } |
| 378 | |
| 379 | /** |
| 380 | * Determine the native ID of the CMS user. |
| 381 | * |
| 382 | * @param string $username |
| 383 | * |
| 384 | * @throws CRM_Core_Exception |
| 385 | */ |
| 386 | public function getUfId($username) { |
| 387 | $className = get_class($this); |
| 388 | throw new CRM_Core_Exception("Not implemented: {$className}->getUfId"); |
| 389 | } |
| 390 | |
| 391 | /** |
| 392 | * Set a init session with user object. |
| 393 | * |
| 394 | * @param array $data |
| 395 | * Array with user specific data |
| 396 | */ |
| 397 | public function setUserSession($data) { |
| 398 | list($userID, $ufID) = $data; |
| 399 | $session = CRM_Core_Session::singleton(); |
| 400 | $session->set('ufID', $ufID); |
| 401 | $session->set('userID', $userID); |
| 402 | } |
| 403 | |
| 404 | /** |
| 405 | * Reset any system caches that may be required for proper CiviCRM |
| 406 | * integration. |
| 407 | */ |
| 408 | public function flush() { |
| 409 | // nullop by default |
| 410 | } |
| 411 | |
| 412 | /** |
| 413 | * Flush css/js caches |
| 414 | */ |
| 415 | public function clearResourceCache() { |
| 416 | // nullop by default |
| 417 | } |
| 418 | |
| 419 | /** |
| 420 | * Add a script file. |
| 421 | * |
| 422 | * Note: This function is not to be called directly |
| 423 | * @see CRM_Core_Region::render() |
| 424 | * |
| 425 | * @param $url : string, absolute path to file |
| 426 | * @param string $region |
| 427 | * location within the document: 'html-header', 'page-header', 'page-footer'. |
| 428 | * |
| 429 | * @return bool |
| 430 | * TRUE if we support this operation in this CMS, FALSE otherwise |
| 431 | */ |
| 432 | public function addScriptUrl($url, $region) { |
| 433 | return FALSE; |
| 434 | } |
| 435 | |
| 436 | /** |
| 437 | * Add an inline script. |
| 438 | * |
| 439 | * Note: This function is not to be called directly |
| 440 | * @see CRM_Core_Region::render() |
| 441 | * |
| 442 | * @param $code : string, javascript code |
| 443 | * @param string $region |
| 444 | * location within the document: 'html-header', 'page-header', 'page-footer'. |
| 445 | * |
| 446 | * @return bool |
| 447 | * TRUE if we support this operation in this CMS, FALSE otherwise |
| 448 | */ |
| 449 | public function addScript($code, $region) { |
| 450 | return FALSE; |
| 451 | } |
| 452 | |
| 453 | /** |
| 454 | * Add a css file. |
| 455 | * |
| 456 | * Note: This function is not to be called directly |
| 457 | * @see CRM_Core_Region::render() |
| 458 | * |
| 459 | * @param $url : string, absolute path to file |
| 460 | * @param string $region |
| 461 | * location within the document: 'html-header', 'page-header', 'page-footer'. |
| 462 | * |
| 463 | * @return bool |
| 464 | * TRUE if we support this operation in this CMS, FALSE otherwise |
| 465 | */ |
| 466 | public function addStyleUrl($url, $region) { |
| 467 | return FALSE; |
| 468 | } |
| 469 | |
| 470 | /** |
| 471 | * Add an inline style. |
| 472 | * |
| 473 | * Note: This function is not to be called directly |
| 474 | * @see CRM_Core_Region::render() |
| 475 | * |
| 476 | * @param $code : string, css code |
| 477 | * @param string $region |
| 478 | * location within the document: 'html-header', 'page-header', 'page-footer'. |
| 479 | * |
| 480 | * @return bool |
| 481 | * TRUE if we support this operation in this CMS, FALSE otherwise |
| 482 | */ |
| 483 | public function addStyle($code, $region) { |
| 484 | return FALSE; |
| 485 | } |
| 486 | |
| 487 | /** |
| 488 | * Sets the title of the page. |
| 489 | * |
| 490 | * @param string $title |
| 491 | * Title to set in html header |
| 492 | * @param string|null $pageTitle |
| 493 | * Title to set in html body (if different) |
| 494 | */ |
| 495 | public function setTitle($title, $pageTitle = NULL) { |
| 496 | } |
| 497 | |
| 498 | /** |
| 499 | * Return default Site Settings. |
| 500 | * |
| 501 | * @param string $dir |
| 502 | * |
| 503 | * @return array |
| 504 | * - $url, (Joomla - non admin url) |
| 505 | * - $siteName, |
| 506 | * - $siteRoot |
| 507 | */ |
| 508 | public function getDefaultSiteSettings($dir) { |
| 509 | $config = CRM_Core_Config::singleton(); |
| 510 | $url = $config->userFrameworkBaseURL; |
| 511 | return array($url, NULL, NULL); |
| 512 | } |
| 513 | |
| 514 | /** |
| 515 | * Perform any post login activities required by the CMS - |
| 516 | * e.g. for drupal: records a watchdog message about the new session, saves the login timestamp, |
| 517 | * calls hook_user op 'login' and generates a new session. |
| 518 | * |
| 519 | * @param array $params |
| 520 | * |
| 521 | * FIXME: Document values accepted/required by $params |
| 522 | */ |
| 523 | public function userLoginFinalize($params = array()) { |
| 524 | } |
| 525 | |
| 526 | /** |
| 527 | * Set timezone in mysql so that timestamp fields show the correct time. |
| 528 | */ |
| 529 | public function setMySQLTimeZone() { |
| 530 | $timeZoneOffset = $this->getTimeZoneOffset(); |
| 531 | if ($timeZoneOffset) { |
| 532 | $sql = "SET time_zone = '$timeZoneOffset'"; |
| 533 | CRM_Core_DAO::executequery($sql); |
| 534 | } |
| 535 | } |
| 536 | |
| 537 | |
| 538 | /** |
| 539 | * Get timezone from CMS. |
| 540 | * |
| 541 | * @return string|false|null |
| 542 | */ |
| 543 | public function getTimeZoneOffset() { |
| 544 | $timezone = $this->getTimeZoneString(); |
| 545 | if ($timezone) { |
| 546 | $tzObj = new DateTimeZone($timezone); |
| 547 | $dateTime = new DateTime("now", $tzObj); |
| 548 | $tz = $tzObj->getOffset($dateTime); |
| 549 | |
| 550 | if (empty($tz)) { |
| 551 | return FALSE; |
| 552 | } |
| 553 | |
| 554 | $timeZoneOffset = sprintf("%02d:%02d", $tz / 3600, abs(($tz / 60) % 60)); |
| 555 | |
| 556 | if ($timeZoneOffset > 0) { |
| 557 | $timeZoneOffset = '+' . $timeZoneOffset; |
| 558 | } |
| 559 | return $timeZoneOffset; |
| 560 | } |
| 561 | return NULL; |
| 562 | } |
| 563 | |
| 564 | /** |
| 565 | * Get timezone as a string. |
| 566 | * @return string |
| 567 | * Timezone string e.g. 'America/Los_Angeles' |
| 568 | */ |
| 569 | public function getTimeZoneString() { |
| 570 | return date_default_timezone_get(); |
| 571 | } |
| 572 | |
| 573 | /** |
| 574 | * Get Unique Identifier from UserFramework system (CMS) |
| 575 | * @param object $user |
| 576 | * Object as described by the User Framework. |
| 577 | * @return mixed |
| 578 | * $uniqueIdentifer Unique identifier from the user Framework system |
| 579 | */ |
| 580 | public function getUniqueIdentifierFromUserObject($user) { |
| 581 | return NULL; |
| 582 | } |
| 583 | |
| 584 | /** |
| 585 | * Get User ID from UserFramework system (CMS) |
| 586 | * @param object $user |
| 587 | * Object as described by the User Framework. |
| 588 | * @return null|int |
| 589 | */ |
| 590 | public function getUserIDFromUserObject($user) { |
| 591 | return NULL; |
| 592 | } |
| 593 | |
| 594 | /** |
| 595 | * Get currently logged in user uf id. |
| 596 | * |
| 597 | * @return int|null |
| 598 | * logged in user uf id. |
| 599 | */ |
| 600 | public function getLoggedInUfID() { |
| 601 | return NULL; |
| 602 | } |
| 603 | |
| 604 | /** |
| 605 | * Get currently logged in user unique identifier - this tends to be the email address or user name. |
| 606 | * |
| 607 | * @return string|null |
| 608 | * logged in user unique identifier |
| 609 | */ |
| 610 | public function getLoggedInUniqueIdentifier() { |
| 611 | return NULL; |
| 612 | } |
| 613 | |
| 614 | /** |
| 615 | * Return a UFID (user account ID from the UserFramework / CMS system being based on the user object |
| 616 | * passed, defaulting to the logged in user if not passed. Note that ambiguous situation occurs |
| 617 | * in CRM_Core_BAO_UFMatch::synchronize - a cleaner approach would seem to be resolving the user id before calling |
| 618 | * the function |
| 619 | * |
| 620 | * Note there is already a function getUFId which takes $username as a param - we could add $user |
| 621 | * as a second param to it but it seems messy - just overloading it because the name is taken |
| 622 | * @param object $user |
| 623 | * @return int |
| 624 | * $ufid - user ID of UF System |
| 625 | */ |
| 626 | public function getBestUFID($user = NULL) { |
| 627 | if ($user) { |
| 628 | return $this->getUserIDFromUserObject($user); |
| 629 | } |
| 630 | return $this->getLoggedInUfID(); |
| 631 | } |
| 632 | |
| 633 | /** |
| 634 | * Return a unique identifier (usually an email address or username) from the UserFramework / CMS system being based on the user object |
| 635 | * passed, defaulting to the logged in user if not passed. Note that ambiguous situation occurs |
| 636 | * in CRM_Core_BAO_UFMatch::synchronize - a cleaner approach would seem to be resolving the unique identifier before calling |
| 637 | * the function |
| 638 | * |
| 639 | * @param object $user |
| 640 | * @return string |
| 641 | * unique identifier from the UF System |
| 642 | */ |
| 643 | public function getBestUFUniqueIdentifier($user = NULL) { |
| 644 | if ($user) { |
| 645 | return $this->getUniqueIdentifierFromUserObject($user); |
| 646 | } |
| 647 | return $this->getLoggedInUniqueIdentifier(); |
| 648 | } |
| 649 | |
| 650 | /** |
| 651 | * List modules installed in the CMS, including enabled and disabled ones. |
| 652 | * |
| 653 | * @return array |
| 654 | * [CRM_Core_Module] |
| 655 | */ |
| 656 | public function getModules() { |
| 657 | return array(); |
| 658 | } |
| 659 | |
| 660 | /** |
| 661 | * Get Url to view user record. |
| 662 | * @param int $contactID |
| 663 | * Contact ID. |
| 664 | * |
| 665 | * @return string|null |
| 666 | */ |
| 667 | public function getUserRecordUrl($contactID) { |
| 668 | return NULL; |
| 669 | } |
| 670 | |
| 671 | /** |
| 672 | * Is the current user permitted to add a user. |
| 673 | * @return bool |
| 674 | */ |
| 675 | public function checkPermissionAddUser() { |
| 676 | return FALSE; |
| 677 | } |
| 678 | |
| 679 | /** |
| 680 | * Output code from error function. |
| 681 | * @param string $content |
| 682 | */ |
| 683 | public function outputError($content) { |
| 684 | echo CRM_Utils_System::theme($content); |
| 685 | } |
| 686 | |
| 687 | /** |
| 688 | * Log error to CMS. |
| 689 | * |
| 690 | * $param string $message |
| 691 | */ |
| 692 | public function logger($message) { |
| 693 | } |
| 694 | |
| 695 | /** |
| 696 | * Append to coreResourcesList. |
| 697 | * |
| 698 | * @param array $list |
| 699 | */ |
| 700 | public function appendCoreResources(&$list) { |
| 701 | } |
| 702 | |
| 703 | } |