OpenSlides/client/src/app/site/base/base-agenda-view-model.ts

42 lines
1.3 KiB
TypeScript
Raw Normal View History

import { AgendaInformation } from 'app/site/base/agenda-information';
import { BaseProjectableViewModel } from './base-projectable-view-model';
import { SearchRepresentation } from 'app/core/ui-services/search.service';
import { ViewItem } from '../agenda/models/view-item';
/**
* Base view class for projectable models.
*/
export abstract class BaseAgendaViewModel extends BaseProjectableViewModel implements AgendaInformation {
public abstract getAgendaItem(): ViewItem;
2018-11-07 08:43:48 +01:00
/**
* @returns the agenda title
*/
public getAgendaTitle(): string {
return this.getTitle();
}
2018-11-07 08:43:48 +01:00
/**
* @return the agenda title with the verbose name of the content object
*/
public getAgendaTitleWithType(): string {
// Return the agenda title with the model's verbose name appended
2018-11-07 08:43:48 +01:00
return this.getAgendaTitle() + ' (' + this.getVerboseName() + ')';
}
2018-12-11 17:20:32 +01:00
/**
* @returns the (optional) descriptive text to be exported in the CSV.
* May be overridden by inheriting classes
*/
public getCSVExportText(): string {
return '';
}
public abstract getDetailStateURL(): string;
2018-11-07 08:43:48 +01:00
/**
* Should return a string representation of the object, so there can be searched for.
*/
public abstract formatForSearch(): SearchRepresentation;
}