當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Track::setDisableComments方法代碼示例

本文整理匯總了PHP中Track::setDisableComments方法的典型用法代碼示例。如果您正苦於以下問題:PHP Track::setDisableComments方法的具體用法?PHP Track::setDisableComments怎麽用?PHP Track::setDisableComments使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Track的用法示例。


在下文中一共展示了Track::setDisableComments方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: execute

 /**
  * Save track.
  */
 function execute()
 {
     $schedConf =& Request::getSchedConf();
     $trackDao =& DAORegistry::getDAO('TrackDAO');
     if (isset($this->trackId)) {
         $track =& $trackDao->getTrack($this->trackId);
     }
     if (!isset($track)) {
         $track = new Track();
         $track->setSchedConfId($schedConf->getId());
         $track->setSequence(REALLY_BIG_NUMBER);
     }
     $track->setTitle($this->getData('title'), null);
     // Localized
     $track->setAbbrev($this->getData('abbrev'), null);
     // Localized
     $reviewFormId = $this->getData('reviewFormId');
     if ($reviewFormId === '') {
         $reviewFormId = null;
     }
     $track->setReviewFormId($reviewFormId);
     $track->setMetaReviewed($this->getData('metaNotReviewed') ? 0 : 1);
     $track->setIdentifyType($this->getData('identifyType'), null);
     // Localized
     $track->setDirectorRestricted($this->getData('directorRestriction') ? 1 : 0);
     $track->setPolicy($this->getData('policy'), null);
     // Localized
     $track->setHideAbout($this->getData('hideAbout'));
     $track->setDisableComments($this->getData('disableComments') ? 1 : 0);
     $track->setAbstractWordCount($this->getData('wordCount'));
     if ($track->getId() != null) {
         $trackDao->updateTrack($track);
         $trackId = $track->getId();
     } else {
         $trackId = $trackDao->insertTrack($track);
         $trackDao->resequenceTracks($schedConf->getId());
     }
     // Save assigned directors
     $trackDirectorsDao =& DAORegistry::getDAO('TrackDirectorsDAO');
     $trackDirectorsDao->deleteDirectorsByTrackId($trackId, $schedConf->getId());
     $directors = explode(':', Request::getUserVar('assignedDirectors'));
     foreach ($directors as $edUserId) {
         if (!empty($edUserId)) {
             $trackDirectorsDao->insertDirector($schedConf->getId(), $trackId, $edUserId);
         }
     }
 }
開發者ID:ramonsodoma,項目名稱:ocs,代碼行數:50,代碼來源:TrackForm.inc.php

示例2: Track

 /**
  * Internal function to return a Track object from a row.
  * @param $row array
  * @return Track
  */
 function &_returnTrackFromRow(&$row)
 {
     $track = new Track();
     $track->setId($row['track_id']);
     $track->setSchedConfId($row['sched_conf_id']);
     $track->setReviewFormId($row['review_form_id']);
     $track->setSequence($row['seq']);
     $track->setMetaReviewed($row['meta_reviewed']);
     $track->setDirectorRestricted($row['director_restricted']);
     $track->setHideAbout($row['hide_about']);
     $track->setDisableComments($row['disable_comments']);
     $track->setAbstractWordCount($row['abstract_word_count']);
     $this->getDataObjectSettings('track_settings', 'track_id', $row['track_id'], $track);
     HookRegistry::call('TrackDAO::_returnTrackFromRow', array(&$track, &$row));
     return $track;
 }
開發者ID:ramonsodoma,項目名稱:ocs,代碼行數:21,代碼來源:TrackDAO.inc.php


注:本文中的Track::setDisableComments方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。