浏览代码

Prerequisites for custom fields

git-svn-id: http://svn.code.sf.net/p/itop/code/trunk@3937 a333f486-631f-4898-b8df-5754b55c2be0
romainq 9 年之前
父节点
当前提交
3ec86f9426
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      sources/renderer/formrenderer.class.inc.php

+ 2 - 1
sources/renderer/formrenderer.class.inc.php

@@ -187,12 +187,13 @@ abstract class FormRenderer
 	 *
 	 * @return array
 	 */
-	public function Render()
+	public function Render($aRequestedFields = null)
 	{
 		$this->InitOutputs();
 
 		foreach ($this->oForm->GetFields() as $oField)
 		{
+			if ($aRequestedFields !== null && !in_array($oField->GetId(), $aRequestedFields)) continue;
 			$this->aOutputs[$oField->GetId()] = $this->PrepareOutputForField($oField);
 		}