<commit_before>import OrchestraRouter     from '../OrchestraRouter'
import Application         from '../../Application'
import FormBuilder         from '../../../Service/Form/Model/FormBuilder'
import ContentSummaryView  from '../../View/Content/ContentSummaryView'
import ContentsView        from '../../View/Content/ContentsView'
import ContentFormView     from '../../View/Content/ContentFormView'
import NewContentFormView  from '../../View/Content/NewContentFormView'
import ContentTypes        from '../../Collection/ContentType/ContentTypes'
import Contents            from '../../Collection/Content/Contents'
import ContentType         from '../../Model/ContentType/ContentType'
import Content             from '../../Model/Content/Content'
import Statuses            from '../../Collection/Status/Statuses'
import ApplicationError    from '../../../Service/Error/ApplicationError'
import ConfirmModalView    from '../../../Service/ConfirmModal/View/ConfirmModalView'
import ContentVersionsView from '../../View/Content/ContentVersionsView'

/**
 * @class ContentRouter
 */
class ContentRouter extends OrchestraRouter
{
    /**
     * @inheritdoc
     */
    preinitialize() {
        let summaryRoute = 'content/summary';

        this.routes = {
            summaryRoute                                                         : 'showContentSummary',
            'content/list/:contentTypeId/:language(/:page)'                      : 'listContent',
            'content/edit/:contentTypeId/:language/:contentId(/:version)'        : 'editContent',
            'content/new/:contentTypeId/:language'                               : 'newContent',
            'content/manage-versions/:contentTypeId/:language/:contentId(/:page)': 'manageVersionsContent'
        };

        this._cachedContentTypes = {};

        this._breadcrumbItems = [
            {
                label: Translator.trans('open_orchestra_backoffice.menu.contribution.title')
            },
            {
                label: Translator.trans('open_orchestra_backoffice.menu.contribution.content'),
                link: '#' + summaryRoute
            }
        ];
    }

    /**
     * Get a cached content type
     *
     * @param {string} contentTypeId
     * @returns {Object}
     * private
     */
    _getCachedContentType(contentTypeId) {
        return this._cachedContentTypes[contentTypeId];
    }

    /**
     * Cache a content type
     *
     * @param {Object} contentType
     */<commit_msg>Fix broken content summary route (#2315)<commit_after>import OrchestraRouter     from '../OrchestraRouter'
import Application         from '../../Application'
import FormBuilder         from '../../../Service/Form/Model/FormBuilder'
import ContentSummaryView  from '../../View/Content/ContentSummaryView'
import ContentsView        from '../../View/Content/ContentsView'
import ContentFormView     from '../../View/Content/ContentFormView'
import NewContentFormView  from '../../View/Content/NewContentFormView'
import ContentTypes        from '../../Collection/ContentType/ContentTypes'
import Contents            from '../../Collection/Content/Contents'
import ContentType         from '../../Model/ContentType/ContentType'
import Content             from '../../Model/Content/Content'
import Statuses            from '../../Collection/Status/Statuses'
import ApplicationError    from '../../../Service/Error/ApplicationError'
import ConfirmModalView    from '../../../Service/ConfirmModal/View/ConfirmModalView'
import ContentVersionsView from '../../View/Content/ContentVersionsView'

/**
 * @class ContentRouter
 */
class ContentRouter extends OrchestraRouter
{
    /**
     * @inheritdoc
     */
    preinitialize() {
        this.routes = {
            'content/summary'                                                    : 'showContentSummary',
            'content/list/:contentTypeId/:language(/:page)'                      : 'listContent',
            'content/edit/:contentTypeId/:language/:contentId(/:version)'        : 'editContent',
            'content/new/:contentTypeId/:language'                               : 'newContent',
            'content/manage-versions/:contentTypeId/:language/:contentId(/:page)': 'manageVersionsContent'
        };

        this._cachedContentTypes = {};

        this._breadcrumbItems = [
            {
                label: Translator.trans('open_orchestra_backoffice.menu.contribution.title')
            },
            {
                label: Translator.trans('open_orchestra_backoffice.menu.contribution.content'),
                link: '#content/summary'
            }
        ];
    }

    /**
     * Get a cached content type
     *
     * @param {string} contentTypeId
     * @returns {Object}
     * private
     */
    _getCachedContentType(contentTypeId) {
        return this._cachedContentTypes[contentTypeId];
    }

    /**
     * Cache a content type
     *
     * @param {Object} contentType
     */
{'fraction_non_alphanumeric': 0.13095238095238096, 'fraction_numerical': 0.0008071025020177562, 'mean_word_length': 2.028100183262065, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7665872', 'n_tokens_mistral': 1203, 'n_tokens_neox': 1219, 'n_words': 224}