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


PHP Topic::LoadArrayByTopicLinkId方法代码示例

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


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

示例1: DeleteAllTopics

    /**
     * Deletes all associated Topics
     * @return void
     */
    public function DeleteAllTopics()
    {
        if (is_null($this->intId)) {
            throw new QUndefinedPrimaryKeyException('Unable to call UnassociateTopic on this unsaved TopicLink.');
        }
        // Get the Database Object for this Class
        $objDatabase = TopicLink::GetDatabase();
        // Journaling
        if ($objDatabase->JournalingDatabase) {
            foreach (Topic::LoadArrayByTopicLinkId($this->intId) as $objTopic) {
                $objTopic->Journal('DELETE');
            }
        }
        // Perform the SQL Query
        $objDatabase->NonQuery('
				DELETE FROM
					`topic`
				WHERE
					`topic_link_id` = ' . $objDatabase->SqlVariable($this->intId) . '
			');
    }
开发者ID:qcodo,项目名称:qcodo-website,代码行数:25,代码来源:TopicLinkGen.class.php

示例2: dtrTopics_Bind

 public function dtrTopics_Bind()
 {
     $intTopicLinkId = null;
     switch ($this->intViewState) {
         case 5:
         case 6:
             $intTopicLinkId = $this->objForum->TopicLink->Id;
         case 3:
         case 4:
             if (!$this->objQueryHitArray) {
                 $this->objQueryHitArray = Topic::GetQueryHitArrayForSearch($this->strSearchTerm, $intTopicLinkId);
             }
             $this->dtrTopics->TotalItemCount = count($this->objQueryHitArray);
             // If First Time (on FormCreate), pre-set the Page Number
             if ($this->strCallType == QCallType::None && $this->objTopic) {
                 $this->dtrTopics->PageNumber = $this->GetPageNumber($this->objTopic, $this->dtrTopics->ItemsPerPage, $this->objQueryHitArray);
             }
             $this->dtrTopics->DataSource = Topic::LoadArrayBySearchResultArray($this->objQueryHitArray, $this->dtrTopics->LimitInfo);
             $this->objQueryHitArray = null;
             break;
         default:
             $this->dtrTopics->TotalItemCount = $this->objForum->TopicLink->TopicCount;
             // If First Time (on FormCreate), pre-set the Page Number
             if ($this->strCallType == QCallType::None && $this->objTopic) {
                 $this->dtrTopics->PageNumber = $this->GetPageNumber($this->objTopic, $this->dtrTopics->ItemsPerPage);
             }
             $this->dtrTopics->DataSource = Topic::LoadArrayByTopicLinkId($this->objForum->TopicLink->Id, QQ::Clause(QQ::OrderBy(QQN::Topic()->LastPostDate, false), $this->dtrTopics->LimitClause));
             break;
     }
 }
开发者ID:qcodo,项目名称:qcodo-website,代码行数:30,代码来源:forum.php

示例3: GetTopicArray

 /**
  * Gets all associated Topics as an array of Topic objects
  * @param QQClause[] $objOptionalClauses additional optional QQClause objects for this query
  * @return Topic[]
  */
 public function GetTopicArray($objOptionalClauses = null)
 {
     if (is_null($this->intId)) {
         return array();
     }
     try {
         return Topic::LoadArrayByTopicLinkId($this->intId, $objOptionalClauses);
     } catch (QCallerException $objExc) {
         $objExc->IncrementOffset();
         throw $objExc;
     }
 }
开发者ID:klucznik,项目名称:qcodo-website,代码行数:17,代码来源:TopicLinkGen.class.php


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