Prerequisites to the custom fields

SVN:trunk[3940]
This commit is contained in:
Guillaume Lajarige
2016-03-09 16:58:31 +00:00
parent ced87e71cb
commit daa090d4fe
9 changed files with 188 additions and 54 deletions

View File

@@ -184,16 +184,21 @@ abstract class FormRenderer
}
/**
* Returns an array of Output for the form fields.
*
* @param array $aFieldIds An array of field ids. If specified, renders only those fields
* @return array
*/
public function Render($aRequestedFields = null)
public function Render($aFieldIds = null)
{
$this->InitOutputs();
foreach ($this->oForm->GetFields() as $oField)
{
if ($aRequestedFields !== null && !in_array($oField->GetId(), $aRequestedFields)) continue;
if ($aFieldIds !== null && !in_array($oField->GetId(), $aFieldIds))
{
continue;
}
$this->aOutputs[$oField->GetId()] = $this->PrepareOutputForField($oField);
}