ActivityCalendarForm
in package
Table of Contents
Properties
- $aclService : AclService
- $maxActivitiesMapper : MaxActivities
- $optionProposalMapper : ActivityOptionProposal
- $organService : Organ
- $periodMapper : ActivityOptionCreationPeriod
Methods
- __construct() : mixed
- canCreateOptionInPeriod() : bool
- Returns whether a user may create an option with given start time.
- canOrganCreateProposal() : bool
- Returns whether an organ may create a new activity proposal.
- getCurrentPeriods() : array<string|int, ActivityOptionCreationPeriod>
- Get the current ActivityOptionCreationPeriod.
- getEditableOrgans() : array<string|int, Organ>
- Retrieves all organs which the current user is allowed to edit and for which the organ can create proposals.
- toDateTime() : DateTime
- getCurrentProposalCount() : int
- Get the current proposal count of an organ for the given period.
- getMaxActivities() : int
- Get the max number of activity options an organ can create.
Properties
$aclService read-only
private
AclService
$aclService
$maxActivitiesMapper read-only
private
MaxActivities
$maxActivitiesMapper
$optionProposalMapper read-only
private
ActivityOptionProposal
$optionProposalMapper
$organService read-only
private
Organ
$organService
$periodMapper read-only
private
ActivityOptionCreationPeriod
$periodMapper
Methods
__construct()
public
__construct(AclService $aclService, Organ $organService, ActivityOptionCreationPeriod $periodMapper, MaxActivities $maxActivitiesMapper, ActivityOptionProposal $optionProposalMapper) : mixed
Parameters
- $aclService : AclService
- $organService : Organ
- $periodMapper : ActivityOptionCreationPeriod
- $maxActivitiesMapper : MaxActivities
- $optionProposalMapper : ActivityOptionProposal
canCreateOptionInPeriod()
Returns whether a user may create an option with given start time.
public
canCreateOptionInPeriod(int $period, DateTime $beginTime, DateTime $endTime) : bool
Parameters
- $period : int
- $beginTime : DateTime
- $endTime : DateTime
Tags
Return values
boolcanOrganCreateProposal()
Returns whether an organ may create a new activity proposal.
public
canOrganCreateProposal(int $organId) : bool
Parameters
- $organId : int
Tags
Return values
boolgetCurrentPeriods()
Get the current ActivityOptionCreationPeriod.
public
getCurrentPeriods() : array<string|int, ActivityOptionCreationPeriod>
Return values
array<string|int, ActivityOptionCreationPeriod>getEditableOrgans()
Retrieves all organs which the current user is allowed to edit and for which the organ can create proposals.
public
getEditableOrgans() : array<string|int, Organ>
Tags
Return values
array<string|int, Organ>toDateTime()
public
static toDateTime(string $value[, string $format = 'Y-m-d' ]) : DateTime
Parameters
- $value : string
- $format : string = 'Y-m-d'
Return values
DateTimegetCurrentProposalCount()
Get the current proposal count of an organ for the given period.
protected
getCurrentProposalCount(ActivityOptionCreationPeriod $period, int $organId) : int
Parameters
- $period : ActivityOptionCreationPeriod
- $organId : int
Return values
intgetMaxActivities()
Get the max number of activity options an organ can create.
protected
getMaxActivities(int $organId, int $periodId) : int
Parameters
- $organId : int
- $periodId : int