Files
myep-team/src/Enum/StaffingRole.php
T

31 lines
879 B
PHP

<?php
namespace App\Enum;
/**
* A role the staffing matrix generates an assignment for. Each case maps to one job profile
* through the auto_assignment_job_profiles parameter; the values are its keys.
*/
enum StaffingRole: string
{
case GUIDE = 'guide';
case SKI_BEGINNER = 'ski_beginner';
case SKI_ADVANCED = 'ski_advanced';
case GUIDE_SKI_BEGINNER = 'guide_ski_beginner';
case GUIDE_SKI_ADVANCED = 'guide_ski_advanced';
/** A Reiseleitung, alone or combined with a course: the roles that can guide and escort the bus. */
public function isGuide(): bool
{
return match ($this) {
self::GUIDE, self::GUIDE_SKI_BEGINNER, self::GUIDE_SKI_ADVANCED => true,
self::SKI_BEGINNER, self::SKI_ADVANCED => false,
};
}
public function isCourse(): bool
{
return self::GUIDE !== $this;
}
}