Documentation

Decision
in package

Decision service.

Tags
psalm-import-type

MeetingArrayType from MeetingMapper as ImportedMeetingArrayType

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
$reorderDocumentForm  : ReorderDocument
$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.
getReorderDocumentForm()  : ReorderDocument
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

$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, ReorderDocument $reorderDocumentForm, 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
$reorderDocumentForm : ReorderDocument
$searchDecisionForm : SearchDecision
$authorizationForm : Authorization
$authorizationRevocationForm : AuthorizationRevocation

changePositionDocument()

Changes a document's position in the ordering.

public changePositionDocument(int $id[, bool $moveDown = true ]) : void

The basic flow is (1) retrieve documents, (2) swap document positions, then (3) persist position. Unfortunately, I have to update the positions of all documents related to a meeting because of legacy. 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

$moveDown : bool = true

If the document should be moved down in the ordering, defaults to TRUE

Tags
throws
NotAllowedException
throws
InvalidArgumentException

If the document doesn't exist.

createAuthorization()

public createAuthorization(array<string|int, mixed> $data) : Authorization|null
Parameters
$data : array<string|int, mixed>
Tags
throws
ORMException
phpcsSuppress

SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingTraversableTypeHintSpecification

Return values
Authorization|null

getAllAuthorizations()

Retrieves all authorizations for the given meeting number.

public getAllAuthorizations(int $meetingNumber) : Authorization[]}
Parameters
$meetingNumber : int
Return values
Authorization[]}

getLatestALV()

Returns the latest upcoming ALV or null if there is none.

public getLatestALV() : Meeting|null
Tags
throws
NonUniqueResultException
Return values
Meeting|null

getMeetingDocumentDownload()

Returns a download for a meeting document.

public getMeetingDocumentDownload(MeetingDocument $meetingDocument) : Stream|null
Parameters
$meetingDocument : MeetingDocument
Return values
Stream|null

getMeetingMinutesDownload()

Returns a download for meeting minutes.

public getMeetingMinutesDownload(Meeting $meeting) : Stream|null
Parameters
$meeting : Meeting
Return values
Stream|null

getMeetings()

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
ImportedMeetingArrayType

getPastMeetings()

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>

getTranslator()

Get the translator.

public getTranslator() : Translator
Return values
Translator

getUpcomingAnnouncedMeetings()

Returns the closest upcoming meeting for members.

public getUpcomingAnnouncedMeetings() : array<string|int, Meeting>
Return values
array<string|int, Meeting>

isAllowedToBrowseFiles()

Returns whether the current role is allowed to view files.

public isAllowedToBrowseFiles() : bool
Return values
bool

renameDocument()

public renameDocument(MeetingDocument $meetingDocument, array<string|int, mixed> $data) : void
Parameters
$meetingDocument : MeetingDocument
$data : array<string|int, mixed>
Tags
throws
ORMException
phpcsSuppress

SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingTraversableTypeHintSpecification

Search for decisions.

public search(array<string|int, mixed> $data) : array<string|int, Decision>
Parameters
$data : array<string|int, mixed>

Search data

Tags
phpcsSuppress

SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingTraversableTypeHintSpecification

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
throws
Exception
phpcsSuppress

SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingTraversableTypeHintSpecification

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
throws
Exception
phpcsSuppress

SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingTraversableTypeHintSpecification

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

Tags
throws
NotAllowedException

If the user doesn't have permission.


        
On this page

Search results