In my Symfony2 bundle, I need to check if a function (an extension) is defined. More specifically, if the KnpMenuBundle is installed I use that one in my bundle, otherwise I will render the plugin myself.
I tried this, but this of course doesn't work:
{% if knp_menu_render() is defined %}
{# do something #}
{% else %}
{# do something else #}
{% endif %}
Is there a test/function/filter to check if a function is defined? If not, is there another way to check if the KnpMenuBundle is installed in the application?