private function loadUsers() { if (empty($this->possibleRecipients)) { $this->restrictedUsers = $this->usersFacade->findRestrictedUsers($this->user); $this->users = $this->usersFacade->findAllUsers(); $this->possibleRecipients = array_merge($this->users, $this->restrictedUsers); } }
public function __construct(ListingResult $listingResult, RecipientsSelectBoxFactory $recipientsSelectBoxFactory, SharedListingNotification $sharedListingNotification, IItemsTableControlFactory $itemsTableControlFactory, ListingsFacade $listingFacade, UsersFacade $usersFacade) { $this->listingResult = $listingResult; $this->listing = $listingResult->getListing(); $this->user = $listingResult->getListing()->getUser(); $this->recipientsSelectBoxFactory = $recipientsSelectBoxFactory; $this->sharedListingNotification = $sharedListingNotification; $this->itemsTableControlFactory = $itemsTableControlFactory; $this->listingFacade = $listingFacade; $this->usersFacade = $usersFacade; $this->restrictedUsers = $this->usersFacade->findRestrictedUsers($this->user); $this->users = $this->usersFacade->findAllUsers(); }