Skip to content

Commit

Permalink
feat[contact plugin]: show all contacts if none is selected in the pluin
Browse files Browse the repository at this point in the history
  • Loading branch information
itx-stefanie-doell committed Apr 11, 2022
1 parent fbff7d5 commit 65b2b25
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions Classes/Controller/ContactController.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,18 +72,13 @@ public function listAction()
if (!empty($selectedContactsStr))
{
$contacts = explode(",", $selectedContactsStr);
$contactObjects = $this->contactRepository->findMultipleByUid($contacts);
}
$contactObjects = $this->contactRepository->findMultipleByUid($contacts);

$contactByUid = [];

foreach ($contactObjects as $contact)
else
{
$contactByUid[$contact->getLocalizedUid()] = $contact;
$contactObjects = $this->contactRepository->findAll();
}

$contactObjects = array_replace(array_flip($contacts), $contactByUid);

$this->view->assign('contacts', $contactObjects);
}
}

0 comments on commit 65b2b25

Please sign in to comment.