本文整理汇总了PHP中QQN::CustomFieldValue方法的典型用法代码示例。如果您正苦于以下问题:PHP QQN::CustomFieldValue方法的具体用法?PHP QQN::CustomFieldValue怎么用?PHP QQN::CustomFieldValue使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QQN
的用法示例。
在下文中一共展示了QQN::CustomFieldValue方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Form_Create
protected function Form_Create()
{
// Setup DataGrid Columns
$this->colEditLinkColumn = new QDataGridColumn(QApplication::Translate('Edit'), '<?= $_FORM->dtgCustomFieldValue_EditLinkColumn_Render($_ITEM) ?>');
$this->colEditLinkColumn->HtmlEntities = false;
$this->colCustomFieldValueId = new QDataGridColumn(QApplication::Translate('Custom Field Value Id'), '<?= $_ITEM->CustomFieldValueId; ?>', array('OrderByClause' => QQ::OrderBy(QQN::CustomFieldValue()->CustomFieldValueId), 'ReverseOrderByClause' => QQ::OrderBy(QQN::CustomFieldValue()->CustomFieldValueId, false)));
$this->colCustomFieldId = new QDataGridColumn(QApplication::Translate('Custom Field Id'), '<?= $_FORM->dtgCustomFieldValue_CustomField_Render($_ITEM); ?>');
$this->colShortDescription = new QDataGridColumn(QApplication::Translate('Short Description'), '<?= QString::Truncate($_ITEM->ShortDescription, 200); ?>', array('OrderByClause' => QQ::OrderBy(QQN::CustomFieldValue()->ShortDescription), 'ReverseOrderByClause' => QQ::OrderBy(QQN::CustomFieldValue()->ShortDescription, false)));
$this->colCreatedBy = new QDataGridColumn(QApplication::Translate('Created By'), '<?= $_FORM->dtgCustomFieldValue_CreatedByObject_Render($_ITEM); ?>');
$this->colCreationDate = new QDataGridColumn(QApplication::Translate('Creation Date'), '<?= $_FORM->dtgCustomFieldValue_CreationDate_Render($_ITEM); ?>', array('OrderByClause' => QQ::OrderBy(QQN::CustomFieldValue()->CreationDate), 'ReverseOrderByClause' => QQ::OrderBy(QQN::CustomFieldValue()->CreationDate, false)));
$this->colModifiedBy = new QDataGridColumn(QApplication::Translate('Modified By'), '<?= $_FORM->dtgCustomFieldValue_ModifiedByObject_Render($_ITEM); ?>');
$this->colModifiedDate = new QDataGridColumn(QApplication::Translate('Modified Date'), '<?= QString::Truncate($_ITEM->ModifiedDate, 200); ?>', array('OrderByClause' => QQ::OrderBy(QQN::CustomFieldValue()->ModifiedDate), 'ReverseOrderByClause' => QQ::OrderBy(QQN::CustomFieldValue()->ModifiedDate, false)));
// Setup DataGrid
$this->dtgCustomFieldValue = new QDataGrid($this);
$this->dtgCustomFieldValue->CellSpacing = 0;
$this->dtgCustomFieldValue->CellPadding = 4;
$this->dtgCustomFieldValue->BorderStyle = QBorderStyle::Solid;
$this->dtgCustomFieldValue->BorderWidth = 1;
$this->dtgCustomFieldValue->GridLines = QGridLines::Both;
// Datagrid Paginator
$this->dtgCustomFieldValue->Paginator = new QPaginator($this->dtgCustomFieldValue);
$this->dtgCustomFieldValue->ItemsPerPage = 10;
// Specify Whether or Not to Refresh using Ajax
$this->dtgCustomFieldValue->UseAjax = false;
// Specify the local databind method this datagrid will use
$this->dtgCustomFieldValue->SetDataBinder('dtgCustomFieldValue_Bind');
$this->dtgCustomFieldValue->AddColumn($this->colEditLinkColumn);
$this->dtgCustomFieldValue->AddColumn($this->colCustomFieldValueId);
$this->dtgCustomFieldValue->AddColumn($this->colCustomFieldId);
$this->dtgCustomFieldValue->AddColumn($this->colShortDescription);
$this->dtgCustomFieldValue->AddColumn($this->colCreatedBy);
$this->dtgCustomFieldValue->AddColumn($this->colCreationDate);
$this->dtgCustomFieldValue->AddColumn($this->colModifiedBy);
$this->dtgCustomFieldValue->AddColumn($this->colModifiedDate);
}
示例2: LoadByCustomFieldShortDescription
public function LoadByCustomFieldShortDescription($intCustomFieldId, $strShortDescription)
{
// Call CustomFieldValue::QueryArray to perform the LoadByCustFieldShortDescription query
try {
return CustomFieldValue::QuerySingle(QQ::AndCondition(QQ::Equal(QQN::CustomFieldValue()->CustomFieldId, $intCustomFieldId), QQ::Equal(QQN::CustomFieldValue()->ShortDescription, $strShortDescription)));
} catch (QCallerException $objExc) {
$objExc->IncrementOffset();
throw $objExc;
}
}
示例3: __construct
public function __construct($objParentObject, $strSetEditPanelMethod, $strCloseEditPanelMethod, $strControlId = null)
{
// Call the Parent
try {
parent::__construct($objParentObject, $strControlId);
} catch (QCallerException $objExc) {
$objExc->IncrementOffset();
throw $objExc;
}
// Record Method Callbacks
$this->strSetEditPanelMethod = $strSetEditPanelMethod;
$this->strCloseEditPanelMethod = $strCloseEditPanelMethod;
// Setup DataGrid Columns
$this->colEditLinkColumn = new QDataGridColumn(QApplication::Translate('Edit'), '<?= $_CONTROL->ParentControl->dtgCustomFieldValue_EditLinkColumn_Render($_ITEM) ?>');
$this->colEditLinkColumn->HtmlEntities = false;
$this->colCustomFieldValueId = new QDataGridColumn(QApplication::Translate('Custom Field Value Id'), '<?= $_ITEM->CustomFieldValueId; ?>', array('OrderByClause' => QQ::OrderBy(QQN::CustomFieldValue()->CustomFieldValueId), 'ReverseOrderByClause' => QQ::OrderBy(QQN::CustomFieldValue()->CustomFieldValueId, false)));
$this->colCustomFieldId = new QDataGridColumn(QApplication::Translate('Custom Field Id'), '<?= $_CONTROL->ParentControl->dtgCustomFieldValue_CustomField_Render($_ITEM); ?>');
$this->colShortDescription = new QDataGridColumn(QApplication::Translate('Short Description'), '<?= QString::Truncate($_ITEM->ShortDescription, 200); ?>', array('OrderByClause' => QQ::OrderBy(QQN::CustomFieldValue()->ShortDescription), 'ReverseOrderByClause' => QQ::OrderBy(QQN::CustomFieldValue()->ShortDescription, false)));
$this->colCreatedBy = new QDataGridColumn(QApplication::Translate('Created By'), '<?= $_CONTROL->ParentControl->dtgCustomFieldValue_CreatedByObject_Render($_ITEM); ?>');
$this->colCreationDate = new QDataGridColumn(QApplication::Translate('Creation Date'), '<?= $_CONTROL->ParentControl->dtgCustomFieldValue_CreationDate_Render($_ITEM); ?>', array('OrderByClause' => QQ::OrderBy(QQN::CustomFieldValue()->CreationDate), 'ReverseOrderByClause' => QQ::OrderBy(QQN::CustomFieldValue()->CreationDate, false)));
$this->colModifiedBy = new QDataGridColumn(QApplication::Translate('Modified By'), '<?= $_CONTROL->ParentControl->dtgCustomFieldValue_ModifiedByObject_Render($_ITEM); ?>');
$this->colModifiedDate = new QDataGridColumn(QApplication::Translate('Modified Date'), '<?= QString::Truncate($_ITEM->ModifiedDate, 200); ?>', array('OrderByClause' => QQ::OrderBy(QQN::CustomFieldValue()->ModifiedDate), 'ReverseOrderByClause' => QQ::OrderBy(QQN::CustomFieldValue()->ModifiedDate, false)));
// Setup DataGrid
$this->dtgCustomFieldValue = new QDataGrid($this);
$this->dtgCustomFieldValue->CellSpacing = 0;
$this->dtgCustomFieldValue->CellPadding = 4;
$this->dtgCustomFieldValue->BorderStyle = QBorderStyle::Solid;
$this->dtgCustomFieldValue->BorderWidth = 1;
$this->dtgCustomFieldValue->GridLines = QGridLines::Both;
// Datagrid Paginator
$this->dtgCustomFieldValue->Paginator = new QPaginator($this->dtgCustomFieldValue);
$this->dtgCustomFieldValue->ItemsPerPage = 10;
// Specify Whether or Not to Refresh using Ajax
$this->dtgCustomFieldValue->UseAjax = true;
// Specify the local databind method this datagrid will use
$this->dtgCustomFieldValue->SetDataBinder('dtgCustomFieldValue_Bind', $this);
$this->dtgCustomFieldValue->AddColumn($this->colEditLinkColumn);
$this->dtgCustomFieldValue->AddColumn($this->colCustomFieldValueId);
$this->dtgCustomFieldValue->AddColumn($this->colCustomFieldId);
$this->dtgCustomFieldValue->AddColumn($this->colShortDescription);
$this->dtgCustomFieldValue->AddColumn($this->colCreatedBy);
$this->dtgCustomFieldValue->AddColumn($this->colCreationDate);
$this->dtgCustomFieldValue->AddColumn($this->colModifiedBy);
$this->dtgCustomFieldValue->AddColumn($this->colModifiedDate);
// Setup the Create New button
$this->btnCreateNew = new QButton($this);
$this->btnCreateNew->Text = QApplication::Translate('Create a New') . ' ' . QApplication::Translate('CustomFieldValue');
$this->btnCreateNew->AddAction(new QClickEvent(), new QAjaxControlAction($this, 'btnCreateNew_Click'));
}
示例4: ResolveContentItem
/**
* Used internally by the Meta-based Add Column tools.
*
* Given a QQNode or a Text String, this will return a CustomFieldValue-based QQNode.
* It will also verify that it is a proper CustomFieldValue-based QQNode, and will throw an exception otherwise.
*
* @param mixed $mixContent
* @return QQNode
*/
protected function ResolveContentItem($mixContent)
{
if ($mixContent instanceof QQNode) {
if (!$mixContent->_ParentNode) {
throw new QCallerException('Content QQNode cannot be a Top Level Node');
}
if ($mixContent->_RootTableName == 'custom_field_value') {
if ($mixContent instanceof QQReverseReferenceNode && !$mixContent->_PropertyName) {
throw new QCallerException('Content QQNode cannot go through any "To Many" association nodes.');
}
$objCurrentNode = $mixContent;
while ($objCurrentNode = $objCurrentNode->_ParentNode) {
if (!$objCurrentNode instanceof QQNode) {
throw new QCallerException('Content QQNode cannot go through any "To Many" association nodes.');
}
if ($objCurrentNode instanceof QQReverseReferenceNode && !$objCurrentNode->_PropertyName) {
throw new QCallerException('Content QQNode cannot go through any "To Many" association nodes.');
}
}
return $mixContent;
} else {
throw new QCallerException('Content QQNode has a root table of "' . $mixContent->_RootTableName . '". Must be a root of "custom_field_value".');
}
} else {
if (is_string($mixContent)) {
switch ($mixContent) {
case 'CustomFieldValueId':
return QQN::CustomFieldValue()->CustomFieldValueId;
case 'CustomFieldId':
return QQN::CustomFieldValue()->CustomFieldId;
case 'CustomField':
return QQN::CustomFieldValue()->CustomField;
case 'ShortDescription':
return QQN::CustomFieldValue()->ShortDescription;
case 'CreatedBy':
return QQN::CustomFieldValue()->CreatedBy;
case 'CreatedByObject':
return QQN::CustomFieldValue()->CreatedByObject;
case 'CreationDate':
return QQN::CustomFieldValue()->CreationDate;
case 'ModifiedBy':
return QQN::CustomFieldValue()->ModifiedBy;
case 'ModifiedByObject':
return QQN::CustomFieldValue()->ModifiedByObject;
case 'ModifiedDate':
return QQN::CustomFieldValue()->ModifiedDate;
default:
throw new QCallerException('Simple Property not found in CustomFieldValueDataGrid content: ' . $mixContent);
}
} else {
if ($mixContent instanceof QQAssociationNode) {
throw new QCallerException('Content QQNode cannot go through any "To Many" association nodes.');
} else {
throw new QCallerException('Invalid Content type');
}
}
}
}
示例5: lstTramorField_Change
protected function lstTramorField_Change($strFormId, $strControlId, $strParameter)
{
$objControl = QForm::GetControl($strControlId);
if ($objControl->SelectedValue != null) {
$search = strtolower($objControl->SelectedValue);
if ($this->in_array_nocase($search, $this->arrTracmorField)) {
$objControl->Warning = "This value has already been selected.";
$objControl->SelectedIndex = 0;
unset($this->arrTracmorField[substr($objControl->Name, 3)]);
} else {
$objControl->Warning = "";
$txtDefault = $this->txtMapDefaultValueArray[substr($objControl->Name, 3)];
$lstDefault = $this->lstMapDefaultValueArray[substr($objControl->Name, 3)];
$dtpDefault = $this->dtpDateArray[substr($objControl->Name, 3)];
$this->arrTracmorField[substr($objControl->Name, 3)] = $search;
if (substr($objControl->SelectedValue, 0, 8) == "contact_") {
$objCustomField = CustomField::LoadByCustomFieldId(substr($objControl->SelectedValue, 8));
// type = Text or TextBox
if ($objCustomField->CustomFieldQtypeId != 2) {
$txtDefault->Required = $objCustomField->RequiredFlag;
// If it is a required text field, then assign the default text for a new entity only
if ($objCustomField->RequiredFlag && $objCustomField->DefaultCustomFieldValueId) {
$txtDefault->Text = $objCustomField->DefaultCustomFieldValue->ShortDescription;
} else {
$txtDefault->Text = "";
}
$txtDefault->Display = true;
$lstDefault->Display = false;
$dtpDefault->Display = false;
} else {
$lstDefault->RemoveAllItems();
$lstDefault->AddItem('- Select One -', null);
$lstDefault->Required = true;
$objCustomFieldValueArray = CustomFieldValue::LoadArrayByCustomFieldId(substr($objControl->SelectedValue, 8), QQ::Clause(QQ::OrderBy(QQN::CustomFieldValue()->ShortDescription)));
if ($objCustomFieldValueArray) {
foreach ($objCustomFieldValueArray as $objCustomFieldValue) {
$objListItem = new QListItem($objCustomFieldValue->__toString(), $objCustomFieldValue->CustomFieldValueId);
// If it is a required field, then select the value on new entities by default
if ($objCustomField->RequiredFlag && $objCustomField->DefaultCustomFieldValueId && $objCustomField->DefaultCustomFieldValueId == $objCustomFieldValue->CustomFieldValueId) {
$objListItem->Selected = true;
}
$lstDefault->AddItem($objListItem);
}
}
$txtDefault->Display = false;
$lstDefault->Display = true;
$dtpDefault->Display = false;
}
}
$txtDefault->Display = true;
$lstDefault->Display = false;
$dtpDefault->Display = false;
}
} else {
unset($this->arrTracmorField[substr($objControl->Name, 3)]);
}
}
示例6: dtgValue_Create
protected function dtgValue_Create()
{
$this->dtgValue = new QDataGrid($this);
$this->dtgValue->CellPadding = 5;
$this->dtgValue->CellSpacing = 0;
$this->dtgValue->CssClass = "datagrid";
// Enable AJAX - this won't work while using the DB profiler
$this->dtgValue->UseAjax = true;
// Enable Pagination, and set to 20 items per page
$objPaginator = new QPaginator($this->dtgValue);
$this->dtgValue->Paginator = $objPaginator;
$this->dtgValue->ItemsPerPage = 20;
$this->dtgValue->AddColumn(new QDataGridColumn('Option', '<?= $_ITEM->__toString() ?>', array('OrderByClause' => QQ::OrderBy(QQN::CustomFieldValue()->ShortDescription), 'ReverseOrderByClause' => QQ::OrderBy(QQN::CustomFieldValue()->ShortDescription, false), 'CssClass' => "dtg_column")));
$this->dtgValue->AddColumn(new QDataGridColumn('Created By', '<?= $_ITEM->CreatedByObject->__toStringFullName() ?>', array('OrderByClause' => QQ::OrderBy(QQN::CustomFieldValue()->CreatedByObject->LastName, false, QQN::CustomFieldValue()->CreatedByObject->FirstName, false), 'ReverseOrderByClause' => QQ::OrderBy(QQN::CustomFieldValue()->CreatedByObject->LastName, QQN::CustomFieldValue()->CreatedByObject->FirstName), 'CssClass' => "dtg_column")));
$this->dtgValue->AddColumn(new QDataGridColumn('Creation Date', '<?= $_ITEM->CreationDate->__toString() ?>', array('OrderByClause' => QQ::OrderBy(QQN::CustomFieldValue()->CreationDate), 'ReverseOrderByClause' => QQ::OrderBy(QQN::CustomFieldValue()->CreationDate, false), 'CssClass' => "dtg_column")));
$this->dtgValue->AddColumn(new QDataGridColumn('Action', '<?= $_FORM->RemoveColumn_Render($_ITEM) ?>', array('CssClass' => "dtg_column", 'HtmlEntities' => false)));
$objStyle = $this->dtgValue->RowStyle;
$objStyle->ForeColor = '#000000';
$objStyle->BackColor = '#FFFFFF';
$objStyle->FontSize = 12;
$objStyle = $this->dtgValue->AlternateRowStyle;
$objStyle->BackColor = '#EFEFEF';
$objStyle = $this->dtgValue->HeaderRowStyle;
$objStyle->ForeColor = '#000000';
$objStyle->BackColor = '#EFEFEF';
$objStyle->CssClass = 'dtg_header';
}
示例7: CountByCustomFieldId
/**
* Count CustomFieldValues
* by CustomFieldId Index(es)
* @param integer $intCustomFieldId
* @return int
*/
public static function CountByCustomFieldId($intCustomFieldId)
{
// Call CustomFieldValue::QueryCount to perform the CountByCustomFieldId query
return CustomFieldValue::QueryCount(QQ::Equal(QQN::CustomFieldValue()->CustomFieldId, $intCustomFieldId));
}
示例8: CustomFieldControlsCreate
/**
* Creates the custom field controls while looping through an array of CustomField objects
*
* @param array $objCustomFieldArray of CustomField objects
* @param bool $blnEditMode if creating a new entity or editing an existing one
* @param QForm $objForm e.g., AssetEditForm
* @return array $arrCustomFields of labels and inputs for all custom field controls
*/
public static function CustomFieldControlsCreate($objCustomFieldArray, $blnEditMode, $objForm, $blnLabels = true, $blnInputs = true, $blnSearch = false)
{
$arrCustomFields = array();
for ($i = 0; $i < count($objCustomFieldArray); $i++) {
if ($blnLabels) {
// Create Label for each custom field
if (CustomFieldQtype::ToString($objCustomFieldArray[$i]->CustomFieldQtypeId) == 'text area') {
$arrCustomFields[$i]['lbl'] = new QPanel($objForm);
if ($blnEditMode) {
$arrCustomFields[$i]['lbl']->CssClass = 'scrollBox';
}
} else {
$arrCustomFields[$i]['lbl'] = new QLabel($objForm);
}
$arrCustomFields[$i]['lbl']->Name = $objCustomFieldArray[$i]->ShortDescription;
if ($blnEditMode && $objCustomFieldArray[$i]->CustomFieldSelection && $objCustomFieldArray[$i]->CustomFieldSelection->CustomFieldValue && $objCustomFieldArray[$i]->CustomFieldSelection->CustomFieldValue->ShortDescription != null) {
$arrCustomFields[$i]['lbl']->Text = nl2br($objCustomFieldArray[$i]->CustomFieldSelection->CustomFieldValue->ShortDescription);
} elseif ($blnEditMode && (!$objCustomFieldArray[$i]->CustomFieldSelection || empty($objCustomFieldArray[$i]->CustomFieldSelection->CustomFieldValue->ShortDescription) && $objCustomFieldArray[$i]->CustomFieldQtypeId == 2)) {
$arrCustomFields[$i]['lbl']->Text = 'None';
}
}
if ($blnInputs) {
// Create input for each custom field (either text or list)
// Create text inputs
if (CustomFieldQtype::ToString($objCustomFieldArray[$i]->CustomFieldQtypeId) == 'text' || CustomFieldQtype::ToString($objCustomFieldArray[$i]->CustomFieldQtypeId) == 'text area') {
$arrCustomFields[$i]['input'] = new QTextBox($objForm, $blnSearch ? null : "cf" . $objCustomFieldArray[$i]->CustomFieldId);
$arrCustomFields[$i]['input']->Name = $objCustomFieldArray[$i]->ShortDescription;
$arrCustomFields[$i]['input']->Required = false;
$arrCustomFields[$i]['input']->CausesValidation = true;
if (CustomFieldQtype::ToString($objCustomFieldArray[$i]->CustomFieldQtypeId) == 'text area' && !$blnSearch) {
$arrCustomFields[$i]['input']->TextMode = QTextMode::MultiLine;
}
// This is so that the browser doesn't form.submit() when the user presses the enter key on a text input
if (!$blnSearch && CustomFieldQtype::ToString($objCustomFieldArray[$i]->CustomFieldQtypeId) != 'text area') {
if ($objForm instanceof QControl) {
$arrCustomFields[$i]['input']->AddAction(new QEnterKeyEvent(), new QAjaxControlAction($objForm, 'btnSave_Click'));
} else {
$arrCustomFields[$i]['input']->AddAction(new QEnterKeyEvent(), new QAjaxAction('btnSave_Click'));
}
$arrCustomFields[$i]['input']->AddAction(new QEnterKeyEvent(), new QTerminateAction());
} elseif ($blnSearch) {
if ($objForm instanceof QControl) {
$arrCustomFields[$i]['input']->AddAction(new QEnterKeyEvent(), new QServerControlAction($objForm, 'btnSearch_Click'));
} else {
$arrCustomFields[$i]['input']->AddAction(new QEnterKeyEvent(), new QServerAction('btnSearch_Click'));
}
$arrCustomFields[$i]['input']->AddAction(new QEnterKeyEvent(), new QTerminateAction());
}
if ($blnEditMode && $objCustomFieldArray[$i]->CustomFieldSelection) {
$arrCustomFields[$i]['input']->Text = $objCustomFieldArray[$i]->CustomFieldSelection->CustomFieldValue->ShortDescription;
} elseif (!$blnEditMode && !$blnSearch && $objCustomFieldArray[$i]->RequiredFlag && $objCustomFieldArray[$i]->DefaultCustomFieldValueId) {
$arrCustomFields[$i]['input']->Text = $objCustomFieldArray[$i]->DefaultCustomFieldValue->ShortDescription;
}
} elseif (CustomFieldQtype::ToString($objCustomFieldArray[$i]->CustomFieldQtypeId) == 'select') {
$arrCustomFields[$i]['input'] = new QListBox($objForm, $blnSearch ? null : "cf" . $objCustomFieldArray[$i]->CustomFieldId);
$arrCustomFields[$i]['input']->Name = $objCustomFieldArray[$i]->ShortDescription;
$arrCustomFields[$i]['input']->Required = false;
$objCustomFieldValueArray = CustomFieldValue::LoadArrayByCustomFieldId($objCustomFieldArray[$i]->CustomFieldId, QQ::Clause(QQ::OrderBy(QQN::CustomFieldValue()->ShortDescription)));
if ($objCustomFieldValueArray) {
// The - Select One - item cannot be removed without also updating CustomField::UpdateControls()
$arrCustomFields[$i]['input']->AddItem('- Select One -', null);
foreach ($objCustomFieldValueArray as $objCustomFieldValue) {
$objListItem = new QListItem($objCustomFieldValue->__toString(), $objCustomFieldValue->CustomFieldValueId);
if ($blnEditMode && $objCustomFieldArray[$i]->CustomFieldSelection && $objCustomFieldArray[$i]->CustomFieldSelection->CustomFieldValueId == $objCustomFieldValue->CustomFieldValueId) {
$objListItem->Selected = true;
} elseif (!$blnEditMode && !$blnSearch && $objCustomFieldArray[$i]->RequiredFlag && $objCustomFieldArray[$i]->DefaultCustomFieldValueId && $objCustomFieldArray[$i]->DefaultCustomFieldValueId == $objCustomFieldValue->CustomFieldValueId) {
$objListItem->Selected = true;
}
$arrCustomFields[$i]['input']->AddItem($objListItem);
}
}
}
if ($objCustomFieldArray[$i]->RequiredFlag && !$blnSearch) {
$arrCustomFields[$i]['input']->Required = true;
}
}
// Set reference IDs for btnSave_Click() for each custom field
$arrCustomFields[$i]['CustomFieldId'] = $objCustomFieldArray[$i]->CustomFieldId;
if ($blnEditMode && $objCustomFieldArray[$i]->CustomFieldSelection) {
$arrCustomFields[$i]['CustomFieldSelectionId'] = $objCustomFieldArray[$i]->CustomFieldSelection->CustomFieldSelectionId;
}
//Set an RoleEntityQtypeCustomFieldAuthorization object of View Authorization and for Edit Authorization for each custom field
$arrCustomFields[$i]['ViewAuth'] = $objCustomFieldArray[$i]->objRoleAuthView;
$arrCustomFields[$i]['EditAuth'] = $objCustomFieldArray[$i]->objRoleAuthEdit;
// Set all reference booleans for display logic
//set if the custom field must show or not
if ($objCustomFieldArray[$i]->objRoleAuthView && $objCustomFieldArray[$i]->objRoleAuthView->AuthorizedFlag || !$objCustomFieldArray[$i]->objRoleAuthView) {
$arrCustomFields[$i]['blnView'] = true;
} else {
$arrCustomFields[$i]['blnView'] = false;
}
// set if the custom field is editable or not
//.........这里部分代码省略.........