Perforce Chronicle 2012.2/486814
API Documentation

Content_Form_Save Class Reference

Content sub-form to provide comment field used for changelist description. More...

Inheritance diagram for Content_Form_Save:
P4Cms_Form_SubForm

List of all members.

Public Member Functions

 init ()
 Called automatically when the form object is created.

Detailed Description

Content sub-form to provide comment field used for changelist description.

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

Content_Form_Save::init ( )

Called automatically when the form object is created.

    {
        // set the title of this form.
        $this->setLegend('Save');

        // add a comment element to provide a description that will appear in the version history.
        $this->addElement(
            'textarea',
            'comment',
            array(
                'label'         => 'Comment',
                'description'   => "Shown in the version history.",
                'rows'          => 3,
                'ignore'        => true
            )
        );

        // add a save button.
        $this->addElement(
            'SubmitButton',
            'save',
            array(
                'class'     => 'content-save-button preferred',
                'label'     => 'Save',
                'required'  => false,
                'ignore'    => true
            )
        );

        // put the save button in a fieldset at the bottom of the form.
        $this->addDisplayGroup(
            array('save'),
            'buttons',
            array(
                'class'     => 'buttons',
                'order'     => '1000'
            )
        );
    }

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