sortStaticArticles(staticArticles) {
    let staticCollections = window.StaticCollections.getStaticCollections();
    let sortedCollections = [];
    staticArticles.forEach(articles => {
      let staticType = articles[0].source;
      staticCollections.forEach(staticCollection => {
        if (staticCollection.type && staticCollection.type === staticType) {
          staticCollection.frequency = parseInt(staticCollection.frequency);
          staticCollection.initPos = parseInt(staticCollection.initPos);
          staticCollection.pos = parseInt(staticCollection.initPos);
          staticCollection.count = 0;
          staticCollection.articles = articles;
          staticCollection.articlePool = [];
          sortedCollections.push(staticCollection);
        }
      });
    });
    return sortedCollections;
  }
/**
   * Sorts the static CTA's using values from thr mapping.yaml file
   *
   * @param {Array} staticArticles collection of static content
   * @returns  {Array} sorted collection of static content.
   */
Sorts the static CTA's using values from thr mapping.yaml file
@param {Array} staticArticles collection of static content
@returns  {Array} sorted collection of static content.
Sorts the static CTA ' s using values from thr mapping . yaml file @param { Array } staticArticles collection of static content @returns { Array } sorted collection of static content .
sortStaticArticles(staticArticles) {
    let staticCollections = window.StaticCollections.getStaticCollections();
    let sortedCollections = [];
    staticArticles.forEach(articles => {
      let staticType = articles[0].source;
      staticCollections.forEach(staticCollection => {
        if (staticCollection.type && staticCollection.type === staticType) {
          staticCollection.frequency = parseInt(staticCollection.frequency);
          staticCollection.initPos = parseInt(staticCollection.initPos);
          staticCollection.pos = parseInt(staticCollection.initPos);
          staticCollection.count = 0;
          staticCollection.articles = articles;
          staticCollection.articlePool = [];
          sortedCollections.push(staticCollection);
        }
      });
    });
    return sortedCollections;
  }
sortStaticArticles ( staticArticles ) { let staticCollections = window . StaticCollections . getStaticCollections ( ) ; let sortedCollections = [ ] ; staticArticles . forEach ( articles => { let staticType = articles [ 0 ] . source ; staticCollections . forEach ( staticCollection => { if ( staticCollection . type && staticCollection . type === staticType ) { staticCollection . frequency = parseInt ( staticCollection . frequency ) ; staticCollection . initPos = parseInt ( staticCollection . initPos ) ; staticCollection . pos = parseInt ( staticCollection . initPos ) ; staticCollection . count = 0 ; staticCollection . articles = articles ; staticCollection . articlePool = [ ] ; sortedCollections . push ( staticCollection ) ; } } ) ; } ) ; return sortedCollections ; }
Sorts the static CTA's using values from thr mapping.yaml file
 @param {Array} staticArticles collection of static content
 @returns  {Array} sorted collection of static content.
Sorts the static CTA ' s using values from thr mapping . yaml file @param { Array } staticArticles collection of static content @returns { Array } sorted collection of static content .