mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-07-24 17:31:52 +00:00
* upgrade preparation fixes * remove fdescribe * update browserlist config * ng8 * ngrx 8 * ng9 * ngrx 9 * remove entryComponents * unit tests * ng 10 * latest ADF * fix unit tests * fix lint * update deps and travis * code fixes * upgrade webdriver * cleanup libs * fix test * update test * Use browserTarget as target for lite-serve * Use the update webdriver with CI condition * Use version console.log('load', path * Fix path sh * Try to use remote env * Add the . to export variabled * Use hardcoded chrome version * Remove the run remote * Avoid to use the escape * Skip flaky e2e and raise issue ACA-3615 * SKip failing e2e * Skip flaky e2e and raise issue ACA-3615 * Fix close app toolbar menu and preconditions + tests of mark-favorite.test.ts Personal Files section * Fix mark-favorite tests * Fix ext-header test * Fix new-menu tests * Fix lint * no message * Fix viewer tests Co-authored-by: maurizio vitale <maurizio.vitale@alfresco.com> Co-authored-by: Cristina Jalba <cristina.jalba@ness.com>
47 lines
1.5 KiB
Markdown
47 lines
1.5 KiB
Markdown
---
|
|
Title: 登録
|
|
nav: ja
|
|
---
|
|
|
|
# 登録
|
|
|
|
`ExtensionService` を使用して、カスタムコンポーネント、認証ガード、
|
|
ルールエバリュエータなどを登録できます。
|
|
|
|
モジュールコンストラクタ内からカスタムコンテンツを登録することをお勧めします。
|
|
その場合、すべてのプラグインはメインアプリケーションコンポーネントの準備ができた直後に利用可能になります。
|
|
|
|
メインアプリケーションモジュール `app.module.ts` を更新するか、
|
|
独自のモジュールを作成し、次のスニペットを使用してカスタムコンテンツを登録します:
|
|
|
|
```ts
|
|
import { ExtensionsModule, ExtensionService } from '@alfresco/adf-extensions';
|
|
|
|
@NgModule({
|
|
imports: [ ExtensionsModule ]
|
|
declarations: [ MyComponent1, MyLayout ]
|
|
})
|
|
export class MyExtensionModule {
|
|
|
|
constructor(extensions: ExtensionService) {
|
|
extensions.setComponents({
|
|
'plugin1.components.my': MyComponent1,
|
|
'plugin1.layouts.my': MyLayout
|
|
});
|
|
|
|
extensions.setAuthGuards({
|
|
'plugin.auth': MyAuthGuard
|
|
});
|
|
|
|
extensions.setEvaluators({
|
|
'plugin1.rules.custom1': MyCustom1Evaluator,
|
|
'plugin1.rules.custom2': MyCustom2Evaluator
|
|
});
|
|
}
|
|
|
|
}
|
|
```
|
|
|
|
Registration API は、カスタムコンテンツのみに限定されません。
|
|
モジュールの値を置き換えることにより、既存のエントリを置き換えることができます。
|