Shameless self-promotion here. I wrote up a blog post this week on customising the admin generator - one of the things I did was to add new pages etc into the generator. The way I did it is probably a bit hardcore, but it works nicely :-)
The best place to start looking is the auto-generated actions class for your module and extending it in your app/module/actions/actions.class.php
file. In particular, the index action which sets up the ORM pager. You should be able to use any query from your ORM to supply your ORM pager with data - in cases where I've needed to alter it, I use a Doctrine query generated in the same way as normal to pass to the pager. This means that I can customise what fields are displayed, including ones from other tables joined in etc in a single query. This is your 'table method' mentioned above.
Filters will work just as well - it depends on your use case and whether filters are appropriate, particularly for display. If you want a /showpublisheditems page
, then I'd go with a new action and the new query for the pager. If you want on-the-fly customisation, then go with the filter option.
The filter docs I thought were a bit lacking in places too - quick tip, they look for a addYourColumnNameColumnQuery()
method in your top-level filter class (lib/filter/...) which takes a query passed in and uses eg addWhere("x.column_name = ?", $foo)
to the query passed in.
Bleh :-) sorry, that was a bit of a brain dump, but hopefully it helps! :-)