<?php

namespace App\Service\Education;

use App\Entity\Organization\Organization;

/**
 * Education utils methods
 */
class Utils
{
    /**
     * TODO: complete
     * @see config/opentalent/modulesbyconditions.yaml
     *
     * @param Organization $organization
     * @return bool
     */
    public function isCreateOwnPresence(Organization $organization): bool {
        return $organization->getParameters()->isGenerateAttendanceReport();
    }

    /**
     * TODO: complete
     * @see config/opentalent/modulesbyconditions.yaml
     *
     * @param Organization $organization
     * @return bool
     */
    public function isConsultOwnPedagogicResult(Organization $organization): bool {
        return $organization->getParameters()->isConsultPedagogicResult();
    }

    /**
     * TODO: complete
     * @see config/opentalent/modulesbyconditions.yaml
     *
     * @param Organization $organization
     * @return bool
     */
    public function isConsultTeacherListing(Organization $organization): bool {
        return $organization->getParameters()->isConsultTeacherListing();
    }

    /**
     * Did the organization enable the validation period limit in its settings?
     * @see config/opentalent/modulesbyconditions.yaml
     *
     * @param Organization $organization
     * @return bool
     */
    public function isPeriodValidation(Organization $organization): bool {
        return $organization->getParameters()->isPeriodValidation();
    }
}
