/**
  * @desc Sets the variables values in WikiFactory and returns true if all ends good; otherwise returns false and add information to logs
  *
  * @param Array $slotsCfgArr an array where elements are new values of WikiFactory variables and keys of those elements are names of those variables
  * @return bool
  *
  * @author Andrzej 'nAndy' Łukaszewski
  */
 private function saveSlotsConfigInWikiFactory($corpWikiId, $corpWikiLang, $slotsCfgArr)
 {
     wfProfileIn(__METHOD__);
     $statusArr = array();
     $result = false;
     if (is_array($slotsCfgArr)) {
         foreach ($slotsCfgArr as $wfVar => $wfVarValue) {
             $status = $this->helper->setWikiFactoryVar($corpWikiId, $wfVar, $wfVarValue);
             $statusArr[$wfVar] = $status;
         }
     }
     if (in_array(false, $statusArr)) {
         Wikia::log(__METHOD__, false, "A problem with saving WikiFactory variable(s) occured. Status array: " . print_r($statusArr, true));
         $this->errorMsg = wfMessage('manage-wikia-home-error-wikifactory-failure')->text();
     } else {
         $visualization = new CityVisualization();
         //todo: put purging those caches to CityVisualization class and fire here only one its method here
         //purge verticals cache
         foreach ($visualization->getVerticalsIds() as $verticalId) {
             $memcKey = $visualization->getVisualizationVerticalWikisListDataCacheKey($verticalId, $corpWikiId, $corpWikiLang);
             $this->wg->Memc->set($memcKey, null);
         }
         //purge visualization list cache
         $visualization->purgeVisualizationWikisListCache($corpWikiId, $corpWikiLang);
         $this->infoMsg = wfMessage('manage-wikia-home-wikis-in-slots-success')->text();
         $result = true;
     }
     wfProfileOut(__METHOD__);
     return $result;
 }