<?php
namespace App\Model\Query\ConditionQuery\Type;
use App\Model\Query\ConditionQuery\AbstractType;
use App\Model\Query\ConditionQuery\Condition\EqualCondition;
use App\Model\Query\ConditionQuery\Condition\NotEqualCondition;
class GradeType extends AbstractType
{
const NAME = 'grade';
/**
* {@inheritDoc}
*/
public function validate($value): void
{
// TODO
}
/**
* @return string[]
*/
public function getValidOperators(): array
{
if ($this->allowsMultiple()) {
return self::VALID_ARRAY_OPERATOR_NAMES;
}
return [
EqualCondition::NAME => EqualCondition::HUMAN_READABLE_NAME,
NotEqualCondition::NAME => NotEqualCondition::HUMAN_READABLE_NAME,
];
}
/**
* {@inheritDoc}
*/
public function getEnum(): ?string
{
return '_grade';
}
}