当前位置: 首页>>代码示例>>PHP>>正文


PHP ProjectSettings::getLWLinkField方法代码示例

本文整理汇总了PHP中ProjectSettings::getLWLinkField方法的典型用法代码示例。如果您正苦于以下问题:PHP ProjectSettings::getLWLinkField方法的具体用法?PHP ProjectSettings::getLWLinkField怎么用?PHP ProjectSettings::getLWLinkField使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ProjectSettings的用法示例。


在下文中一共展示了ProjectSettings::getLWLinkField方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: getControl

	function getControl($field, $id = "")
	{
		// if conrol does not created previously  
		if(!array_key_exists($field, $this->controls))
		{
			include_once(getabspath("classes/controls/Control.php"));
			$userControl = false;
			$cTypes = new ControlTypes();
			$editFormat = $this->pSetEdit->getEditFormat($field);
			if($editFormat == EDIT_FORMAT_TEXT_FIELD && IsDateFieldType($this->pSetEdit->getFieldType($field)))
				$editFormat = EDIT_FORMAT_DATE;
			if($this->pageType == PAGE_SEARCH || $this->pageType == PAGE_LIST)
			{
				// Text field may be Lookup field on some page
				if($editFormat == EDIT_FORMAT_TEXT_FIELD 
					&& $this->pSetEdit->getPageTypeByFieldEditFormat($field, EDIT_FORMAT_LOOKUP_WIZARD) != "")
				{
					$localPSet = new ProjectSettings($this->pSetEdit->_table, 
						$this->pSetEdit->getPageTypeByFieldEditFormat($field, EDIT_FORMAT_LOOKUP_WIZARD));
					if($localPSet->getLWLinkField($field) != $localPSet->getLWDisplayField($field))
						$className = "LookupTextField";
					else 
						$className = $cTypes->forSearch[$editFormat];
				}
				else
					$className = $cTypes->forSearch[$editFormat];
			}
			else
				$className = $cTypes->forEdit[$editFormat];
				
			if(!$className)
			{
				if($editFormat != "")
				{
					$className = "Edit".$editFormat;
					$userControl = true;
					include_once(getabspath("classes/controls/UserControl.php"));
					if(!is_null($this->pageObject))
						$this->pageObject->AddJSFile("include/runnerJS/controls/".$className.".js", "include/runnerJS/Control.js");
				}
				else
					$className = $cTypes->forEdit[EDIT_FORMAT_TEXT_FIELD];
			}
			else if($className == $cTypes->forEdit[EDIT_FORMAT_FILE] && $this->pSetEdit->isCompatibilityMode($field))
				$className = "FileFieldSingle";
			
			$this->controls[$field] = createControlClass($className, $field, $this->pageObject != null ? $this->pageObject : $this, $id);
			$this->controls[$field]->container = $this;
			if($userControl)
			{
				$this->controls[$field]->format = $className;
				$this->controls[$field]->initUserControl();
			}
		}
		if($id !== "")
			$this->controls[$field]->setID($id);
		return $this->controls[$field];
	}
开发者ID:helbertfurbino,项目名称:sgmofinanceiro,代码行数:58,代码来源:EditControlsContainer.php

