add status preference dao to ignore list
[civicrm-core.git] / CRM / Core / Component.php
index 85c69308675466cdbdfeec609a8ae5ea497de122..da70a18ef1271d96a814781a838e12e42bf445dc 100644 (file)
@@ -3,7 +3,7 @@
  +--------------------------------------------------------------------+
  | CiviCRM version 4.6                                                |
  +--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2014                                |
+ | Copyright CiviCRM LLC (c) 2004-2015                                |
  +--------------------------------------------------------------------+
  | This file is a part of CiviCRM.                                    |
  |                                                                    |
@@ -30,7 +30,7 @@
  * CiviCRM components
  *
  * @package CRM
- * @copyright CiviCRM LLC (c) 2004-2014
+ * @copyright CiviCRM LLC (c) 2004-2015
  * $Id$
  *
  */
@@ -112,6 +112,23 @@ class CRM_Core_Component {
     return $_cache;
   }
 
+  /**
+   * @return array
+   *   Array(string $name => int $id).
+   */
+  public static function &getComponentIDs() {
+    $componentIDs = array();
+
+    $cr = new CRM_Core_DAO_Component();
+    $cr->find(FALSE);
+    while ($cr->fetch()) {
+      $componentIDs[$cr->name] = $cr->id;
+    }
+
+    return $componentIDs;
+  }
+
+
   /**
    * @param bool $force
    *
@@ -222,6 +239,8 @@ class CRM_Core_Component {
   /**
    * @param $config
    * @param bool $oldMode
+   *
+   * @return null
    */
   public static function addConfig(&$config, $oldMode = FALSE) {
     $info = self::_info();
@@ -418,7 +437,7 @@ class CRM_Core_Component {
   }
 
   /**
-   * Handle table dependencies of components
+   * Handle table dependencies of components.
    *
    * @param array $tables
    *   Array of tables.
@@ -436,7 +455,7 @@ class CRM_Core_Component {
   }
 
   /**
-   * Get components info from info file
+   * Get components info from info file.
    */
   public static function getComponentsFromFile($crmFolderDir) {
     $components = array();