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


PHP Issue::getIssueId方法代码示例

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


在下文中一共展示了Issue::getIssueId方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: setIssue

 /**
  * The setter of the field issue_id.
  * @param Issue $issue - the issue related to the reply
  */
 public function setIssue(Issue $issue)
 {
     if ($issue == NULL) {
         throw new InvalidArgumentException('[Model\\IssueReply] Invalid Model\\Issue.');
     }
     $this->issue_id = $issue->getIssueId();
 }
开发者ID:kelliany,项目名称:TestZilla,代码行数:11,代码来源:IssueReply.php

示例2: ResourceId

    camp_html_goto_page($backLink);
}
$changed = true;
$changed &= $issueObj->setName($f_issue_name);
if ($issueObj->getWorkflowStatus() == 'Y') {
    $changed &= $issueObj->setPublicationDate($f_publication_date);
}
//@New theme management
$resourceId = new ResourceId('Publication/Edit');
$themeManagementService = $resourceId->getService(IThemeManagementService::NAME_1);
$outputSettingIssueService = $resourceId->getService(IOutputSettingIssueService::NAME);
$outputService = $resourceId->getService(IOutputService::NAME);
$issueService = $resourceId->getService(IIssueService::NAME);
$syncRsc = $resourceId->getService(ISyncResourceService::NAME);
$newOutputSetting = false;
$outSetIssues = $outputSettingIssueService->findByIssue($issueObj->getIssueId());
if (count($outSetIssues) > 0) {
    $outSetIssue = $outSetIssues[0];
} else {
    $outSetIssue = new OutputSettingsIssue();
    $outSetIssue->setOutput($outputService->findByName('Web'));
    $outSetIssue->setIssue($issueService->getById($issueObj->getIssueId()));
    $newOutputSetting = true;
}
$outSetIssue->setThemePath($syncRsc->getThemePath($f_theme_id));
if ($f_issue_template_id != null && $f_issue_template_id != '0') {
    $outSetIssue->setFrontPage($syncRsc->getResource('frontPage', $f_issue_template_id));
} else {
    $outSetIssue->setFrontPage(null);
}
if ($f_section_template_id != null && $f_section_template_id != '0') {
开发者ID:alvsgithub,项目名称:Newscoop,代码行数:31,代码来源:do_edit.php

示例3: createIssue

 /**
  * Create an issue of a product.
  * @param  Product $product           - the product which the issue points to
  * @param  String  $productVersion    - the version of the product where the issue found
  * @param  String  $issueCategorySlug - the unique slug of the category of the issue
  * @param  User    $hunter            - the user who found the issue
  * @param  String  $issueTitle        - the title of the issue
  * @param  String  $issueDescription  - the description of the issue
  * @param  boolean $isTokenValid      - whether the CSRF token is correct
  * @return an array with data validation result
  */
 public function createIssue($product, $productVersion, $issueCategorySlug, $hunter, $issueTitle, $issueDescription, $isTokenValid)
 {
     $issueCategory = $this->getIssueCategoryObjectUsingSlug($issueCategorySlug);
     $result = array('isSuccessful' => false, 'isProductExists' => $product != NULL, 'isProductVersionEmpty' => empty($productVersion), 'isProductVersionLegal' => $this->isProductVersionLegal($productVersion), 'isIssueCategoryEmpty' => $issueCategory == NULL, 'isUserLoggedIn' => $hunter != NULL, 'isIssueTitleEmpty' => empty($issueTitle), 'isIssueTitleLegal' => $this->isIssueTitleLegal($issueTitle), 'isDescriptionEmpty' => empty($issueDescription), 'isTokenValid' => $isTokenValid);
     $result['isSuccessful'] = $result['isProductExists'] && !$result['isProductVersionEmpty'] && $result['isProductVersionLegal'] && !$result['isIssueCategoryEmpty'] && $result['isUserLoggedIn'] && !$result['isIssueTitleEmpty'] && $result['isIssueTitleLegal'] && !$result['isDescriptionEmpty'] && $result['isTokenValid'];
     if ($result['isSuccessful']) {
         $issueStatus = IssueStatus::findFirst("issue_status_slug = 'unconfirmed'");
         $issue = new Issue();
         $issue->setProduct($product);
         $issue->setProductVersion($productVersion);
         $issue->setIssueCategory($issueCategory);
         $issue->setIssueStatus($issueStatus);
         $issue->setHunter($hunter);
         $issue->setIssueTitle($issueTitle);
         $issue->setIssueDescription($issueDescription);
         if (!$issue->create()) {
             $result['isSuccessful'] = false;
         } else {
             $result['issueId'] = $issue->getIssueId();
         }
     }
     return $result;
 }
开发者ID:kelliany,项目名称:TestZilla,代码行数:34,代码来源:IssueService.php

示例4: GetIssueTemplate

 public static function GetIssueTemplate($p_lngId, $p_pubId, $p_issNr)
 {
     global $g_ado_db;
     $cacheService = \Zend_Registry::get('container')->getService('newscoop.cache');
     $cacheKey = $cacheService->getCacheKey(array('GetIssueTemplate', $p_lngId, $p_pubId, $p_issNr), 'issue');
     if ($cacheService->contains($cacheKey)) {
         return $cacheService->fetch($cacheKey);
     } else {
         $resourceId = new ResourceId('template_engine/classes/CampSystem');
         $outputService = $resourceId->getService(IOutputService::NAME);
         if (!\Zend_Registry::isRegistered('webOutput')) {
             $cacheKeyWebOutput = $cacheService->getCacheKey(array('OutputService', 'Web'), 'outputservice');
             if ($cacheService->contains($cacheKeyWebOutput)) {
                 \Zend_Registry::set('webOutput', $cacheService->fetch($cacheKeyWebOutput));
             } else {
                 $webOutput = $outputService->findByName('Web');
                 $cacheService->save($cacheKeyWebOutput, $webOutput);
                 \Zend_Registry::set('webOutput', $webOutput);
             }
         }
         /* @var $templateSearchService ITemplateSearchService */
         $templateSearchService = $resourceId->getService(ITemplateSearchService::NAME);
         $issueObj = new Issue($p_pubId, $p_lngId, $p_issNr);
         $data = $templateSearchService->getFrontPage($issueObj->getIssueId(), \Zend_Registry::get('webOutput'));
         if (empty($data)) {
             $data = self::GetInvalidURLTemplate($p_pubId, $p_issNr, $p_lngId);
         }
         $cacheService->save($cacheKey, $data);
         return $data;
     }
 }
开发者ID:alvsgithub,项目名称:Newscoop,代码行数:31,代码来源:CampSystem.php

示例5: createTranslation

 /**
  * Create a copy of the article, but make it a translation
  * of the current one.
  *
  * @param  int     $p_languageId
  * @param  int     $p_userId
  * @param  string  $p_name
  * @return Article
  */
 public function createTranslation($p_languageId, $p_userId, $p_name)
 {
     $translator = \Zend_Registry::get('container')->getService('translator');
     // Construct the duplicate article object.
     $articleCopy = new Article();
     $articleCopy->m_data['IdPublication'] = $this->m_data['IdPublication'];
     $articleCopy->m_data['NrIssue'] = $this->m_data['NrIssue'];
     $articleCopy->m_data['NrSection'] = $this->m_data['NrSection'];
     $articleCopy->m_data['IdLanguage'] = $p_languageId;
     $articleCopy->m_data['Number'] = $this->m_data['Number'];
     $values = array();
     // Copy some attributes
     $values['ShortName'] = $this->m_data['ShortName'];
     $values['Type'] = $this->m_data['Type'];
     $values['OnFrontPage'] = $this->m_data['OnFrontPage'];
     $values['OnSection'] = $this->m_data['OnFrontPage'];
     $values['Public'] = $this->m_data['Public'];
     $values['ArticleOrder'] = $this->m_data['ArticleOrder'];
     $values['comments_enabled'] = $this->m_data['comments_enabled'];
     $values['comments_locked'] = $this->m_data['comments_locked'];
     $values['rating_enabled'] = $this->m_data['rating_enabled'];
     // Change some attributes
     $values['Name'] = $p_name;
     $values['Published'] = 'N';
     $values['IsIndexed'] = 'N';
     $values['IdUser'] = $p_userId;
     // for internall relations in entity we need also to keep sectionId and issueId
     $issueObj = new Issue($this->m_data['IdPublication'], $p_languageId, $this->m_data['NrIssue']);
     $sectionObj = new Section($this->m_data['IdPublication'], $this->m_data['NrIssue'], $p_languageId, $this->m_data['NrSection']);
     $values['issue_id'] = $issueObj->getIssueId();
     $values['section_id'] = $sectionObj->getSectionId();
     // Create the record
     $success = $articleCopy->__create($values);
     if (!$success) {
         return false;
     }
     $articleCopy->setProperty('UploadDate', 'NOW()', true, true);
     $articleCopy->setProperty('LockUser', 'NULL', true, true);
     $articleCopy->setProperty('LockTime', 'NULL', true, true);
     // Insert an entry into the article type table.
     $articleCopyData = new ArticleData($articleCopy->m_data['Type'], $articleCopy->m_data['Number'], $articleCopy->m_data['IdLanguage']);
     $articleCopyData->create();
     $origArticleData = $this->getArticleData();
     $origArticleData->copyToExistingRecord($articleCopy->getArticleNumber(), $p_languageId);
     $logtext = $translator->trans('Article translated to $4 ($5)', array('$4' => $articleCopy->getTitle(), '$5' => $articleCopy->getLanguageName()), 'api');
     Log::ArticleMessage($this, $logtext, null, 31);
     // geo-map processing
     Geo_Map::OnCreateTranslation($this->m_data['Number'], $this->m_data['IdLanguage'], $p_languageId);
     return $articleCopy;
 }
开发者ID:sourcefabric,项目名称:newscoop,代码行数:59,代码来源:Article.php

示例6: array

        $errorStr = $translator->trans('There was an error reading the issue parameter.', array(), 'issues');
    }
}
if ($errorStr != "") {
    camp_html_display_error($errorStr, null, true);
}
$resourceId = new ResourceId('Publication/Edit');
$themeManagementService = $resourceId->getService(IThemeManagementService::NAME_1);
/* @var $themeManagementService \Newscoop\Service\Implementation\ThemeManagementServiceLocal */
$outputSettingIssueService = $resourceId->getService(IOutputSettingIssueService::NAME);
/* @var $outputSettingIssueService \Newscoop\Service\Implementation\OutputSettingIssueServiceDoctrine */
$issueService = $resourceId->getService(IIssueService::NAME);
/* @var $issueService \Newscoop\Service\Implementation\IssueServiceDoctrine */
$outputService = $resourceId->getService(IOutputService::NAME);
$syncRsc = $resourceId->getService(ISyncResourceService::NAME);
$outputIssueSettings = current($outputSettingIssueService->findByIssue($issueObj->getIssueId()));
/* @var $outputIssueSettings \Newscoop\Entity\Output\OutputSettingsIssue */
$publicationThemes = $themeManagementService->getThemes($publicationObj->getPublicationId());
if (!$outputIssueSettings) {
    if (count($publicationThemes) > 0) {
        $themePath = $publicationThemes[0]->getPath();
        $outputIssueSettings = new OutputSettingsIssue();
        $outputIssueSettings->setOutput($outputService->findByName('Web'));
        $outputIssueSettings->setIssue($issueService->getById($issueObj->getIssueId()));
        $outputIssueSettings->setThemePath($syncRsc->getThemePath($themePath));
        $outputIssueSettings->setFrontPage(null);
        $outputIssueSettings->setSectionPage(null);
        $outputIssueSettings->setArticlePage(null);
        $outputSettingIssueService->insert($outputIssueSettings);
    } else {
        $errorStr = $translator->trans('This issue cannot be previewed. Please make sure the publication has a theme assigned.', array(), 'issues');
开发者ID:sourcefabric,项目名称:newscoop,代码行数:31,代码来源:preview.php

示例7: GetIssueTemplate

 public static function GetIssueTemplate($p_lngId, $p_pubId, $p_issNr)
 {
     global $g_ado_db;
     if (CampCache::IsEnabled()) {
         $paramString = $p_lngId . '_' . $p_pubId . '_' . $p_issNr;
         $cacheKey = __CLASS__ . '_IssueTemplate_' . $paramString;
         $issueTemplate = CampCache::singleton()->fetch($cacheKey);
         if ($issueTemplate !== false && !empty($issueTemplate)) {
             return $issueTemplate;
         }
     }
     $resourceId = new ResourceId('template_engine/classes/CampSystem');
     /* @var $templateSearchService ITemplateSearchService */
     $templateSearchService = $resourceId->getService(ITemplateSearchService::NAME);
     $outputService = $resourceId->getService(IOutputService::NAME);
     $issueObj = new Issue($p_pubId, $p_lngId, $p_issNr);
     $data = $templateSearchService->getFrontPage($issueObj->getIssueId(), $outputService->findByName('Web'));
     if (empty($data)) {
         $data = self::GetInvalidURLTemplate($p_pubId, $p_issNr, $p_lngId);
     }
     if (CampCache::IsEnabled()) {
         CampCache::singleton()->store($cacheKey, $data);
     }
     return $data;
 }
开发者ID:nidzix,项目名称:Newscoop,代码行数:25,代码来源:CampSystem.php


注:本文中的Issue::getIssueId方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。