load()

in public/src/js/widgets/columns/fronts.js [147:183]


    load(frontId) {
        if (frontId !== this.front()) {
            this.front(frontId);
        }
        const allCollections = this.baseModel.state().config.collections;
        const front = this.baseModel.frontsMap()[frontId] || {};
        this.isHidden(front.isHidden);
        this.allExpanded(true);
        this.collections(
            (front.collections || [])
            .filter(id => allCollections[id] && !allCollections[id].uneditable)
            .map(id => new Collection(
                _.extend(
                    allCollections[id],
                    {
                        id: id,
                        alsoOn: _.reduce(this.baseModel.allFrontsList(), (alsoOn, frontFromList) => {
                            if (frontFromList.id !== frontId && (frontFromList.collections || []).indexOf(id) > -1) {
                                alsoOn.push({
                                    id: frontFromList.id,
                                    priority: frontFromList.priority || 'editorial',
                                    isDifferentPriority: frontFromList.priority !== front.priority
                                });
                            }
                            return alsoOn;
                        }, []),
                        front: this
                    }
                )
            ))
        );

        this.getFrontAge({ alertIfStale: true });
        this.loaded = Promise.all(
            this.collections().map(collection => collection.loaded)
        ).then(() => mediator.emit('front:loaded', this));
    }