src/Sulu/Bundle/ContactBundle/Controller/ContactController.php
protected function getContactsByUserSystem()
    {
        $repo = $this->get('sulu_security.user_repository');
        $users = $repo->findUserBySystem($this->getParameter('sulu_security.system'));
        $contacts = [];

        foreach ($users as $user) {
            $contacts[] = $user->getContact();
        }

        return $contacts;
    }
protected function getContactsByUserSystem()
    {
        $repo = $this->get('sulu_security.user_repository');
        $users = $repo->findUserBySystem($this->getParameter('sulu_security.system'));
        $contacts = [];

        foreach ($users as $user) {
            $contacts[] = $user->getContact();
        }

        return $contacts;
    }
protected function getContactsByUserSystem ( ) { $ repo = $ this -> get ( 'sulu_security.user_repository' ) ; $ users = $ repo -> findUserBySystem ( $ this -> getParameter ( 'sulu_security.system' ) ) ; $ contacts = [ ] ; foreach ( $ users as $ user ) { $ contacts [ ] = $ user -> getContact ( ) ; } return $ contacts ; }
Returns a list of contacts which have a user in the sulu system.
Returns a list of contacts which have a user in the sulu system .