|
Perforce Chronicle 2012.2/486814
API Documentation
|
The form providing configuration for import processing. More...
Public Member Functions | |
| init () | |
| Defines the elements that make up the import form. | |
The form providing configuration for import processing.
| Search_Form_Manage::init | ( | ) |
Defines the elements that make up the import form.
Called automatically when the form object is created.
{
// form should use p4cms-ui styles.
$this->setAttrib('class', 'p4cms-ui search-form-manage');
// set the method for the display form to POST
$this->setMethod('post');
// add a field to allow users specify the MaxBufferedDocs
$this->addElement(
'text',
'maxBufferedDocs',
array(
'label' => 'Maximum Buffered Documents',
'description' => "The maximum number of documents buffered in memory at one time.",
'filters' => array('StringTrim'),
'validators' => array('Int', 'NotEmpty'),
'value' => Search_Module::getMaxBufferedDocs(),
'size' => 20,
)
);
// add a field to allow users specify the MaxMergeDocs
$this->addElement(
'text',
'maxMergeDocs',
array(
'label' => 'Maximum Merge Documents',
'description' => 'The maximum number of documents merged into an index segment by auto-optimization.',
'filters' => array('StringTrim'),
'validators' => array('Int'),
'value' => Search_Module::getMaxMergeDocs(),
'size' => 20,
)
);
// add a field to allow users specify the MergeFactor
$this->addElement(
'text',
'mergeFactor',
array(
'label' => 'Merge Factor',
'description' => 'Increasing this number decreases the frequency of auto-optimization.',
'filters' => array('StringTrim'),
'validators' => array('Int', 'NotEmpty'),
'value' => Search_Module::getMergeFactor(),
'size' => 20,
)
);
$this->addElement(
'SubmitButton',
'Save',
array(
'class' => 'preferred',
'ignore' => true
)
);
// put the button in a fieldset.
$this->addDisplayGroup(
array('Save'),
'buttons',
array('class' => 'buttons')
);
}