mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 07:03:49 +00:00
household address: check if address are sequential (WIP)
This commit is contained in:
@@ -61,6 +61,16 @@ class HouseholdController extends AbstractController
|
||||
public function addresses(Request $request, Household $household)
|
||||
{
|
||||
// TODO ACL
|
||||
|
||||
//TODO put these lines into a validator constraint on household->getAddress
|
||||
$addresses = $household->getAddresses();
|
||||
$cond = True;
|
||||
for ($i=0; $i < count($addresses) - 1; $i++) {
|
||||
if ($addresses[$i]->getValidFrom() != $addresses[$i + 1]->getValidTo()) {
|
||||
$cond = False;
|
||||
}
|
||||
}
|
||||
|
||||
return $this->render('@ChillPerson/Household/addresses.html.twig',
|
||||
[
|
||||
'household' => $household
|
||||
|
Reference in New Issue
Block a user