shtumi/ShtumiUsefulBundle — pull request #8 by svsool (2012-05-02 07:41:26+00:00)
Title: Callback added to dependent filtered entity

add the following line callback to your configuration
dependent_filtered_entities:
region_by_country:
class: AcmeDemoBundle:Region
parent_property: country
property: title
role: ROLE_USER
no_result_msg: 'No regions found for that country'
order_property: title
order_direction: ASC
callback: findByPublished

create repository for your dependent field RegionRepository.php, add callback function like this

```php
andWhere($qb->getRootAlias().'.published = 1');

}

}
```