When a component is used to render a filter, the $filters variable is not passed to this component like symfony does with partials.
Let's consider that generator.yml contains the following :
list:
filters: [_filter_2, ~filter_3]
Inside the partial, you have normally access to the $filters variable.
Inside the component, you don't have access to this variable. You have to insert manually that line to your logic in order to access it :
$this->filters = $this->getUser()->getAttributeHolder()->getAll('sf_admin/report/filters');
The reason of that behavior is inside the sfAdminGenerator::getColumnFilterTag() method
if ($column->isComponent())
{
return "get_component('".$this->getModuleName()."', '".$column->getName()."', array('type' => 'list'))";
}
else if ($column->isPartial())
{
return "get_partial('".$column->getName()."', array('type' => 'filter', 'filters' => \$filters))";
}
Is there is a particular reason for that ? Can't we have the following instead :
if ($column->isComponent())
{
return "get_component('".$this->getModuleName()."', '".$column->getName()."', array('type' => 'filter', 'filters' => \$filters))";
}
else if ($column->isPartial())
{
return "get_partial('".$column->getName()."', array('type' => 'filter', 'filters' => \$filters))";
}