mirror of
https://github.com/openclassify/openclassify.git
synced 2026-01-11 18:01:10 -06:00
21 lines
558 B
PHP
21 lines
558 B
PHP
<?php namespace Visiosoft\ProfileModule\OptionHandler;
|
|
|
|
use Anomaly\SelectFieldType\SelectFieldType;
|
|
use Visiosoft\ProfileModule\Education\Contract\EducationRepositoryInterface;
|
|
|
|
class EducationOptions
|
|
{
|
|
private $educationRepository;
|
|
|
|
public function __construct(EducationRepositoryInterface $repository)
|
|
{
|
|
$this->educationRepository = $repository;
|
|
}
|
|
|
|
public function handle(SelectFieldType $fieldType)
|
|
{
|
|
$educations = $this->educationRepository->all();
|
|
$options = $educations->pluck('name', 'id')->all();
|
|
$fieldType->setOptions($options);
|
|
}
|
|
} |