private static function updateIdxSiteContents(array $contents_inserted, array $contents_removed)
    {
        if (null === $site = self::$_application->getSite()) {
            return;
        }

        self::$em->getRepository('BackBee\ClassContent\Indexes\IdxContentContent')
                ->replaceIdxSiteContents($site, array_diff($contents_inserted, self::$_site_content_done))
                ->removeIdxSiteContents($site, $contents_removed);

        self::$_site_content_done = array_merge(self::$_site_content_done, $contents_inserted);
    }