*
* @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
*/
* @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;
* 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) {
}
return $result;
}
+
}