public static function getEnabledFilters($om)
    {
        $filters = [];

        if ($om instanceof EntityManagerInterface) {
            $enabledFilters = $om->getFilters()->getEnabledFilters();

            foreach ($enabledFilters as $name => $filter) {
                if (!$filter instanceof EnableFilterInterface
                        || ($filter instanceof EnableFilterInterface && $filter->isEnabled())) {
                    $filters[$name] = $filter;
                }
            }
        }

        return $filters;
    }