X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FCore%2FComponent%2FInfo.php;h=c9433c5c34fe4f5b337f173d7e0181d8fd1bff03;hb=c239e5835db683d75631585007664fe690420ef3;hp=2913bc3d729394b7de877542bedc42c4d9ea25a3;hpb=feb07870854e6e0081670f2fe33faf579b737eba;p=civicrm-core.git diff --git a/CRM/Core/Component/Info.php b/CRM/Core/Component/Info.php index 2913bc3d72..c9433c5c34 100644 --- a/CRM/Core/Component/Info.php +++ b/CRM/Core/Component/Info.php @@ -1,9 +1,9 @@ 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 @@ -136,6 +151,16 @@ abstract class CRM_Core_Component_Info { return array(); } + /** + * Provides permissions that are unwise for Anonymous Roles to have + * + * @return array list of permissions + * @see CRM_Component_Info::getPermissions + */ + public function getAnonymousPermissionWarnings() { + return array(); + } + /** * Provides permissions that are used by component. * Needs to be implemented in component's information @@ -143,12 +168,27 @@ abstract class CRM_Core_Component_Info { * * NOTE: if using conditionally permission return, * implementation of $getAllUnconditionally is required. + * + * @param bool $getAllUnconditionally + * * @return array|null collection of permissions, null if none * @access public - * */ 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. @@ -350,9 +390,10 @@ abstract class CRM_Core_Component_Info { /** * Helper for instantiating component's elements. * + * @param $cl + * * @return mixed component's element as class instance * @access private - * */ private function _instantiate($cl) { $className = $this->namespace . '_' . $cl;