def is_component_enabled(env, cls):
    """ Determine whether a trac component is enabled.

    """
    # We would like to use env.is_enabled(cls) to do this,
    # however, trac 0.11 does not have ComponentManager.is_enabled().
    # So instead, rely on ComponentManager.__getitem__(), which does
    # have the same logic in it.
    return env[cls] is not None