public static function createFromUser(Application $app, User $user, array $restrictions = [])
    {
        /** @var FeedRepository $feedRepository */
        $feedRepository = $app['repo.feeds'];
        $feeds = $feedRepository->filterUserAccessibleByIds($app->getAclForUser($user), $restrictions);
        $token = $app['repo.aggregate-tokens']->findOneBy(['user' => $user]);

        return new static($app['orm.em'], $feeds, $token);
    }
public static function createFromUser(Application $app, User $user, array $restrictions = [])
    {
        /** @var FeedRepository $feedRepository */
        $feedRepository = $app['repo.feeds'];
        $feeds = $feedRepository->filterUserAccessibleByIds($app->getAclForUser($user), $restrictions);
        $token = $app['repo.aggregate-tokens']->findOneBy(['user' => $user]);

        return new static($app['orm.em'], $feeds, $token);
    }
public static function createFromUser ( Application $ app , User $ user , array $ restrictions = [ ] ) { /** @var FeedRepository $feedRepository */ $ feedRepository = $ app [ 'repo.feeds' ] ; $ feeds = $ feedRepository -> filterUserAccessibleByIds ( $ app -> getAclForUser ( $ user ) , $ restrictions ) ; $ token = $ app [ 'repo.aggregate-tokens' ] -> findOneBy ( [ 'user' => $ user ] ) ; return new static ( $ app [ 'orm.em' ] , $ feeds , $ token ) ; }
Creates an aggregate from all the feeds available to a given user.

@param Application $app
@param User        $user

@param array       $restrictions
@return Aggregate
Creates an aggregate from all the feeds available to a given user .