def product_content
      if match_environment
        environment = consumable.lifecycle_environment
        view = consumable.content_view
        return [] unless environment && view
        version = ContentViewVersion.in_environment(environment).where(:content_view_id => view).first
      end

      considered_products = match_subscription ? consumable.products : consumable.organization.products.enabled.uniq

      roots = Katello::RootRepository.where(:product_id => considered_products).subscribable
      roots = roots.in_content_view_version(version) if version

      consumable.organization.enabled_product_content_for(roots)
    end
def product_content
      if match_environment
        environment = consumable.lifecycle_environment
        view = consumable.content_view
        return [] unless environment && view
        version = ContentViewVersion.in_environment(environment).where(:content_view_id => view).first
      end

      considered_products = match_subscription ? consumable.products : consumable.organization.products.enabled.uniq

      roots = Katello::RootRepository.where(:product_id => considered_products).subscribable
      roots = roots.in_content_view_version(version) if version

      consumable.organization.enabled_product_content_for(roots)
    end
consumable must implement:
  content_view
  lifecycle_environment
  organization
  products