本文整理汇总了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) . '
');
}
示例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;
}
}
示例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;
}
}