[symfony-users] Re: Is there anyway to go to the next element in a Doctrine collection?
No idea about this? Javi On Feb 17, 9:44 pm, Javier Garcia tirengar...@gmail.com wrote: Maybe this time the image is attached correctly..:).. On 02/17/2010 09:23 PM, St�phane wrote: Why not foreach-ing ? Please give us more of your template to understand what you want to do. Cheers, Before Printing, Think about Your Environmental Responsibility! Avant d'Imprimer, Pensez � Votre Responsabilit�e Environnementale! On Wed, Feb 17, 2010 at 9:17 PM, Javier Garcia tirengar...@gmail.com mailto:tirengar...@gmail.com wrote: I wrote this below inside the loop: ?php next($amigos_miembro) ? But it doesn't work.. Javi On 02/17/2010 08:57 PM, St�phane wrote: Hi, next($my_collection); should work Cheers, Before Printing, Think about Your Environmental Responsibility! Avant d'Imprimer, Pensez � Votre Responsabilit�e Environnementale! On Wed, Feb 17, 2010 at 8:52 PM, Javier Garcia tirengar...@gmail.com mailto:tirengar...@gmail.com wrote: Hi, Im trying to show two elements of a Doctrine collection inside a div this way: foreach ($friends as $friend) { ? div id=photo_friend ?php echo link_to( image_tag( '/uploads/fotografias_miembros/'.$friend-getAvatar()), 'miembros/show?id='.$friend-getId()) ; ? /div div id=name_friend ?php echo $amigo-getName(); ? /div ?php } ? So, is there any way to go to the next element (next row) in a Doctrine collection? Regards Javi -- You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com mailto:symfony-users@googlegroups.com. To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com mailto:symfony-users%2bunsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en. -- You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com mailto:symfony-users@googlegroups.com. To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com mailto:symfony-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en. -- You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com mailto:symfony-users@googlegroups.com. To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com mailto:symfony-users%2bunsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en. -- You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-us...@googlegroups.com. To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en. grid.jpg 36KViewDownload -- You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-us...@googlegroups.com. To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en.
Re: [symfony-users] Re: Is there anyway to go to the next element in a Doctrine collection?
I dunno your code ... but if you are playing with 2 doctrineCollections you might do it wrong ... maybe a join on those 2 tables would fix the issue... Dunno what are trying to do ... you gave us the solution ... not the problem itself. Why have you reach to use do DC ? What are you trying to do ? Alecs On Fri, Feb 19, 2010 at 11:49 AM, Javier Garcia tirengar...@gmail.comwrote: No idea about this? Javi On Feb 17, 9:44 pm, Javier Garcia tirengar...@gmail.com wrote: Maybe this time the image is attached correctly..:).. On 02/17/2010 09:23 PM, St�phane wrote: Why not foreach-ing ? Please give us more of your template to understand what you want to do. Cheers, Before Printing, Think about Your Environmental Responsibility! Avant d'Imprimer, Pensez � Votre Responsabilit�e Environnementale! On Wed, Feb 17, 2010 at 9:17 PM, Javier Garcia tirengar...@gmail.com mailto:tirengar...@gmail.com wrote: I wrote this below inside the loop: ?php next($amigos_miembro) ? But it doesn't work.. Javi On 02/17/2010 08:57 PM, St�phane wrote: Hi, next($my_collection); should work Cheers, Before Printing, Think about Your Environmental Responsibility! Avant d'Imprimer, Pensez � Votre Responsabilit�e Environnementale! On Wed, Feb 17, 2010 at 8:52 PM, Javier Garcia tirengar...@gmail.com mailto:tirengar...@gmail.com wrote: Hi, Im trying to show two elements of a Doctrine collection inside a div this way: foreach ($friends as $friend) { ? div id=photo_friend ?php echo link_to( image_tag( '/uploads/fotografias_miembros/'.$friend-getAvatar()), 'miembros/show?id='.$friend-getId()) ; ? /div div id=name_friend ?php echo $amigo-getName(); ? /div ?php } ? So, is there any way to go to the next element (next row) in a Doctrine collection? Regards Javi -- You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com mailto:symfony-users@googlegroups.com. To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.comsymfony-users%2bunsubscr...@googlegroups.com mailto:symfony-users%2bunsubscr...@googlegroups.comsymfony-users%252bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en. -- You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com mailto:symfony-users@googlegroups.com. To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.comsymfony-users%2bunsubscr...@googlegroups.com mailto:symfony-users+unsubscr...@googlegroups.comsymfony-users%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en. -- You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com mailto:symfony-users@googlegroups.com. To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.comsymfony-users%2bunsubscr...@googlegroups.com mailto:symfony-users%2bunsubscr...@googlegroups.comsymfony-users%252bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en. -- You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-us...@googlegroups.com. To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.comsymfony-users%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en. grid.jpg 36KViewDownload -- You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-us...@googlegroups.com. To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.comsymfony-users%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en. -- Have a nice day! Alecs Certified ScrumMaster There are no cannibals alive! I
RE: [symfony-users] Re: Is there anyway to go to the next element in a Doctrine collection?
I'm not sure since I'm still a beginner on symfony and doctrine, but if your variable is a Doctrine_Collection, I would try something like : $it = $amigos_miembro-getIterator(); while($it-next()) { do_stuff(); } -Message d'origine- De : symfony-users@googlegroups.com [mailto:symfony-us...@googlegroups.com] De la part de Javier Garcia Envoyé : vendredi 19 février 2010 10:50 À : symfony users Objet : [symfony-users] Re: Is there anyway to go to the next element in a Doctrine collection? No idea about this? Javi On Feb 17, 9:44 pm, Javier Garcia tirengar...@gmail.com wrote: Maybe this time the image is attached correctly..:).. On 02/17/2010 09:23 PM, St�phane wrote: Why not foreach-ing ? Please give us more of your template to understand what you want to do. Cheers, Before Printing, Think about Your Environmental Responsibility! Avant d'Imprimer, Pensez � Votre Responsabilit�e Environnementale! On Wed, Feb 17, 2010 at 9:17 PM, Javier Garcia tirengar...@gmail.com mailto:tirengar...@gmail.com wrote: I wrote this below inside the loop: ?php next($amigos_miembro) ? But it doesn't work.. Javi On 02/17/2010 08:57 PM, St�phane wrote: Hi, next($my_collection); should work Cheers, Before Printing, Think about Your Environmental Responsibility! Avant d'Imprimer, Pensez � Votre Responsabilit�e Environnementale! On Wed, Feb 17, 2010 at 8:52 PM, Javier Garcia tirengar...@gmail.com mailto:tirengar...@gmail.com wrote: Hi, Im trying to show two elements of a Doctrine collection inside a div this way: foreach ($friends as $friend) { ? div id=photo_friend ?php echo link_to( image_tag( '/uploads/fotografias_miembros/'.$friend-getAvatar()), 'miembros/show?id='.$friend-getId()) ; ? /div div id=name_friend ?php echo $amigo-getName(); ? /div ?php } ? So, is there any way to go to the next element (next row) in a Doctrine collection? Regards Javi -- You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com mailto:symfony-users@googlegroups.com. To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com mailto:symfony-users%2bunsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en. -- You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com mailto:symfony-users@googlegroups.com. To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com mailto:symfony-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en. -- You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com mailto:symfony-users@googlegroups.com. To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com mailto:symfony-users%2bunsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en. -- You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-us...@googlegroups.com. To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en. grid.jpg 36KViewDownload -- You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-us...@googlegroups.com. To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en. -- You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-us...@googlegroups.com. To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en.
Re: [symfony-users] Re: Is there anyway to go to the next element in a Doctrine collection?
2010/2/19 NOOVEO - Christophe Brun c.b...@nooveo.fr: I'm not sure since I'm still a beginner on symfony and doctrine, but if your variable is a Doctrine_Collection, I would try something like : $it = $amigos_miembro-getIterator(); while($it-next()) { do_stuff(); } I'm wondering why you are trying to accomplish this with doctrine. I'm using this solution. For me such code makes more sens than hocus pocus with dotrine. table tbody ?php $x = 1 ? tr ?php foreach ($Photos-getResults() as $Photo): ? td ?php include_partial('photo/show', array('Photo' = $Photo, 'gallery_id' = $Photo-getGalleryId(), 'username' = $username, 'owner' = $owner, 'format' = 'short')) ? /td ?php if ($x == $max_x): ? /tr ?php $x = 1 ? tr ?php else: ? ?php $x++ ? ?php endif; ? ?php endforeach; ? ?php while ($x = $max_x): ? td/td ?php $x++ ? ?php endwhile; ? /tr /tbody /table Regards, Michal -- You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-us...@googlegroups.com. To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en.