if ($toDate &&
$toDate <=
$now) { return false;
} return true;
} public function getConstraints(): array
{ return [ 'fromDate' =>
[new NotBlank(),
new DateTimeConstraint(['format' => \DateTime::ATOM
])],
'toDate' =>
[new NotBlank(),
new DateTimeConstraint(['format' => \DateTime::ATOM
])],
'useTime' =>
[new NotNull(),
new Type('bool'
)],
];
}}