本文整理汇总了PHP中Dataset::IsLookupField方法的典型用法代码示例。如果您正苦于以下问题:PHP Dataset::IsLookupField方法的具体用法?PHP Dataset::IsLookupField怎么用?PHP Dataset::IsLookupField使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Dataset
的用法示例。
在下文中一共展示了Dataset::IsLookupField方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: FormatDatasetFieldsTemplate
public static function FormatDatasetFieldsTemplate(Dataset $dataset, $template, IDelegate $processValue = null)
{
$result = $template;
foreach ($dataset->GetFields() as $field) {
if ($dataset->IsLookupField($field->GetNameInDataset())) {
$result = StringUtils::ReplaceVariableInTemplate($result, $field->GetAlias(), $processValue == null ? $dataset->GetFieldValueByName($field->GetAlias()) : $processValue->Call($dataset->GetFieldValueByName($field->GetAlias()), $field->GetAlias()));
} else {
$result = StringUtils::ReplaceVariableInTemplate($result, $field->GetName(), $processValue == null ? $dataset->GetFieldValueByName($field->GetNameInDataset()) : $processValue->Call($dataset->GetFieldValueByName($field->GetNameInDataset()), $field->GetNameInDataset()));
}
}
return $result;
}
示例2: GetActualKeys
protected function GetActualKeys()
{
$keys = array('Primary' => false, 'Foreign' => false);
if ($this->GetGrid()->GetShowKeyColumnsImagesInHeader()) {
if ($this->dataset->IsFieldPrimaryKey($this->fieldName)) {
$keys['Primary'] = true;
}
if ($this->dataset->IsLookupField($this->fieldName)) {
$keys['Foreign'] = true;
if ($this->dataset->IsLookupFieldNameByDisplayFieldName($this->fieldName)) {
if ($this->dataset->IsFieldPrimaryKey($this->dataset->IsLookupFieldNameByDisplayFieldName($this->fieldName))) {
$keys['Primary'] = true;
}
}
}
}
return $keys;
}
示例3: GetGridColumnClass
public function GetGridColumnClass()
{
$result = parent::GetGridColumnClass() ? parent::GetGridColumnClass() : parent::GetGridColumnClass();
if ($this->GetGrid()->GetShowKeyColumnsImagesInHeader()) {
if ($this->dataset->IsFieldPrimaryKey($this->fieldName)) {
StringUtils::AddStr($result, 'primary-key', ' ');
}
if ($this->dataset->IsLookupField($this->fieldName)) {
if ($this->dataset->IsLookupFieldNameByDisplayFieldName($this->fieldName)) {
if ($this->dataset->IsFieldPrimaryKey($this->dataset->IsLookupFieldNameByDisplayFieldName($this->fieldName))) {
StringUtils::AddStr($result, 'primary-key', ' ');
}
}
StringUtils::AddStr($result, 'foreign-key', ' ');
}
}
if ($this->ShowOrderingControl()) {
StringUtils::AddStr($result, 'sortable', ' ');
}
StringUtils::AddStr($result, $this->GetSortOrderColumnClass(), ' ');
return $result;
}