本文整理汇总了PHP中CustomField::LoadAll方法的典型用法代码示例。如果您正苦于以下问题:PHP CustomField::LoadAll方法的具体用法?PHP CustomField::LoadAll怎么用?PHP CustomField::LoadAll使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CustomField
的用法示例。
在下文中一共展示了CustomField::LoadAll方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Form_PreRender
protected function Form_PreRender()
{
$objExpansionMap[CustomField::ExpandCreatedByObject] = true;
// Get Total Count b/c of Pagination
$this->dtgCustomField->TotalItemCount = CustomField::CountAll();
if ($this->dtgCustomField->TotalItemCount == 0) {
$this->dtgCustomField->ShowHeader = false;
} else {
$objClauses = array();
if ($objClause = $this->dtgCustomField->OrderByClause) {
array_push($objClauses, $objClause);
}
if ($objClause = $this->dtgCustomField->LimitClause) {
array_push($objClauses, $objClause);
}
if ($objClause = QQ::Expand(QQN::CustomField()->CreatedByObject)) {
array_push($objClauses, $objClause);
}
$this->dtgCustomField->DataSource = CustomField::LoadAll($objClauses);
$this->dtgCustomField->ShowHeader = true;
}
}
示例2: Refresh
/**
* Refresh this MetaControl with Data from the local CustomFieldValue object.
* @param boolean $blnReload reload CustomFieldValue from the database
* @return void
*/
public function Refresh($blnReload = false)
{
if ($blnReload) {
$this->objCustomFieldValue->Reload();
}
if ($this->lblCustomFieldValueId) {
if ($this->blnEditMode) {
$this->lblCustomFieldValueId->Text = $this->objCustomFieldValue->CustomFieldValueId;
}
}
if ($this->lstCustomField) {
$this->lstCustomField->RemoveAllItems();
if (!$this->blnEditMode) {
$this->lstCustomField->AddItem(QApplication::Translate('- Select One -'), null);
}
$objCustomFieldArray = CustomField::LoadAll();
if ($objCustomFieldArray) {
foreach ($objCustomFieldArray as $objCustomField) {
$objListItem = new QListItem($objCustomField->__toString(), $objCustomField->CustomFieldId);
if ($this->objCustomFieldValue->CustomField && $this->objCustomFieldValue->CustomField->CustomFieldId == $objCustomField->CustomFieldId) {
$objListItem->Selected = true;
}
$this->lstCustomField->AddItem($objListItem);
}
}
}
if ($this->lblCustomFieldId) {
$this->lblCustomFieldId->Text = $this->objCustomFieldValue->CustomField ? $this->objCustomFieldValue->CustomField->__toString() : null;
}
if ($this->txtShortDescription) {
$this->txtShortDescription->Text = $this->objCustomFieldValue->ShortDescription;
}
if ($this->lblShortDescription) {
$this->lblShortDescription->Text = $this->objCustomFieldValue->ShortDescription;
}
if ($this->lstCreatedByObject) {
$this->lstCreatedByObject->RemoveAllItems();
$this->lstCreatedByObject->AddItem(QApplication::Translate('- Select One -'), null);
$objCreatedByObjectArray = UserAccount::LoadAll();
if ($objCreatedByObjectArray) {
foreach ($objCreatedByObjectArray as $objCreatedByObject) {
$objListItem = new QListItem($objCreatedByObject->__toString(), $objCreatedByObject->UserAccountId);
if ($this->objCustomFieldValue->CreatedByObject && $this->objCustomFieldValue->CreatedByObject->UserAccountId == $objCreatedByObject->UserAccountId) {
$objListItem->Selected = true;
}
$this->lstCreatedByObject->AddItem($objListItem);
}
}
}
if ($this->lblCreatedBy) {
$this->lblCreatedBy->Text = $this->objCustomFieldValue->CreatedByObject ? $this->objCustomFieldValue->CreatedByObject->__toString() : null;
}
if ($this->calCreationDate) {
$this->calCreationDate->DateTime = $this->objCustomFieldValue->CreationDate;
}
if ($this->lblCreationDate) {
$this->lblCreationDate->Text = sprintf($this->objCustomFieldValue->CreationDate) ? $this->objCustomFieldValue->__toString($this->strCreationDateDateTimeFormat) : null;
}
if ($this->lstModifiedByObject) {
$this->lstModifiedByObject->RemoveAllItems();
$this->lstModifiedByObject->AddItem(QApplication::Translate('- Select One -'), null);
$objModifiedByObjectArray = UserAccount::LoadAll();
if ($objModifiedByObjectArray) {
foreach ($objModifiedByObjectArray as $objModifiedByObject) {
$objListItem = new QListItem($objModifiedByObject->__toString(), $objModifiedByObject->UserAccountId);
if ($this->objCustomFieldValue->ModifiedByObject && $this->objCustomFieldValue->ModifiedByObject->UserAccountId == $objModifiedByObject->UserAccountId) {
$objListItem->Selected = true;
}
$this->lstModifiedByObject->AddItem($objListItem);
}
}
}
if ($this->lblModifiedBy) {
$this->lblModifiedBy->Text = $this->objCustomFieldValue->ModifiedByObject ? $this->objCustomFieldValue->ModifiedByObject->__toString() : null;
}
if ($this->lblModifiedDate) {
if ($this->blnEditMode) {
$this->lblModifiedDate->Text = $this->objCustomFieldValue->ModifiedDate;
}
}
}
示例3: dtgCustomField_Bind
public function dtgCustomField_Bind()
{
// Get Total Count b/c of Pagination
$this->dtgCustomField->TotalItemCount = CustomField::CountAll();
$objClauses = array();
if ($objClause = $this->dtgCustomField->OrderByClause) {
array_push($objClauses, $objClause);
}
if ($objClause = $this->dtgCustomField->LimitClause) {
array_push($objClauses, $objClause);
}
$this->dtgCustomField->DataSource = CustomField::LoadAll($objClauses);
}
示例4: lstCustomField_Create
protected function lstCustomField_Create()
{
$this->lstCustomField = new QListBox($this);
$this->lstCustomField->Name = QApplication::Translate('Custom Field');
$this->lstCustomField->Required = true;
if (!$this->blnEditMode) {
$this->lstCustomField->AddItem(QApplication::Translate('- Select One -'), null);
}
$objCustomFieldArray = CustomField::LoadAll();
if ($objCustomFieldArray) {
foreach ($objCustomFieldArray as $objCustomField) {
$objListItem = new QListItem($objCustomField->__toString(), $objCustomField->CustomFieldId);
if ($this->objEntityQtypeCustomField->CustomField && $this->objEntityQtypeCustomField->CustomField->CustomFieldId == $objCustomField->CustomFieldId) {
$objListItem->Selected = true;
}
$this->lstCustomField->AddItem($objListItem);
}
}
}
示例5: dtgCustomField_Bind
protected function dtgCustomField_Bind()
{
// Because we want to enable pagination AND sorting, we need to setup the $objClauses array to send to LoadAll()
// Remember! We need to first set the TotalItemCount, which will affect the calcuation of LimitClause below
$this->dtgCustomField->TotalItemCount = CustomField::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->dtgCustomField->OrderByClause) {
array_push($objClauses, $objClause);
}
// Add the LimitClause information, as well
if ($objClause = $this->dtgCustomField->LimitClause) {
array_push($objClauses, $objClause);
}
// Set the DataSource to be the array of all CustomField objects, given the clauses above
$this->dtgCustomField->DataSource = CustomField::LoadAll($objClauses);
}
示例6: Refresh
/**
* Refresh this MetaControl with Data from the local AssetCustomFieldAssetModel object.
* @param boolean $blnReload reload AssetCustomFieldAssetModel from the database
* @return void
*/
public function Refresh($blnReload = false)
{
if ($blnReload) {
$this->objAssetCustomFieldAssetModel->Reload();
}
if ($this->lblAssetCustomFieldAssetModelId) {
if ($this->blnEditMode) {
$this->lblAssetCustomFieldAssetModelId->Text = $this->objAssetCustomFieldAssetModel->AssetCustomFieldAssetModelId;
}
}
if ($this->lstAssetModel) {
$this->lstAssetModel->RemoveAllItems();
if (!$this->blnEditMode) {
$this->lstAssetModel->AddItem(QApplication::Translate('- Select One -'), null);
}
$objAssetModelArray = AssetModel::LoadAll();
if ($objAssetModelArray) {
foreach ($objAssetModelArray as $objAssetModel) {
$objListItem = new QListItem($objAssetModel->__toString(), $objAssetModel->AssetModelId);
if ($this->objAssetCustomFieldAssetModel->AssetModel && $this->objAssetCustomFieldAssetModel->AssetModel->AssetModelId == $objAssetModel->AssetModelId) {
$objListItem->Selected = true;
}
$this->lstAssetModel->AddItem($objListItem);
}
}
}
if ($this->lblAssetModelId) {
$this->lblAssetModelId->Text = $this->objAssetCustomFieldAssetModel->AssetModel ? $this->objAssetCustomFieldAssetModel->AssetModel->__toString() : null;
}
if ($this->lstCustomField) {
$this->lstCustomField->RemoveAllItems();
if (!$this->blnEditMode) {
$this->lstCustomField->AddItem(QApplication::Translate('- Select One -'), null);
}
$objCustomFieldArray = CustomField::LoadAll();
if ($objCustomFieldArray) {
foreach ($objCustomFieldArray as $objCustomField) {
$objListItem = new QListItem($objCustomField->__toString(), $objCustomField->CustomFieldId);
if ($this->objAssetCustomFieldAssetModel->CustomField && $this->objAssetCustomFieldAssetModel->CustomField->CustomFieldId == $objCustomField->CustomFieldId) {
$objListItem->Selected = true;
}
$this->lstCustomField->AddItem($objListItem);
}
}
}
if ($this->lblCustomFieldId) {
$this->lblCustomFieldId->Text = $this->objAssetCustomFieldAssetModel->CustomField ? $this->objAssetCustomFieldAssetModel->CustomField->__toString() : null;
}
}
示例7: Refresh
/**
* Refresh this MetaControl with Data from the local EntityQtypeCustomField object.
* @param boolean $blnReload reload EntityQtypeCustomField from the database
* @return void
*/
public function Refresh($blnReload = false)
{
if ($blnReload) {
$this->objEntityQtypeCustomField->Reload();
}
if ($this->lblEntityQtypeCustomFieldId) {
if ($this->blnEditMode) {
$this->lblEntityQtypeCustomFieldId->Text = $this->objEntityQtypeCustomField->EntityQtypeCustomFieldId;
}
}
if ($this->lstEntityQtype) {
$this->lstEntityQtype->SelectedValue = $this->objEntityQtypeCustomField->EntityQtypeId;
}
if ($this->lblEntityQtypeId) {
$this->lblEntityQtypeId->Text = $this->objEntityQtypeCustomField->EntityQtypeId ? EntityQtype::$NameArray[$this->objEntityQtypeCustomField->EntityQtypeId] : null;
}
if ($this->lstCustomField) {
$this->lstCustomField->RemoveAllItems();
if (!$this->blnEditMode) {
$this->lstCustomField->AddItem(QApplication::Translate('- Select One -'), null);
}
$objCustomFieldArray = CustomField::LoadAll();
if ($objCustomFieldArray) {
foreach ($objCustomFieldArray as $objCustomField) {
$objListItem = new QListItem($objCustomField->__toString(), $objCustomField->CustomFieldId);
if ($this->objEntityQtypeCustomField->CustomField && $this->objEntityQtypeCustomField->CustomField->CustomFieldId == $objCustomField->CustomFieldId) {
$objListItem->Selected = true;
}
$this->lstCustomField->AddItem($objListItem);
}
}
}
if ($this->lblCustomFieldId) {
$this->lblCustomFieldId->Text = $this->objEntityQtypeCustomField->CustomField ? $this->objEntityQtypeCustomField->CustomField->__toString() : null;
}
}