コード例 #1
0
    public function htmlBuildResult()
    {
        $channelConfiguration = ChannelConfiguration::getChannelConfigurationByApplicationLocalizedId($this->applicationLocalized()->attribute("id"));

        if($channelConfiguration)
        {
            $this->pushResult("subtitle", $channelConfiguration->attribute("subtitle"));
            $this->pushResult("icon", StaticData::externalUrl(ClusterTool::clusterIdentifier(), $channelConfiguration->attribute("icon")));
            $this->pushResult("color", $channelConfiguration->attribute("color"));
        }
        
        if( SolrSafeOperatorHelper::featureIsActive( 'GoogleAnalytics' ) )
        {
            $this->pushResult( 'gtm_variables', $this->getGTMTags());
        }

        if ($this->getCustomParameter('TaxonomiesFilter') != false)
        {
            $taxonomiesFilter = array();
            $taxonomyCategoriesFilter = $this->getCustomParameter('TaxonomiesFilter');
            foreach($taxonomyCategoriesFilter as $category)
            {
                $taxonomies = FacetFilteringTool::getTaxonomyTranslationsByCategory($category);
                $taxonomiesFilter[$category] = $taxonomies;
            }
            $this->pushResult('filters', $taxonomiesFilter);
        }
    }
コード例 #2
0
 private function addChannels($channels, $units, $folderSeq)
 {
     $i = 0;
     $chNoArr = array();
     $CCDS = ChannelConfigurationDataStore::getInstance();
     foreach ($channels as $ch) {
         $chConf = new ChannelConfiguration();
         $chConf->setChannelName($ch);
         $number = $i + 1;
         $chConf->setChannelNumber($number);
         $chConf->setFolderSeq($folderSeq);
         $chConf->setChannelStatusFlag(1);
         $chConf->setChannelUnit($units[$i]);
         $CCDS->Save($chConf);
         $chNoArr[$ch] = $number;
         $i++;
     }
     return $chNoArr;
 }
コード例 #3
0
 /**
  * @return ChannelConfiguration|null
  */
 public function getChannelConfiguration()
 {
     $condition = array(
         "channel_application_localized_id" => $this->attribute("id")
     );
     return ChannelConfiguration::fetchObject(ChannelConfiguration::definition(), null, $condition);
 }
コード例 #4
0
     $errMsg = "Please Select folder and click on Edit.";
 } else {
     $folder = $folders[$selSeq];
     if ($folder->getStationType() == "stack" || $folder->getStationType() == "effluent") {
         $isdataExist = $WSDS->isStackDataExist($selSeq);
     } else {
         $isdataExist = $WFDS->isFileDataExist($selSeq);
     }
     $channlConfigs = $CDS->FindByFolder($selSeq);
     $chSeqs = $_POST["chseq"];
     $count = 1;
     foreach ($chSeqs as $chseq) {
         if (!empty($chseq)) {
             $chConfigObj = $channlConfigs[intval($chseq)];
         } else {
             $chConfigObj = new ChannelConfiguration();
             $chConfigObj->setFolderSeq($selSeq);
             $chConfigObj->setChannelStatusFlag(1);
         }
         if (!$chConfigObj) {
             continue;
         }
         $chNo = $_POST["chno" . $count];
         $chName = $_POST["chName" . $count];
         $chUnit = $_POST["chUnit" . $count];
         $chSubStation = $_POST["substation" . $count];
         $prescribedLimit = $_POST["prescribedlimit" . $count];
         $chConfigObj->setChannelName($chName);
         $chConfigObj->setChannelNumber($chNo);
         $chConfigObj->setChannelUnit($chUnit);
         $chConfigObj->setChannelStation($chSubStation);
コード例 #5
0
 public function populateObject($rsItem)
 {
     $seq_ = $rsItem["configseq"];
     $folderSeq_ = $rsItem["folderseq"];
     $channelNumber_ = $rsItem["channelnumber"];
     $channelName_ = $rsItem["channelname"];
     $channelStatusFlag_ = $rsItem["channelstatusflag"];
     $channelUnit_ = $rsItem["channelunit"];
     $channelStation_ = $rsItem["channelstation"];
     $prescribedLimit_ = $rsItem["prescribedlimit"];
     $cc = new ChannelConfiguration();
     $cc->setSeq($seq_);
     $cc->setFolderSeq($folderSeq_);
     $cc->setChannelNumber($channelNumber_);
     $cc->setChannelName($channelName_);
     $cc->setChannelStatusFlag($channelStatusFlag_);
     $cc->setChannelUnit($channelUnit_);
     $cc->setChannelStation($channelStation_);
     $cc->setPrescribedLimit($prescribedLimit_);
     return $cc;
 }
コード例 #6
0
    /**
     * @param ChannelConfiguration $channelConfiguration
     * @return string
     */
    public function getNewImage(ChannelConfiguration $channelConfiguration)
    {
        if($this->attribute("new"))
        {
            return StaticData::externalUrl(ClusterTool::clusterIdentifier(), $this->attribute("new"));
        }

        if(!$channelConfiguration->attribute("new"))
        {
            return null;
        }

        return StaticData::externalUrl(ClusterTool::clusterIdentifier(), $channelConfiguration->attribute("new"));
    }
コード例 #7
0
ファイル: CronWQD.php プロジェクト: munishsethi777/eliveui
 function ConfigurationParsing($value, $folder)
 {
     echo "\n\n Starting with Configuration file:  " . $value;
     $configs = ParserConfig::parseConfig($value, $folder->getSeq());
     $CCDS = ChannelConfigurationDataStore::getInstance();
     $CCDS->Delete($folder->getSeq());
     foreach ($configs as $config) {
         $channelConfig = new ChannelConfiguration();
         $channelConfig->setFolderSeq($folder->getSeq());
         $channelConfig->setChannelNumber(trim($config[0]));
         $channelConfig->setChannelStatusFlag(trim($config[1]));
         $channelConfig->setChannelName(trim($config[2]));
         $channelConfig->setChannelUnit(trim($config[3]));
         $CCDS->Save($channelConfig);
     }
     echo "\n Unlinking configuration file" . $value;
     unlink($value);
 }