Organ
in package
User service.
Table of Contents
Constants
- FUNCTION_ORDER = ['Voorzitter', 'Secretaris', 'Penningmeester', 'Vice-Voorzitter']
Properties
- $aclService : AclService
- $emailService : Email
- $entityManager : EntityManager
- $memberMapper : Member
- $organInformationConfig : array<string|int, mixed>
- $organInformationForm : OrganInformation
- $organMapper : Organ
- $storageService : FileStorage
- $translator : Translator
Methods
- __construct() : mixed
- approveOrganInformation() : void
- canEditOrgan() : bool
- Checks if the current user is allowed to edit the given organ.
- findAbrogatedOrgansByType() : array<string|int, Organ>
- findActiveOrganById() : Organ|null
- findActiveOrgansByType() : array<string|int, Organ>
- findOrganByAbbr() : Organ|null
- Finds an organ by its abbreviation.
- getEditableOrganInformation() : OrganInformation|bool
- getEditableOrgans() : array<string|int, Organ>
- Retrieves all organs which the current user is allowed to edit.
- getOrgan() : Organ|null
- Get one organ.
- getOrganInformationForm() : OrganInformation
- Get the OrganInformation form.
- getOrganMemberInformation() : Member>}
- Returns a list of an organ's current and previous members including their function.
- getOrgans() : array<string|int, Organ>
- Get organs.
- makeOrganInformationImage() : string
- Create a thumbnail of the given file at the given location and scale.
- updateOrganInformation() : bool
Constants
FUNCTION_ORDER
private
mixed
FUNCTION_ORDER
= ['Voorzitter', 'Secretaris', 'Penningmeester', 'Vice-Voorzitter']
Properties
$aclService read-only
private
AclService
$aclService
$emailService read-only
private
Email
$emailService
$entityManager read-only
private
EntityManager
$entityManager
$memberMapper read-only
private
Member
$memberMapper
$organInformationConfig read-only
private
array<string|int, mixed>
$organInformationConfig
$organInformationForm read-only
private
OrganInformation
$organInformationForm
$organMapper read-only
private
Organ
$organMapper
$storageService read-only
private
FileStorage
$storageService
$translator read-only
private
Translator
$translator
Methods
__construct()
public
__construct(AclService $aclService, Translator $translator, EntityManager $entityManager, FileStorage $storageService, Email $emailService, Member $memberMapper, Organ $organMapper, OrganInformation $organInformationForm, array<string|int, mixed> $organInformationConfig) : mixed
Parameters
- $aclService : AclService
- $translator : Translator
- $entityManager : EntityManager
- $storageService : FileStorage
- $emailService : Email
- $memberMapper : Member
- $organMapper : Organ
- $organInformationForm : OrganInformation
- $organInformationConfig : array<string|int, mixed>
Tags
approveOrganInformation()
public
approveOrganInformation(OrganInformation $organInformation) : void
Parameters
- $organInformation : OrganInformation
Tags
canEditOrgan()
Checks if the current user is allowed to edit the given organ.
public
canEditOrgan(Organ $organ) : bool
Parameters
- $organ : Organ
Return values
boolfindAbrogatedOrgansByType()
public
findAbrogatedOrgansByType(OrganTypes $type) : array<string|int, Organ>
Parameters
- $type : OrganTypes
-
either committee, avc or fraternity
Return values
array<string|int, Organ>findActiveOrganById()
public
findActiveOrganById(int $id) : Organ|null
Parameters
- $id : int
Return values
Organ|nullfindActiveOrgansByType()
public
findActiveOrgansByType(OrganTypes $type) : array<string|int, Organ>
Parameters
- $type : OrganTypes
-
either committee, avc or fraternity
Return values
array<string|int, Organ>findOrganByAbbr()
Finds an organ by its abbreviation.
public
findOrganByAbbr(string $abbr[, OrganTypes|null $type = null ][, bool $latest = false ]) : Organ|null
Parameters
- $abbr : string
- $type : OrganTypes|null = null
- $latest : bool = false
-
Whether to retrieve the latest occurrence of an organ or not
Tags
Return values
Organ|nullgetEditableOrganInformation()
public
getEditableOrganInformation(int $organId) : OrganInformation|bool
Parameters
- $organId : int
Tags
Return values
OrganInformation|boolgetEditableOrgans()
Retrieves all organs which the current user is allowed to edit.
public
getEditableOrgans() : array<string|int, Organ>
Return values
array<string|int, Organ>getOrgan()
Get one organ.
public
getOrgan(int $id) : Organ|null
Parameters
- $id : int
Return values
Organ|nullgetOrganInformationForm()
Get the OrganInformation form.
public
getOrganInformationForm(OrganInformation $organInformation) : OrganInformation
Parameters
- $organInformation : OrganInformation
Return values
OrganInformationgetOrganMemberInformation()
Returns a list of an organ's current and previous members including their function.
public
getOrganMemberInformation(Organ $organ) : Member>}
Parameters
- $organ : Organ
Return values
Member>}getOrgans()
Get organs.
public
getOrgans([bool $abrogated = false ]) : array<string|int, Organ>
Parameters
- $abrogated : bool = false
Return values
array<string|int, Organ>makeOrganInformationImage()
Create a thumbnail of the given file at the given location and scale.
public
makeOrganInformationImage(string $file, float $x, float $y, float $width, float $height, int $thumbWidth, int $thumbHeight) : string
Parameters
- $file : string
-
The file to create the thumbnail of
- $x : float
-
The start x position in the image
- $y : float
-
The start y position in the image
- $width : float
-
The width of the area to crop
- $height : float
-
The height of the are to crop
- $thumbWidth : int
-
The width of the final thumbnail
- $thumbHeight : int
-
The height of the final thumbnail
Tags
Return values
string —path of where the thumbnail is stored
updateOrganInformation()
public
updateOrganInformation(OrganInformation $organInformation, array<string|int, mixed> $data) : bool
Parameters
- $organInformation : OrganInformation
- $data : array<string|int, mixed>