ActivityQuery
in package
Table of Contents
Properties
- $aclService : AclService
- $activityMapper : Activity
- $organService : Organ
- $proposalMapper : Proposal
- $translator : Translator
Methods
- __construct() : mixed
- getActivity() : Activity|null
- Get the information of one activity from the database.
- getActivityArchiveYears() : array<string|int, int>
- Get all the years activities have taken place in the past.
- getActivityWithDetails() : Activity|null
- Get the activity with additional details.
- getAllProposals() : array<string|int, ActivityUpdateProposal>
- Retrieve all update proposals from the database.
- getApprovedActivities() : array<string|int, Activity>
- Get all activities that are approved by the board.
- getAvailableLanguages() : array{nl: bool, en: bool}
- Get an array that states whether a language is available for the provided $activity.
- getDisapprovedActivities() : array<string|int, Activity>
- Get all activities that are disapproved by the board.
- getFinishedActivitiesByYear() : array<string|int, Activity>
- Get all the activities that have finished in a year (and thus are archived)
- getOldCreatedActivitiesPaginator() : DoctrinePaginator
- Gets a paginator for the old activities created by this user or its organs.
- getOrganActivities() : array<string|int, Activity>
- Get upcoming activities organized by the given organ.
- getProposal() : ActivityUpdateProposal|null
- Get the information of one proposal from the database.
- getTranslator() : Translator
- Get the translator.
- getUnapprovedActivities() : array<string|int, Activity>
- Get all the activities that are yet to be approved.
- getUpcomingActivities() : array<string|int, Activity>
- Get all activities that are approved by the board and which occur in the future.
- getUpcomingCreatedActivities() : array<string|int, Activity>
- Gets the upcoming activities created by this user or its organs.
Properties
$aclService read-only
private
AclService
$aclService
$activityMapper read-only
private
Activity
$activityMapper
$organService read-only
private
Organ
$organService
$proposalMapper read-only
private
Proposal
$proposalMapper
$translator read-only
private
Translator
$translator
Methods
__construct()
public
__construct(AclService $aclService, Translator $translator, Organ $organService, Activity $activityMapper, Proposal $proposalMapper) : mixed
Parameters
- $aclService : AclService
- $translator : Translator
- $organService : Organ
- $activityMapper : Activity
- $proposalMapper : Proposal
getActivity()
Get the information of one activity from the database.
public
getActivity(int $id) : Activity|null
Parameters
- $id : int
-
The activity id to be searched for
Return values
Activity|null —Activity or null if the activity does not exist
getActivityArchiveYears()
Get all the years activities have taken place in the past.
public
getActivityArchiveYears() : array<string|int, int>
Return values
array<string|int, int>getActivityWithDetails()
Get the activity with additional details.
public
getActivityWithDetails(int $id) : Activity|null
Parameters
- $id : int
Return values
Activity|nullgetAllProposals()
Retrieve all update proposals from the database.
public
getAllProposals() : array<string|int, ActivityUpdateProposal>
Return values
array<string|int, ActivityUpdateProposal>getApprovedActivities()
Get all activities that are approved by the board.
public
getApprovedActivities() : array<string|int, Activity>
Return values
array<string|int, Activity>getAvailableLanguages()
Get an array that states whether a language is available for the provided $activity.
public
getAvailableLanguages(Activity $activity) : array{nl: bool, en: bool}
Parameters
- $activity : Activity
Return values
array{nl: bool, en: bool}getDisapprovedActivities()
Get all activities that are disapproved by the board.
public
getDisapprovedActivities() : array<string|int, Activity>
Return values
array<string|int, Activity>getFinishedActivitiesByYear()
Get all the activities that have finished in a year (and thus are archived)
public
getFinishedActivitiesByYear(int $year) : array<string|int, Activity>
Parameters
- $year : int
-
First part of study year
Return values
array<string|int, Activity>getOldCreatedActivitiesPaginator()
Gets a paginator for the old activities created by this user or its organs.
public
getOldCreatedActivitiesPaginator(User $user) : DoctrinePaginator
Or, when the user is an admin, retrieve all old activities.
Parameters
- $user : User
Return values
DoctrinePaginatorgetOrganActivities()
Get upcoming activities organized by the given organ.
public
getOrganActivities(Organ $organ[, int|null $count = null ]) : array<string|int, Activity>
Parameters
- $organ : Organ
- $count : int|null = null
Return values
array<string|int, Activity>getProposal()
Get the information of one proposal from the database.
public
getProposal(int $id) : ActivityUpdateProposal|null
Parameters
- $id : int
-
The proposal id to be searched for
Return values
ActivityUpdateProposal|null —or null if the proposal does not exist
getTranslator()
Get the translator.
public
getTranslator() : Translator
Return values
TranslatorgetUnapprovedActivities()
Get all the activities that are yet to be approved.
public
getUnapprovedActivities() : array<string|int, Activity>
Return values
array<string|int, Activity>getUpcomingActivities()
Get all activities that are approved by the board and which occur in the future.
public
getUpcomingActivities([string|null $category = null ]) : array<string|int, Activity>
Parameters
- $category : string|null = null
-
Type of activities requested
Return values
array<string|int, Activity>getUpcomingCreatedActivities()
Gets the upcoming activities created by this user or its organs.
public
getUpcomingCreatedActivities(User $user) : array<string|int, Activity>
Or, when the user is an admin, retrieve all upcoming activities.
Parameters
- $user : User