本文整理汇总了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);
//.........这里部分代码省略.........
示例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";
示例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;
}
}
示例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);
}