示例2: getControl

	/**
	 * Create new control (if needed) for view field, and return it
	 * @param {string} field name
	 * @param {string} predefined view format 
	 */
	public function getControl($field, $format = null)
	{
		// if conrol does not created previously  
		if(!array_key_exists($field, $this->viewControls))
		{
			include_once(getabspath("classes/controls/ViewControl.php"));
			$vcTypes = new ViewControlTypes();
			$editFormat = $this->pSet->getEditFormat($field);
			if(is_null($format)){
				$localPSet = $this->pSet;
				$lookupPageType = "";
				if(!$this->isLocal)
				{
					$lookupPageType = $this->pSet->getPageTypeByFieldEditFormat($field, EDIT_FORMAT_LOOKUP_WIZARD);
					if($lookupPageType != "")
						$localPSet = new ProjectSettings($this->pSet->_table, $lookupPageType);
				}
				if(!$this->isLocal
					&& ($editFormat == EDIT_FORMAT_LOOKUP_WIZARD || $lookupPageType != "")  
					&& ($localPSet->getLookupType($field) == LT_LOOKUPTABLE || $localPSet->getLookupType($field) == LT_QUERY) 
					&& $localPSet->getLWLinkField($field) != $localPSet->getLWDisplayField($field))
				{
					$viewFormat = FORMAT_LOOKUP_WIZARD;
				}else
					$viewFormat = $this->pSet->getViewFormat($field);
			}else 
				$viewFormat = $format;
				
			if($viewFormat == FORMAT_FILE_IMAGE && $this->pSet->isCompatibilityMode($field))
				$viewFormat = FORMAT_FILE_IMAGE_OLD;
				
			$className = $vcTypes->viewTypes[$viewFormat];
			if($className == "" && $viewFormat != "")
			{
				$className = "View".$viewFormat;
				$userControl = true;
				include_once(getabspath("classes/controls/ViewUserControl.php"));
			}
		
			if($className != "")
			{
				$this->viewControls[$field] = createViewControlClass($className, $field, $this, $this->pageObject);
			}
			else
				$this->viewControls[$field] = new ViewControl($field, $this, $this->pageObject);
			
			if($userControl)
			{
				$this->viewControls[$field]->viewFormat = $className;
				$this->viewControls[$field]->init();
				$this->viewControls[$field]->initUserControl();
			}
		}
		return $this->viewControls[$field];
	}
开发者ID:helbertfurbino,项目名称:sgmofinanceiro,代码行数:60,代码来源:ViewControlsContainer.php

示例3: buildLookupSQL

