Add in unit test of searching when price field value label has changed
[civicrm-core.git] / CRM / Utils / System / Base.php
index 2e675243c58ad5f7adbd33ad482a2dcd4575bd0d..0dca55f65783de6748b4d123644fcfb4a0c467c8 100644 (file)
@@ -414,6 +414,19 @@ abstract class CRM_Utils_System_Base {
     return FALSE;
   }
 
+  /**
+   * Is a front end page being accessed.
+   *
+   * Generally this would be a contribution form or other public page as opposed to a backoffice page (like contact edit).
+   *
+   * @todo Drupal uses the is_public setting - clarify & rationalise. See https://github.com/civicrm/civicrm-drupal/pull/546/files
+   *
+   * @return bool
+   */
+  public function isFrontEndPage() {
+    return CRM_Core_Config::singleton()->userFrameworkFrontend;
+  }
+
   /**
    * Get user login URL for hosting CMS (method declared in each CMS system class)
    *