您是否尝试过使用自动生成的filter
操作?
public function executeFilter(sfWebRequest $request)
{
$this->setPage(1);
if ($request->hasParameter('_reset'))
{
$this->setFilters($this->configuration->getFilterDefaults());
$this->redirect('@auto_brand_history');
}
$this->filters = $this->configuration->getFilterForm($this->getFilters());
$this->filters->bind($request->getParameter($this->filters->getName()));
if ($this->filters->isValid())
{
$this->setFilters($this->filters->getValues());
$this->redirect('@auto_brand_history');
}
$this->pager = $this->getPager();
$this->sort = $this->getSort();
$this->setTemplate('index');
}
似乎它可以与GET
参数一起使用。
我明白你的观点,并会着眼于实现这一点。我通过使用table_method(使用doctrine)和查询$ sf_User凭据来改变查询,在我当前的项目中找到了一条路。感谢您的意见:) – user601707 2011-02-09 20:52:38