function buildLookupSQL($pageType, $field, $table, $parentVal, $childVal = "", $doCategoryFilter = true, $doValueFilter = false, $addCategoryField = false, $doWhereFilter = true, $oneRecordMode = false, $doValueFilterByLinkField = false)
{
    global $strTableName;
    if (!strlen($table)) {
        $table = $strTableName;
    }
    $pSet = new ProjectSettings($table, $pageType);
    //	read settings
    $nLookupType = $pSet->getLookupType($field);
    if ($nLookupType != LT_LOOKUPTABLE && $nLookupType != LT_QUERY) {
        return "";
    }
    $lookupTable = $pSet->getLookupTable($field);
    $displayFieldName = $pSet->getDisplayField($field);
    $linkFieldName = $pSet->getLinkField($field);
    $linkAndDisplaySame = $displayFieldName == $linkFieldName;
    $bUnique = $pSet->isLookupUnique($field);
    $strLookupWhere = GetLWWhere($field, $pageType, $table);
    $strOrderBy = $pSet->getLookupOrderBy($field);
    if (strlen($strOrderBy)) {
        $strOrderBy = GetFullFieldName($strOrderBy, $lookupTable);
        if ($pSet->isLookupDesc($field)) {
            $strOrderBy .= ' DESC';
        }
    }
    $bDesc = $pSet->isLookupDesc($field);
    $strCategoryFilter = $pSet->getCategoryFilter($field);
    if ($nLookupType == LT_QUERY) {
        $lookupPSet = new ProjectSettings($lookupTable, $pageType);
        $cipherer = new RunnerCipherer($lookupTable, $lookupPSet);
    } else {
        $cipherer = new RunnerCipherer($table, $pSet);
    }
    if ($doCategoryFilter) {
        if ($nLookupType == LT_QUERY) {
            $parentVal = $cipherer->MakeDBValue($strCategoryFilter, $parentVal, "", $lookupTable, true);
        } else {
            $parentVal = make_db_value($pSet->getCategoryControl($field), $parentVal, '', '', $table);
        }
    }
    if ($doValueFilter) {
        if ($pageType != PAGE_SEARCH || $doValueFilterByLinkField) {
            if ($nLookupType == LT_QUERY) {
                $childWhereField = $pSet->getLWLinkField($field, false);
            } else {
                $childWhereField = $pSet->getLWLinkField($field, true);
            }
        } else {
            if ($nLookupType == LT_QUERY) {
                $childWhereField = $pSet->getLWDisplayField($field, false);
            } else {
                $childWhereField = $pSet->getLWDisplayField($field, true);
            }
        }
        if ($nLookupType == LT_QUERY) {
            $childVal = $cipherer->MakeDBValue($childWhereField, $childVal, "", $lookupTable, true);
        } else {
            if ($linkAndDisplaySame) {
                $childVal = make_db_value($field, $childVal, '', '', $table);
            } else {
                $childVal = add_db_quotes($field, $childVal, $table, 200);
            }
        }
    }
    //	build Where clause
    $categoryWhere = "";
    $childWhere = "";
    if ($pSet->useCategory($field) && $doCategoryFilter) {
        $condition = "=" . $parentVal;
        if ($parentVal === "null") {
            $condition = " is null";
        }
        if ($nLookupType == LT_QUERY) {
            $categoryWhere = $cipherer->GetFieldName(AddFieldWrappers($strCategoryFilter), $strCategoryFilter) . $condition;
        } else {
            $categoryWhere = AddFieldWrappers($strCategoryFilter) . $condition;
        }
    }
    if ($doValueFilter) {
        $condition = "=" . $childVal;
        if ($childVal === "null") {
            $condition = " is null";
        }
        if ($nLookupType == LT_QUERY) {
            if ($pageType != PAGE_SEARCH || $pSet->lookupControlType($field) == LCT_LIST || $doValueFilterByLinkField) {
                $childWhere = GetFullFieldName($pSet->getLinkField($field), $lookupTable, false) . $condition;
            } else {
                if (!$pSet->getCustomDisplay($field)) {
                    $childWhere = $cipherer->GetFieldName($lookupPSet->getFullNameField($displayFieldName), $field) . $condition;
                } else {
                    $childWhere = $pSet->getDisplayField($field) . $condition;
                }
            }
        } else {
            if ($pageType != PAGE_SEARCH || $doValueFilterByLinkField) {
                $childWhere = $pSet->getLWLinkField($field, true) . $condition;
            } else {
                $childWhere = $pSet->getLWDisplayField($field, true) . $condition;
            }
        }
//.........这里部分代码省略.........
开发者ID:aagusti,项目名称:padl-tng,代码行数:101,代码来源:commonfunctions.php

示例4: comlete_report_session_default_values

function comlete_report_session_default_values($isedit="") {
	$root=&$_SESSION["webreports"];
	$table = $root['tables'][0];
    $arr_fields = WRGetNBFieldsList($table);
    $arr_fields_all = WRGetFieldsList($table);

 $gfield=$arr_fields[0];
	if(is_wr_db())
		$gfield=$table.".".$arr_fields[0];
	$garrfield = array(
			"name" => $gfield,
            "int_type" => "0",
            "ss" => "true",
            "group_order" => "1",
            "color1" => "FF0000",
            "color2" => "CC0000"
        );
    $garrSummary = array();
	$garrSummary["name"] = "Summary";
	$garrSummary["crosstable"] = "false";
    $garrSummary["sps"] = "true";
    $garrSummary["sds"] = "true";
    $garrSummary["sgs"] = "true";
	$garrSummary["sum_x"] = "true";
    $garrSummary["sum_y"] = "true";
    $garrSummary["sum_total"] = "true";
	
	$root['group_fields'] = array($garrfield,$garrSummary);

    $root['totals'] = array();
	$pSet = new ProjectSettings($table);
    foreach ($arr_fields_all as $fld) {
        $root['totals'][GoodFieldName($table.".".$fld)] = array();
            $root['totals'][GoodFieldName($table.".".$fld)]["name"] = $fld;
            $root['totals'][GoodFieldName($table.".".$fld)]["table"] = $table;
			$root['totals'][GoodFieldName($table.".".$fld)]["label"] = $pSet->label($fld);
            $root['totals'][GoodFieldName($table.".".$fld)]["show"] = "true";
            $root['totals'][GoodFieldName($table.".".$fld)]["min"] = "false";
            $root['totals'][GoodFieldName($table.".".$fld)]["max"] = "false";
            $root['totals'][GoodFieldName($table.".".$fld)]["sum"] = "false";
            $root['totals'][GoodFieldName($table.".".$fld)]["avg"] = "false";
			$root['totals'][GoodFieldName($table.".".$fld)]["curr"] = "false";
            $root['totals'][GoodFieldName($table.".".$fld)]["search"] = "";
            $root['totals'][GoodFieldName($table.".".$fld)]["view_format"] = GetGenericViewFormat($table, $fld);
            $root['totals'][GoodFieldName($table.".".$fld)]["edit_format"] = GetGenericEditFormat($table, $fld);
            $root['totals'][GoodFieldName($table.".".$fld)]["display_field"] = $pSet->getLWDisplayField($fld);
            $root['totals'][GoodFieldName($table.".".$fld)]["linkfield"] = $pSet->getLWLinkField($fld);
            $root['totals'][GoodFieldName($table.".".$fld)]["show_thumbnail"] = $pSet->showThumbnail($fld);
            $root['totals'][GoodFieldName($table.".".$fld)]["need_encode"] = $pSet->NeedEncode($fld);
            $root['totals'][GoodFieldName($table.".".$fld)]["thumbnail"] = $pSet->getStrThumbnail($fld);
            $root['totals'][GoodFieldName($table.".".$fld)]["listformatobj_imgwidth"] = $pSet->getImageWidth($fld);
            $root['totals'][GoodFieldName($table.".".$fld)]["listformatobj_imgheight"] = $pSet->getImageHeight($fld);
            $root['totals'][GoodFieldName($table.".".$fld)]["hlprefix"] = $pSet->getLinkPrefix($fld);
            $root['totals'][GoodFieldName($table.".".$fld)]["listformatobj_filename"] = $pSet->getFilenameField($fld);
            $root['totals'][GoodFieldName($table.".".$fld)]["lookupobj_lookuptype"] = $pSet->getLookupType($fld);
            $root['totals'][GoodFieldName($table.".".$fld)]["editformatobj_lookupobj_customdispaly"] = $pSet->getLWDisplayField($fld);
            $root['totals'][GoodFieldName($table.".".$fld)]["editformatobj_lookupobj_table"] = $pSet->getLookupTable($fld);
            $root['totals'][GoodFieldName($table.".".$fld)]["editformatobj_lookupobj_where"] = GetLWWhere($fld, PAGE_REPORT);
    }

    $root['sort_fields'] = array(
        array(
			"name" => $gfield,
            "desc" => "false"
        )
    );

	if(!$isedit)
	{
	    $root['miscellaneous'] = array(
        "type" => "stepped",
        "print_friendly" => "true",
        "lines_num" => "30"
		);
		
		$root['settings'] = array(
			"name" => GoodFieldName($root['tables'][0]).'_'.CheckLastID('report'),
			"title" => $root['tables'][0].' Report '.CheckLastID('report'),
			"status" => "private"
		);
		$_SESSION["webobject"]["name"]= GoodFieldName($root['tables'][0]).'_'.CheckLastID('report');
		$root['owner'] = $_SESSION["UserID"];
		$_SESSION['webreports']['tmp_active'] = "x";
	}
	$root['table_name'] = $root['tables'][0];
	$root['short_table_name'] = GetTableURL($root['tables'][0]);
}
开发者ID:helbertfurbino,项目名称:sgmofinanceiro,代码行数:87,代码来源:save-state.php

示例5: update_report_totals

function update_report_totals()
{
	$root=&$_SESSION["webreports"];
//	ensure all fields in reports are listed in the tables	
	$tables=getReportTablesList();
	if(is_wr_custom())
		$fields = WRGetFieldsList('');
	$arr_unset=array();
	foreach($root["totals"] as $idx=>$fld)
	{
		if(array_search($fld["table"],$tables)!==false || is_null($fld["table"]) && is_wr_custom())
		{
			if(!is_wr_custom())
				$fields = WRGetFieldsList($fld["table"]);
			if(array_search($fld["name"], $fields)!==false)
				continue;
		}
//	remove $total if found
		$arr_unset[]=$idx;
	}
	foreach($arr_unset as $idx=>$fld)
	{
		unset($root["totals"][$fld]);
	}
	
//	ensure all fields appear in the totals
	$all_fields=array();
	foreach($tables as $t)
	{
		$fields=WRGetFieldsList($t);
		foreach($fields as $f)
		{
			if(is_wr_db())
				$all_fields[]=$t.".".$f;
			else
				$all_fields[]=$f;
		}
	}
//	ensure all series  fields appear in the totals
	foreach($all_fields as $fieldItem)
	{
		$f = $fieldItem;
		$table="";
		$fld="";
		if(is_wr_db())
			WRSplitFieldName($f,$table,$fld);
		else
		{
			$table=$tables[0];
			$fld=$f;
			$f=$table."_".$f;
		}
		if(array_key_exists(GoodFieldName($f),$root["totals"]))
			continue;
		$pSet = new ProjectSettings($table, PAGE_LIST);
        $root['totals'][GoodFieldName($f)] = array();
        $root['totals'][GoodFieldName($f)]["name"] = $fld;
        $root['totals'][GoodFieldName($f)]["table"] = $table;
		$root['totals'][GoodFieldName($f)]["label"] = $pSet->label($fld);
        $root['totals'][GoodFieldName($f)]["show"] = "true";
        $root['totals'][GoodFieldName($f)]["min"] = "false";
        $root['totals'][GoodFieldName($f)]["max"] = "false";
        $root['totals'][GoodFieldName($f)]["sum"] = "false";
        $root['totals'][GoodFieldName($f)]["avg"] = "false";
		$root['totals'][GoodFieldName($f)]["curr"] = "false";
        $root['totals'][GoodFieldName($f)]["search"] = "";
        $root['totals'][GoodFieldName($f)]["view_format"] = GetGenericViewFormat($table, $fld);
        $root['totals'][GoodFieldName($f)]["edit_format"] = GetGenericEditFormat($table, $fld);
        $root['totals'][GoodFieldName($f)]["display_field"] = $pSet->getLWDisplayField($fld);
        $root['totals'][GoodFieldName($f)]["linkfield"] = $pSet->getLWLinkField($fld);
        $root['totals'][GoodFieldName($f)]["show_thumbnail"] = $pSet->showThumbnail($fld);
        $root['totals'][GoodFieldName($f)]["need_encode"] = $pSet->NeedEncode($fld);
        $root['totals'][GoodFieldName($f)]["thumbnail"] = $pSet->getStrThumbnail($fld);
        $root['totals'][GoodFieldName($f)]["listformatobj_imgwidth"] = $pSet->getImageWidth($fld);
        $root['totals'][GoodFieldName($f)]["listformatobj_imgheight"] = $pSet->getImageHeight($fld);
        $root['totals'][GoodFieldName($f)]["hlprefix"] = $pSet->getLinkPrefix($fld);
        $root['totals'][GoodFieldName($f)]["listformatobj_filename"] = $pSet->getFilenameField($fld);
        $root['totals'][GoodFieldName($f)]["lookupobj_lookuptype"] = $pSet->getLookupType($fld);
        $root['totals'][GoodFieldName($f)]["editformatobj_lookupobj_customdispaly"] = $pSet->getLWDisplayField($fld);
        $root['totals'][GoodFieldName($f)]["editformatobj_lookupobj_table"] = $pSet->getLookupTable($fld);
        $root['totals'][GoodFieldName($f)]["editformatobj_lookupobj_where"] = GetLWWhere($fld,PAGE_REPORT);
	}
	$_SESSION["webreports"]=$root;
}
开发者ID:helbertfurbino,项目名称:sgmofinanceiro,代码行数:84,代码来源:reportfunctions.php

示例6: substr

	
	$tgFields .='</div>
		</td>
		<td >' . $field . '</td> 
		<td ><input type="text" value="' . runner_htmlspecialchars($pSet->label($arr['field'])) . '" name="" '.$disableLabel.'></td>
		<td align="center"  name=show_fields ' . $class . substr( $blobClass, 2 ) . '"><input ' . $disabled . ' checked type="checkbox" name="'.$val_show.'" ></td>
		<td align="center" ' . $class . $blobClass . '"><input ' . $blobDisabled . $disabled . ' type="checkbox" name="'.$val_min.'" ></td>
		<td align="center" ' . $class . $blobClass . '"><input ' . $blobDisabled . $disabled . ' type="checkbox" name="'.$val_max.'" ></td>
		<td align="center" ' . $class . $blobClass . '"><input ' . $blobDisabled . $disabled . ' type="checkbox" name="'.$val_sum.'" ></td>
		<td align="center" ' . $class . $blobClass . '"><input ' . $blobDisabled . $disabled . ' type="checkbox" name="'.$val_avg.'" ></td>
		<td align="center" ' . $class . $blobClass . '"><input ' . $blobDisabled . ' type="checkbox" name="'.$val_curr.'" ></td>
		<td style="display:none;">
			<input type="text" id="vf' . $cnt . '" name="vf' . $cnt . '" value="' . $vf . '" >
			<input type="text" id="ef' . $cnt . '" name="ef' . $cnt . '" value="' . GetGenericEditFormat( $arr['table'], $arr['field'] ) . '" >
			<input type="text" id="display_field_' . $cnt . '" name="display_field_' . $cnt . '" value="' . $pSet->getLWDisplayField( $arr['field'] ) . '" >
			<input type="text" id="linkfield_' . $cnt . '" name="linkfield_' . $cnt . '" value="' . $pSet->getLWLinkField( $arr['field'] ) . '" >
			<input type="text" id="show_thumbnail_' . $cnt . '" name="show_thumbnail_' . $cnt . '" value="' . $pSet->showThumbnail( $arr['field'] ) . '" >
			<input type="text" id="need_encode_' . $cnt . '" name="need_encode_' . $cnt . '" value="' . $pSet->NeedEncode($arr['field']) . '" >
			<input type="text" id="thumbnail_' . $cnt . '" name="thumbnail_' . $cnt . '" value="' . $pSet->getStrThumbnail( $arr['field'] ) . '" >
			<input type="text" id="listformatobj_imgwidth_' . $cnt . '" name="listformatobj_imgwidth_' . $cnt . '" value="' . $pSet->getImageWidth( $arr['field'] ) . '" >
			<input type="text" id="listformatobj_imgheight_' . $cnt . '" name="listformatobj_imgheight_' . $cnt . '" value="' . $pSet->getImageHeight( $arr['field'] ) . '" >
			<input type="text" id="hlprefix_' . $cnt . '" name="hlprefix_' . $cnt . '" value="' . $pSet->getLinkPrefix($arr['field']) . '" >
			<input type="text" id="listformatobj_filename_' . $cnt . '" name="listformatobj_filename_' . $cnt . '" value="' . $pSet->getFilenameField( $arr['field']) . '" >
			<input type="text" id="lookupobj_lookuptype_' . $cnt . '" name="lookupobj_lookuptype_' . $cnt . '" value="' . $pSet->getLookupType( $arr['field'] ) . '" >
			<input type="text" id="editformatobj_lookupobj_customdispaly_' . $cnt . '" name="editformatobj_lookupobj_customdispaly_' . $cnt . '" value="' . $pSet->getLWDisplayField( $arr['field'] ) . '" >
			<input type="text" id="editformatobj_lookupobj_table_' . $cnt . '" name="editformatobj_lookupobj_table_' . $cnt . '" value="' . $pSet->getLookupTable( $arr['field'] ) . '" >
			<input type="text" id="editformatobj_lookupobj_where_' . $cnt . '" name="editformatobj_lookupobj_where_' . $cnt . '" value="' . GetLWWhere($arr['field'],PAGE_REPORT) . '" >
		</td>
	</tr>';
}
开发者ID:helbertfurbino,项目名称:sgmofinanceiro,代码行数:29,代码来源:webreport4.php

示例7: initLookupParams

 function initLookupParams()
 {
     $this->parId = postvalue("parId");
     $this->firstTime = postvalue("firsttime");
     $this->mainField = postvalue("field");
     $this->lookupControl = postvalue("control");
     $this->lookupCategory = postvalue("category");
     $this->mainTable = postvalue("table");
     global $tables_data;
     include_once getabspath('include/' . GetTableURL($this->mainTable) . '_settings.php');
     $this->pSet = new ProjectSettings($this->tName, PAGE_SEARCH);
     $this->lookupParams = "mode=lookup&id=" . $this->id . "&parId=" . $this->parId . "&field=" . rawurlencode($this->mainField) . "&control=" . rawurlencode($this->lookupControl) . "&category=" . rawurlencode($this->lookupCategory) . "&table=" . rawurlencode($this->mainTable) . "&editMode=" . postvalue('editMode');
     $this->sessionPrefix = $this->tName . "_lookup_" . $this->mainTable . '_' . $this->mainField;
     $pageType = postvalue("pageType");
     if ($pageType != PAGE_ADD && $pageType != PAGE_EDIT) {
         $pageType = PAGE_SEARCH;
     }
     $lookupPSet = new ProjectSettings($this->mainTable, $pageType);
     $this->linkField = $lookupPSet->getLWLinkField($this->mainField, false);
     $this->dispField = $lookupPSet->getLWDisplayField($this->mainField, false);
     if ($lookupPSet->getCustomDisplay($this->mainField)) {
         $this->dispFieldAlias = GetGlobalData("dispFieldAlias", "rrdf1");
         $this->pSet->getSQLQuery()->AddCustomExpression($lookupPSet->getDisplayField($this->mainField), $this->pSet, $this->mainTable, $this->mainField, $this->dispFieldAlias);
         $this->customField = $this->linkField;
     }
     $this->outputFieldValue($this->linkField, 2);
     $this->outputFieldValue($this->dispField, 2);
     if ($lookupPSet->useCategory($this->mainField)) {
         $this->categoryField = $lookupPSet->getCategoryFilter($this->mainField);
     }
     $this->strLookupWhere = GetLWWhere($this->mainField, $this->pageType, $this->mainTable);
     if ($this->dispFieldAlias && $this->pSet->appearOnListPage($this->dispField)) {
         $this->lookupSelectField = $this->dispField;
     } elseif ($this->pSet->appearOnListPage($this->dispField)) {
         $this->lookupSelectField = $this->dispField;
     } else {
         $this->lookupSelectField = $this->listFields[0]['fName'];
     }
     if ($this->categoryField) {
         if (!strlen(GetFullFieldName($this->categoryField))) {
             $this->categoryField = "";
         }
     }
     if (!$this->categoryField) {
         $this->lookupCategory = "";
     }
 }
开发者ID:aagusti,项目名称:padl-tng,代码行数:47,代码来源:listpage_lookup.php


注:本文中的ProjectSettings::getLWLinkField方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。