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


PHP Topic::LoadAll方法代碼示例

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


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

示例1: Refresh

 /**
  * Refresh this MetaControl with Data from the local Person object.
  * @param boolean $blnReload reload Person from the database
  * @return void
  */
 public function Refresh($blnReload = false)
 {
     if ($blnReload) {
         $this->objPerson->Reload();
     }
     if ($this->lblId) {
         if ($this->blnEditMode) {
             $this->lblId->Text = $this->objPerson->Id;
         }
     }
     if ($this->lstPersonType) {
         $this->lstPersonType->SelectedValue = $this->objPerson->PersonTypeId;
     }
     if ($this->lblPersonTypeId) {
         $this->lblPersonTypeId->Text = $this->objPerson->PersonTypeId ? PersonType::$NameArray[$this->objPerson->PersonTypeId] : null;
     }
     if ($this->txtUsername) {
         $this->txtUsername->Text = $this->objPerson->Username;
     }
     if ($this->lblUsername) {
         $this->lblUsername->Text = $this->objPerson->Username;
     }
     if ($this->txtPassword) {
         $this->txtPassword->Text = $this->objPerson->Password;
     }
     if ($this->lblPassword) {
         $this->lblPassword->Text = $this->objPerson->Password;
     }
     if ($this->txtFirstName) {
         $this->txtFirstName->Text = $this->objPerson->FirstName;
     }
     if ($this->lblFirstName) {
         $this->lblFirstName->Text = $this->objPerson->FirstName;
     }
     if ($this->txtLastName) {
         $this->txtLastName->Text = $this->objPerson->LastName;
     }
     if ($this->lblLastName) {
         $this->lblLastName->Text = $this->objPerson->LastName;
     }
     if ($this->txtEmail) {
         $this->txtEmail->Text = $this->objPerson->Email;
     }
     if ($this->lblEmail) {
         $this->lblEmail->Text = $this->objPerson->Email;
     }
     if ($this->txtDisplayName) {
         $this->txtDisplayName->Text = $this->objPerson->DisplayName;
     }
     if ($this->lblDisplayName) {
         $this->lblDisplayName->Text = $this->objPerson->DisplayName;
     }
     if ($this->chkPasswordResetFlag) {
         $this->chkPasswordResetFlag->Checked = $this->objPerson->PasswordResetFlag;
     }
     if ($this->lblPasswordResetFlag) {
         $this->lblPasswordResetFlag->Text = $this->objPerson->PasswordResetFlag ? QApplication::Translate('Yes') : QApplication::Translate('No');
     }
     if ($this->chkDisplayRealNameFlag) {
         $this->chkDisplayRealNameFlag->Checked = $this->objPerson->DisplayRealNameFlag;
     }
     if ($this->lblDisplayRealNameFlag) {
         $this->lblDisplayRealNameFlag->Text = $this->objPerson->DisplayRealNameFlag ? QApplication::Translate('Yes') : QApplication::Translate('No');
     }
     if ($this->chkDisplayEmailFlag) {
         $this->chkDisplayEmailFlag->Checked = $this->objPerson->DisplayEmailFlag;
     }
     if ($this->lblDisplayEmailFlag) {
         $this->lblDisplayEmailFlag->Text = $this->objPerson->DisplayEmailFlag ? QApplication::Translate('Yes') : QApplication::Translate('No');
     }
     if ($this->chkOptInFlag) {
         $this->chkOptInFlag->Checked = $this->objPerson->OptInFlag;
     }
     if ($this->lblOptInFlag) {
         $this->lblOptInFlag->Text = $this->objPerson->OptInFlag ? QApplication::Translate('Yes') : QApplication::Translate('No');
     }
     if ($this->chkDonatedFlag) {
         $this->chkDonatedFlag->Checked = $this->objPerson->DonatedFlag;
     }
     if ($this->lblDonatedFlag) {
         $this->lblDonatedFlag->Text = $this->objPerson->DonatedFlag ? QApplication::Translate('Yes') : QApplication::Translate('No');
     }
     if ($this->txtLocation) {
         $this->txtLocation->Text = $this->objPerson->Location;
     }
     if ($this->lblLocation) {
         $this->lblLocation->Text = $this->objPerson->Location;
     }
     if ($this->lstCountry) {
         $this->lstCountry->RemoveAllItems();
         $this->lstCountry->AddItem(QApplication::Translate('- Select One -'), null);
         $objCountryArray = Country::LoadAll();
         if ($objCountryArray) {
             foreach ($objCountryArray as $objCountry) {
                 $objListItem = new QListItem($objCountry->__toString(), $objCountry->Id);
//.........這裏部分代碼省略.........
開發者ID:qcodo,項目名稱:qcodo-website,代碼行數:101,代碼來源:PersonMetaControlGen.class.php

示例2: foreach

<?php

$objIndex = Topic::CreateSearchIndex();
QDataGen::DisplayForEachTaskStart($strDescription = 'Generating Index for Topics', Topic::CountAll());
foreach (Topic::LoadAll() as $objTopic) {
    QDataGen::DisplayForEachTaskNext($strDescription);
    $objTopic->RefreshSearchIndex($objIndex);
}
QDataGen::DisplayForEachTaskEnd($strDescription);
$objIndex->commit();
print $objIndex->count() . " Documents indexed.\r\n";
開發者ID:qcodo,項目名稱:qcodo-website,代碼行數:11,代碼來源:search-index.cli.php

示例3: Refresh

 /**
  * Refresh this MetaControl with Data from the local Message object.
  * @param boolean $blnReload reload Message from the database
  * @return void
  */
 public function Refresh($blnReload = false)
 {
     if ($blnReload) {
         $this->objMessage->Reload();
     }
     if ($this->lblId) {
         if ($this->blnEditMode) {
             $this->lblId->Text = $this->objMessage->Id;
         }
     }
     if ($this->lstTopic) {
         $this->lstTopic->RemoveAllItems();
         if (!$this->blnEditMode) {
             $this->lstTopic->AddItem(QApplication::Translate('- Select One -'), null);
         }
         $objTopicArray = Topic::LoadAll();
         if ($objTopicArray) {
             foreach ($objTopicArray as $objTopic) {
                 $objListItem = new QListItem($objTopic->__toString(), $objTopic->Id);
                 if ($this->objMessage->Topic && $this->objMessage->Topic->Id == $objTopic->Id) {
                     $objListItem->Selected = true;
                 }
                 $this->lstTopic->AddItem($objListItem);
             }
         }
     }
     if ($this->lblTopicId) {
         $this->lblTopicId->Text = $this->objMessage->Topic ? $this->objMessage->Topic->__toString() : null;
     }
     if ($this->lstTopicLink) {
         $this->lstTopicLink->RemoveAllItems();
         if (!$this->blnEditMode) {
             $this->lstTopicLink->AddItem(QApplication::Translate('- Select One -'), null);
         }
         $objTopicLinkArray = TopicLink::LoadAll();
         if ($objTopicLinkArray) {
             foreach ($objTopicLinkArray as $objTopicLink) {
                 $objListItem = new QListItem($objTopicLink->__toString(), $objTopicLink->Id);
                 if ($this->objMessage->TopicLink && $this->objMessage->TopicLink->Id == $objTopicLink->Id) {
                     $objListItem->Selected = true;
                 }
                 $this->lstTopicLink->AddItem($objListItem);
             }
         }
     }
     if ($this->lblTopicLinkId) {
         $this->lblTopicLinkId->Text = $this->objMessage->TopicLink ? $this->objMessage->TopicLink->__toString() : null;
     }
     if ($this->lstPerson) {
         $this->lstPerson->RemoveAllItems();
         $this->lstPerson->AddItem(QApplication::Translate('- Select One -'), null);
         $objPersonArray = Person::LoadAll();
         if ($objPersonArray) {
             foreach ($objPersonArray as $objPerson) {
                 $objListItem = new QListItem($objPerson->__toString(), $objPerson->Id);
                 if ($this->objMessage->Person && $this->objMessage->Person->Id == $objPerson->Id) {
                     $objListItem->Selected = true;
                 }
                 $this->lstPerson->AddItem($objListItem);
             }
         }
     }
     if ($this->lblPersonId) {
         $this->lblPersonId->Text = $this->objMessage->Person ? $this->objMessage->Person->__toString() : null;
     }
     if ($this->txtMessage) {
         $this->txtMessage->Text = $this->objMessage->Message;
     }
     if ($this->lblMessage) {
         $this->lblMessage->Text = $this->objMessage->Message;
     }
     if ($this->txtCompiledHtml) {
         $this->txtCompiledHtml->Text = $this->objMessage->CompiledHtml;
     }
     if ($this->lblCompiledHtml) {
         $this->lblCompiledHtml->Text = $this->objMessage->CompiledHtml;
     }
     if ($this->txtReplyNumber) {
         $this->txtReplyNumber->Text = $this->objMessage->ReplyNumber;
     }
     if ($this->lblReplyNumber) {
         $this->lblReplyNumber->Text = $this->objMessage->ReplyNumber;
     }
     if ($this->calPostDate) {
         $this->calPostDate->DateTime = $this->objMessage->PostDate;
     }
     if ($this->lblPostDate) {
         $this->lblPostDate->Text = sprintf($this->objMessage->PostDate) ? $this->objMessage->__toString($this->strPostDateDateTimeFormat) : null;
     }
 }
開發者ID:qcodo,項目名稱:qcodo-website,代碼行數:95,代碼來源:MessageMetaControlGen.class.php

示例4: MetaDataBinder

 /**
  * Default / simple DataBinder for this Meta DataGrid.  This can easily be overridden
  * by calling SetDataBinder() on this DataGrid with another DataBinder of your choice.
  *
  * If a paginator is set on this DataBinder, it will use it.  If not, then no pagination will be used.
  * It will also perform any sorting (if applicable).
  */
 public function MetaDataBinder()
 {
     // Remember!  We need to first set the TotalItemCount, which will affect the calcuation of LimitClause below
     if ($this->Paginator) {
         $this->TotalItemCount = Topic::CountAll();
     }
     // Setup the $objClauses Array
     $objClauses = array();
     // If a column is selected to be sorted, and if that column has a OrderByClause set on it, then let's add
     // the OrderByClause to the $objClauses array
     if ($objClause = $this->OrderByClause) {
         array_push($objClauses, $objClause);
     }
     // Add the LimitClause information, as well
     if ($objClause = $this->LimitClause) {
         array_push($objClauses, $objClause);
     }
     // Set the DataSource to be a Query result from Topic, given the clauses above
     $this->DataSource = Topic::LoadAll($objClauses);
 }
開發者ID:klucznik,項目名稱:qcodo-website,代碼行數:27,代碼來源:TopicDataGridGen.class.php


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