当前位置: 首页>>代码示例>>PHP>>正文


PHP Track::setAbstractWordCount方法代码示例

本文整理汇总了PHP中Track::setAbstractWordCount方法的典型用法代码示例。如果您正苦于以下问题:PHP Track::setAbstractWordCount方法的具体用法?PHP Track::setAbstractWordCount怎么用?PHP Track::setAbstractWordCount使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Track的用法示例。


在下文中一共展示了Track::setAbstractWordCount方法的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::setAbstractWordCount方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。