It can cause conflicts with other extensions who have added modules.
* Replace all previously set modules.
*
* Use with caution, as it can cause conflicts with other extensions who have added modules.
- *
+ * @internal
+ * @deprecated
* @param array $modules
* @return AngularLoader
*/
public function setModules($modules) {
+ \CRM_Core_Error::deprecatedFunctionWarning('addModules');
$this->modules = $modules;
return $this;
}
*/
public function testSettingFactory($module, $expectedSettingCount, $expectedCallbackCount, $expectedPermissions) {
$loader = new \Civi\Angular\AngularLoader();
- $loader->setModules([$module]);
+ $loader->addModules([$module]);
$loader->useApp();
- // Load triggers a depreaction notice, use @ to suppress it for the test.
+ // Load triggers a deprecation notice, use @ to suppress it for the test.
@$loader->load();
// Run factory callbacks