If your app is "crashing out" when you have a lot of users, you should
probably address why that is happening rather than hiding some of the
users as a stopgap measure. The admin generator provides pagination,
there is no reason why a large number of records should crash it.
Hiding a problem like this is not a good idea because it is bound to
come back and bite you later. You might be able to get help with your
crashes on the symfony-users list... as I understand it your questions
are more appropriate for that list than this one, because they don't
have to do with improving, debugging or adding plugins to Symfony
itself.

Now, if you want to add a custom filter that is optional - the user
makes a selection to enable the filtering - that's no problem. For a
simple boolean attribute like the one you mention all you have to do
is add the attribute name to the "filters:" setting for the list view
in generator.yml. Easy as it gets. See Chapter 14 of the Symfony book.

But it sounds like you want to apply the filter ALL the time, not
optionally. You could do that pretty easily by overriding
addFiltersCriteria() like this in your subclass of
autoYourUserClassActions (substitute your class name of course):

protected function addFiltersCriteria($c)
{
  $c->add(YourUserClassPeer::IS_ARTIST, true);
  // Don't forget you want the regular filters too
  return parent::addFiltersCritreia($c);
}

As I said though, you should be looking at your underlying problems
with handling many users and not relying on band-aids like this.

-- 
Tom Boutell

www.punkave.com
www.boutell.com

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"symfony developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/symfony-devs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to