Perforce Chronicle 2012.2/486814
API Documentation

Search_Form_Manage Class Reference

The form providing configuration for import processing. More...

Inheritance diagram for Search_Form_Manage:
P4Cms_Form

List of all members.

Public Member Functions

 init ()
 Defines the elements that make up the import form.

Detailed Description

The form providing configuration for import processing.

Copyright:
2011-2012 Perforce Software. All rights reserved
License:
Please see LICENSE.txt in top-level folder of this distribution.
Version:
2012.2/486814

Member Function Documentation

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')
        );
    }

The documentation for this class was generated from the following file: