Civi\Angular - Docblock improvements.
authorTim Otten <totten@civicrm.org>
Fri, 23 Jan 2015 08:14:31 +0000 (00:14 -0800)
committerTim Otten <totten@civicrm.org>
Sat, 24 Jan 2015 02:46:42 +0000 (18:46 -0800)
CRM/Utils/Hook.php
Civi/Angular/Manager.php

index 0fe99d420361c155b164b039b012dc57de53da71..1953cfc6200e4f60baf66f5977ab75be489e7cec 100644 (file)
@@ -1863,8 +1863,16 @@ abstract class CRM_Utils_Hook {
    *
    * @code
    * function mymod_civicrm_angularModules(&$angularModules) {
-   *   $angularModules['myAngularModule'] = array('ext' => 'org.example.mymod', 'js' => array('js/myAngularModule.js'));
-   *   $angularModules['myBigAngularModule'] = array('ext' => 'org.example.mymod', 'js' => array('js/part1.js', 'js/part2.js'), 'css' => array('css/myAngularModule.css'));
+   *   $angularModules['myAngularModule'] = array(
+   *     'ext' => 'org.example.mymod',
+   *     'js' => array('js/myAngularModule.js'),
+   *   );
+   *   $angularModules['myBigAngularModule'] = array(
+   *     'ext' => 'org.example.mymod',
+   *     'js' => array('js/part1.js', 'js/part2.js'),
+   *     'css' => array('css/myAngularModule.css'),
+   *     'partials' => array('partials/myBigAngularModule'),
+   *   );
    * }
    * @endcode
    */
index a93c8790baefceee4e4556be5b08ee7fbb162d4f..8b151802cd78ad1b1cd67b5a5589b248f262f5aa 100644 (file)
@@ -17,9 +17,14 @@ class Manager {
    * @var array|NULL
    *   Each item has some combination of these keys:
    *   - ext: string
+   *     The Civi extension which defines the Angular module.
    *   - js: array(string $relativeFilePath)
+   *     List of JS files (relative to the extension).
    *   - css: array(string $relativeFilePath)
+   *     List of CSS files (relative to the extension).
    *   - partials: array(string $relativeFilePath)
+   *     A list of partial-HTML folders (relative to the extension).
+   *     This will be mapped to "~/moduleName" by crmResource.
    */
   protected $modules = NULL;
 
@@ -35,7 +40,16 @@ class Manager {
    * Get a list of AngularJS modules which should be autoloaded
    *
    * @return array
-   *   (string $name => array('ext' => string $key, 'js' => array $paths, 'css' => array $paths))
+   *   Each item has some combination of these keys:
+   *   - ext: string
+   *     The Civi extension which defines the Angular module.
+   *   - js: array(string $relativeFilePath)
+   *     List of JS files (relative to the extension).
+   *   - css: array(string $relativeFilePath)
+   *     List of CSS files (relative to the extension).
+   *   - partials: array(string $relativeFilePath)
+   *     A list of partial-HTML folders (relative to the extension).
+   *     This will be mapped to "~/moduleName" by crmResource.
    */
   public function getModules() {
     if ($this->modules === NULL) {
@@ -270,4 +284,5 @@ class Manager {
     }
     return $result;
   }
+
 }