import { EventEmitter } from '@angular/core'; import { Banner, Category, CmsService, Menu, Publication } from '@n3/ng-api-cms'; import { FormBuilder, FormGroup } from "@angular/forms"; export declare class CmsEditService { private fb; private cmsService; changeDetector: EventEmitter; private cms; private validation; private forbiddenKeys; constructor(fb: FormBuilder, cmsService: CmsService); /** * This method is made to get a list of form controls for any of the entities at the Institution module * It can add values and custom validators to the form controls. For this validators and model arguments must * have the same keys as the entity for the original controls * * @method * @name getControls * * @param entity - entity type * @param model - model of the corresponding entity * @param validators - validators for the necessary controls * * @return - object of form controls */ getControls(entity: string, model?: any, validators?: any): any; /** * Creates a Form Group based on the controls provided. * * @method * @name getForm * * @param controls - object of Form Controls and Form Groups * @return */ getForm(controls: any): FormGroup; /** * Returns default validators for the entity provided for further customization. * * @method * @name getValidators * * @param entity * @return */ getValidators(entity: string): any; /** * * @param form * @param publication */ publicationSubmit(form: FormGroup, publication?: Publication): void; bannerSubmit(form: FormGroup, banner?: Banner): void; menuSubmit(form: FormGroup, menu?: Menu): void; /** * * @param form * @param category */ categorySubmit(form: FormGroup, category?: Category): void; }