stephpy / timeline-bundle

Symfony2 bundle to make timeline
193 stars 57 forks source link

Problem with seting criterias #189

Closed semiaLi closed 7 years ago

semiaLi commented 9 years ago

Hello, I am blocked i need your help, I want to see the Global Timeline and the timeline of the group in which i am member. I don't want to use the method which make me creating timeline for each member of the group.

//this list return me the groups in which i am member $listGroups = $this -> getDoctrine() ->getRepository('TimeLineBundle:Space')->findSpacesId($user->getId()); foreach($listGroups as $space){ $listId[] = $space->getId(); } $criterias = $qb->logicalOr( $qb->field('context')->equals('GLOBAL'), $qb->logicalAnd( $qb->field('model')->equals($space), $qb->field('identifier')->in($listId) ) ); $qb->setPage($page); $qb->setMaxPerPage(15); $qb->setCriterias($criterias); $timeline = $qb->execute(array('paginate' => true, 'filter' => true));

==> i have in my list only the global one :( and to test i tried to recuperate only the posts of group but it return empty list