you should additionally check if $menu is published according to publish workflow. for this, we need to inject the publish workflow checker into this service. see http://symfony.com/doc/master/cmf/bundles/core/publish_workflow.html#check-if-content-is-published