* Drupal specific stuff goes here
*/
abstract class CRM_Utils_System_DrupalBase extends CRM_Utils_System_Base {
+
+ /**
+ * 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
+ */
+ var $supports_UF_Logging = TRUE;
/**
*
*/
function __construct() {
+ /**
+ * 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
+ * functions and leave the codebase oblivious to the type of CMS
+ * @deprecated
+ * @var bool
+ */
$this->is_drupal = TRUE;
$this->supports_form_extensions = TRUE;
}
return TRUE;
}
}
+
+
+ /**
+ * Log error to CMS
+ */
+ function logger($message) {
+ if (CRM_Core_Config::singleton()->userFrameworkLogging) {
+ watchdog('civicrm', '%message', array('%message' => $message), NULL, WATCHDOG_DEBUG);
+ }
+ }
+
+ /**
+ * Flush css/js caches
+ */
+ function clearResourceCache() {
+ _drupal_flush_css_js();
+ }
+
+ /**
+ * Append to coreResourcesList
+ */
+ function appendCoreResources(&$list) {
+ $list[] = 'js/crm.drupal.js';
+ }
}