Update Date.php
[civicrm-core.git] / CRM / Core / Component / Info.php
index 24bef08f9d9a54b18c75da9f64ec6a4e922f136c..c9433c5c34fe4f5b337f173d7e0181d8fd1bff03 100644 (file)
@@ -107,6 +107,11 @@ abstract class CRM_Core_Component_Info {
    * @access public
    *
    */
+  /**
+   * @param $name
+   * @param $namespace
+   * @param $componentID
+   */
   public function __construct($name, $namespace, $componentID) {
     $this->name        = $name;
     $this->namespace   = $namespace;
@@ -115,6 +120,16 @@ abstract class CRM_Core_Component_Info {
     $this->info['url'] = $this->getKeyword();
   }
 
+  /**
+   * EXPERIMENTAL: Get a list of AngularJS modules
+   *
+   * @return array list of modules; same format as CRM_Utils_Hook::angularModules(&$angularModules)
+   * @see CRM_Utils_Hook::angularModules
+   */
+  public function getAngularModules() {
+    return array();
+  }
+
   /**
    * Provides base information about the component.
    * Needs to be implemented in component's information
@@ -161,6 +176,19 @@ abstract class CRM_Core_Component_Info {
    */
   abstract public function getPermissions($getAllUnconditionally = FALSE);
 
+  /**
+   * Determine how many other records refer to a given record
+   *
+   * @param CRM_Core_DAO $dao the item for which we want a reference count
+   * @return array each item in the array is an array with keys:
+   *   - name: string, eg "sql:civicrm_email:contact_id"
+   *   - type: string, eg "sql"
+   *   - count: int, eg "5" if there are 5 email addresses that refer to $dao
+   */
+  public function getReferenceCounts($dao) {
+    return array();
+  }
+
   /**
    * Provides information about user dashboard element
    * offered by this component.