Decision
in package
Decision service.
Tags
Table of Contents
Properties
- $aclService : AclService
- $authorizationForm : Authorization
- $authorizationMapper : Authorization
- $authorizationRevocationForm : AuthorizationRevocation
- $decisionMapper : Decision
- $documentForm : Document
- $emailService : Email
- $meetingDocumentMapper : MeetingDocument
- $meetingMapper : Meeting
- $meetingMinutesMapper : MeetingMinutes
- $memberMapper : Member
- $minutesForm : Minutes
- $searchDecisionForm : SearchDecision
- $storageService : FileStorage
- $translator : Translator
Methods
- __construct() : mixed
- changePositionDocument() : void
- Changes a document's position in the ordering.
- createAuthorization() : Authorization|null
- deleteDocument() : void
- getAllAuthorizations() : Authorization[]}
- Retrieves all authorizations for the given meeting number.
- getAuthorizationForm() : Authorization
- Get the Authorization form.
- getAuthorizationRevocationForm() : AuthorizationRevocation
- Get the Authorization revocation form.
- getDocumentForm() : Document
- Get the Document form.
- getLatestALV() : Meeting|null
- Returns the latest upcoming ALV or null if there is none.
- getMeeting() : Meeting|null
- Get information about one meeting.
- getMeetingDocument() : MeetingDocument|null
- Get meeting documents corresponding to a certain id.
- getMeetingDocumentDownload() : Stream|null
- Returns a download for a meeting document.
- getMeetingMinutesDownload() : Stream|null
- Returns a download for meeting minutes.
- getMeetings() : ImportedMeetingArrayType
- Get all meetings.
- getMeetingsByType() : array<string|int, Meeting>
- getMinutesForm() : Minutes
- Get the meeting minutes form.
- getPastMeetings() : array<string|int, Meeting>
- Get past meetings.
- getSearchDecisionForm() : SearchDecision
- Get the SearchDecision form.
- getTranslator() : Translator
- Get the translator.
- getUpcomingAnnouncedMeetings() : array<string|int, Meeting>
- Returns the closest upcoming meeting for members.
- getUserAuthorization() : Authorization|null
- Gets the authorization of the current user for the given meeting.
- isAllowedToBrowseFiles() : bool
- Returns whether the current role is allowed to view files.
- renameDocument() : void
- revokeAuthorization() : void
- search() : array<string|int, Decision>
- Search for decisions.
- uploadDocument() : bool
- Upload a meeting document.
- uploadMinutes() : bool
- Upload meeting minutes.
- isAllowedOrFail() : void
- Checks the user's permission.
Properties
$aclService read-only
private
AclService
$aclService
$authorizationForm read-only
private
Authorization
$authorizationForm
$authorizationMapper read-only
private
Authorization
$authorizationMapper
$authorizationRevocationForm read-only
private
AuthorizationRevocation
$authorizationRevocationForm
$decisionMapper read-only
private
Decision
$decisionMapper
$documentForm read-only
private
Document
$documentForm
$emailService read-only
private
Email
$emailService
$meetingDocumentMapper read-only
private
MeetingDocument
$meetingDocumentMapper
$meetingMapper read-only
private
Meeting
$meetingMapper
$meetingMinutesMapper read-only
private
MeetingMinutes
$meetingMinutesMapper
$memberMapper read-only
private
Member
$memberMapper
$minutesForm read-only
private
Minutes
$minutesForm
$searchDecisionForm read-only
private
SearchDecision
$searchDecisionForm
$storageService read-only
private
FileStorage
$storageService
$translator read-only
private
Translator
$translator
Methods
__construct()
public
__construct(AclService $aclService, Translator $translator, FileStorage $storageService, Email $emailService, Member $memberMapper, Meeting $meetingMapper, MeetingDocument $meetingDocumentMapper, MeetingMinutes $meetingMinutesMapper, Decision $decisionMapper, Authorization $authorizationMapper, Minutes $minutesForm, Document $documentForm, SearchDecision $searchDecisionForm, Authorization $authorizationForm, AuthorizationRevocation $authorizationRevocationForm) : mixed
Parameters
- $aclService : AclService
- $translator : Translator
- $storageService : FileStorage
- $emailService : Email
- $memberMapper : Member
- $meetingMapper : Meeting
- $meetingDocumentMapper : MeetingDocument
- $meetingMinutesMapper : MeetingMinutes
- $decisionMapper : Decision
- $authorizationMapper : Authorization
- $minutesForm : Minutes
- $documentForm : Document
- $searchDecisionForm : SearchDecision
- $authorizationForm : Authorization
- $authorizationRevocationForm : AuthorizationRevocation
changePositionDocument()
Changes a document's position in the ordering.
public
changePositionDocument(int $id, int $newPosition) : void
The basic flow is (1) retrieve documents, (2) set document to new position, then (3) persist position of all documents related to a meeting. Old documents don't have a position yet, so they are set to 0 by default.
FUTURE: When documents have display positions, simplify the code by only mutating two rows.
Parameters
- $id : int
-
Document ID
- $newPosition : int
-
The new position for the document
Tags
createAuthorization()
public
createAuthorization(array<string|int, mixed> $data) : Authorization|null
Parameters
- $data : array<string|int, mixed>
Tags
Return values
Authorization|nulldeleteDocument()
public
deleteDocument(MeetingDocument $meetingDocument) : void
Parameters
- $meetingDocument : MeetingDocument
Tags
getAllAuthorizations()
Retrieves all authorizations for the given meeting number.
public
getAllAuthorizations(int $meetingNumber) : Authorization[]}
Parameters
- $meetingNumber : int
Return values
Authorization[]}getAuthorizationForm()
Get the Authorization form.
public
getAuthorizationForm() : Authorization
Return values
AuthorizationgetAuthorizationRevocationForm()
Get the Authorization revocation form.
public
getAuthorizationRevocationForm() : AuthorizationRevocation
Return values
AuthorizationRevocationgetDocumentForm()
Get the Document form.
public
getDocumentForm() : Document
Return values
DocumentgetLatestALV()
Returns the latest upcoming ALV or null if there is none.
public
getLatestALV() : Meeting|null
Tags
Return values
Meeting|nullgetMeeting()
Get information about one meeting.
public
getMeeting(MeetingTypes $type, int $number) : Meeting|null
Parameters
- $type : MeetingTypes
- $number : int
Tags
Return values
Meeting|nullgetMeetingDocument()
Get meeting documents corresponding to a certain id.
public
getMeetingDocument(int $id) : MeetingDocument|null
Parameters
- $id : int
Return values
MeetingDocument|nullgetMeetingDocumentDownload()
Returns a download for a meeting document.
public
getMeetingDocumentDownload(MeetingDocument $meetingDocument) : Stream|null
Parameters
- $meetingDocument : MeetingDocument
Return values
Stream|nullgetMeetingMinutesDownload()
Returns a download for meeting minutes.
public
getMeetingMinutesDownload(Meeting $meeting) : Stream|null
Parameters
- $meeting : Meeting
Return values
Stream|nullgetMeetings()
Get all meetings.
public
getMeetings([int|null $limit = null ][, MeetingTypes|null $type = null ]) : ImportedMeetingArrayType
Parameters
- $limit : int|null = null
-
The amount of meetings to retrieve, default is all
- $type : MeetingTypes|null = null
Return values
ImportedMeetingArrayTypegetMeetingsByType()
public
getMeetingsByType(MeetingTypes $type) : array<string|int, Meeting>
Parameters
- $type : MeetingTypes
Return values
array<string|int, Meeting>getMinutesForm()
Get the meeting minutes form.
public
getMinutesForm() : Minutes
Return values
MinutesgetPastMeetings()
Get past meetings.
public
getPastMeetings(int $limit, MeetingTypes $type) : array<string|int, Meeting>
Parameters
- $limit : int
-
The amount of meetings to retrieve
- $type : MeetingTypes
-
Constraint on the type of the meeting
Return values
array<string|int, Meeting>getSearchDecisionForm()
Get the SearchDecision form.
public
getSearchDecisionForm() : SearchDecision
Return values
SearchDecisiongetTranslator()
Get the translator.
public
getTranslator() : Translator
Return values
TranslatorgetUpcomingAnnouncedMeetings()
Returns the closest upcoming meeting for members.
public
getUpcomingAnnouncedMeetings() : array<string|int, Meeting>
Return values
array<string|int, Meeting>getUserAuthorization()
Gets the authorization of the current user for the given meeting.
public
getUserAuthorization(Meeting $meeting) : Authorization|null
Parameters
- $meeting : Meeting
Return values
Authorization|nullisAllowedToBrowseFiles()
Returns whether the current role is allowed to view files.
public
isAllowedToBrowseFiles() : bool
Return values
boolrenameDocument()
public
renameDocument(MeetingDocument $meetingDocument, array<string|int, mixed> $data) : void
Parameters
- $meetingDocument : MeetingDocument
- $data : array<string|int, mixed>
Tags
revokeAuthorization()
public
revokeAuthorization(Authorization $authorization) : void
Parameters
- $authorization : Authorization
search()
Search for decisions.
public
search(array<string|int, mixed> $data) : array<string|int, Decision>
Parameters
- $data : array<string|int, mixed>
-
Search data
Tags
Return values
array<string|int, Decision>uploadDocument()
Upload a meeting document.
public
uploadDocument(array<string|int, mixed> $data) : bool
Parameters
- $data : array<string|int, mixed>
Tags
Return values
bool —If uploading was a success
uploadMinutes()
Upload meeting minutes.
public
uploadMinutes(array<string|int, mixed> $data) : bool
Parameters
- $data : array<string|int, mixed>
Tags
Return values
bool —If uploading was a success
isAllowedOrFail()
Checks the user's permission.
private
isAllowedOrFail(string $operation, string $resource, string $errorMessage) : void
Parameters
- $operation : string
- $resource : string
- $errorMessage : string
-
English error message