PhpExt : Layout [ class tree ] [ index ] [ all elements ]

Class: PhpExt_Layout_FormLayout

Source Location: /PhpExt/Layout/FormLayout.php

Class PhpExt_Layout_FormLayout

Class Overview

This is a layout specifically designed for creating forms. However, when used in an application, it will usually be preferrable to use a PhpExt_Form_FormPanel (which automatically uses FormLayout as its layout class) since it also provides built-in functionality for loading, validating and submitting the form.

Note that when creating a layout via config, the layout-specific config properties will be passed in via the Ext.Container.layoutConfig object which will then be applied internally to the layout. The container using the FormLayout can also supply the following form-specific config properties which will be applied by the layout:

  • hideLabels: (Boolean) True to hide field labels by default (defaults to false)
  • itemCls: (String) A CSS class to add to the div wrapper that contains each field label and field element (the default class is 'x-form-item' and itemCls will be added to that)
  • labelAlign: (String) The default label alignment. The default value is empty string '' for left alignment, but specifying 'top' will align the labels above the fields.
  • labelPad: (Number) The default padding in pixels for field labels (defaults to 5). labelPad only applies if labelWidth is also specified, otherwise it will be ignored.
  • labelWidth: (Number) The default width in pixels of field labels (defaults to 100)
Any type of components can be added to a FormLayout, but items that inherit from Ext.form.Field can also supply the following field-specific config properties:

  • clearCls: (String) The CSS class to apply to the special clearing div rendered directly after each form field wrapper (defaults to 'x-form-clear-left')
  • fieldLabel: (String) The text to display as the label for this field (defaults to '')
  • hideLabel: (Boolean) True to hide the label and separator for this field (defaults to false).
  • itemCls: (String) A CSS class to add to the div wrapper that contains this field label and field element (the default class is 'x-form-item' and itemCls will be added to that). If supplied, itemCls at the field level will override the default itemCls supplied at the container level.
  • labelSeparator: (String) The separator to display after the text of the label for this field (defaults to a colon ':' or the layout's value for labelSeparator). To hide the separator use empty string ''.
  • labelStyle: (String) A CSS style specification string to add to the field label for this field (defaults to '' or the layout's value for labelStyle).

Located in /PhpExt/Layout/FormLayout.php [line 43]

PhpExt_Object
   |
   --PhpExt_Layout_ContainerLayout
      |
      --PhpExt_Layout_AnchorLayout
         |
         --PhpExt_Layout_FormLayout
Author(s):
API Tags:
See:  PhpExt_Layout_FormLayoutData

Methods

[ Top ]
Inherited Properties, Constants, and Methods
Inherited Properties Inherited Methods Inherited Constants

Inherited From PhpExt_Layout_ContainerLayout

PhpExt_Layout_ContainerLayout::$_validLayoutDataClassNames

Inherited From PhpExt_Object

PhpExt_Object::$_extClassName
PhpExt_Object::$_extConfigProperties
PhpExt_Object::$_validExtConfigProperties
PhpExt_Object::$_varName

Inherited From PhpExt_Layout_AnchorLayout

PhpExt_Layout_AnchorLayout::__construct()
PhpExt_Layout_AnchorLayout::getLayoutKey()
Returns the internal config string for the layout.

Inherited From PhpExt_Layout_ContainerLayout

PhpExt_Layout_ContainerLayout::__construct()
PhpExt_Layout_ContainerLayout::addValidLayoutDataClassName()
PhpExt_Layout_ContainerLayout::addValidLayoutProperties()
Adds the layout specific valid properties
PhpExt_Layout_ContainerLayout::getExtraCssClass()
An optional extra CSS class that will be added to the container (defaults to ''). This can be useful for adding customized styles to the container or any of its children using standard CSS rules.
PhpExt_Layout_ContainerLayout::getLayoutKey()
Returns the internal config string for the layout.
PhpExt_Layout_ContainerLayout::getRenderHidden()
True to hide each contained item on render (defaults to false).
PhpExt_Layout_ContainerLayout::getValidLayoutDataClassNames()
PhpExt_Layout_ContainerLayout::getValidLayoutProperties()
Gets the layout specific valid properties
PhpExt_Layout_ContainerLayout::setExtraCssClass()
An optional extra CSS class that will be added to the container (defaults to ''). This can be useful for adding customized styles to the container or any of its children using standard CSS rules.
PhpExt_Layout_ContainerLayout::setRenderHidden()
True to hide each contained item on render (defaults to false).

Inherited From PhpExt_Object

PhpExt_Object::__construct()
PhpExt_Object::addValidConfigProperties()
PhpExt_Object::createMethodSignature()
PhpExt_Object::getConfigParams()
PhpExt_Object::getExtConfigProperty()
PhpExt_Object::getJavascript()
PhpExt_Object::getMethodInvokeStm()
PhpExt_Object::isExtObject()
PhpExt_Object::paramToString()
PhpExt_Object::setExtClassInfo()
PhpExt_Object::setExtConfigProperty()
PhpExt_Object::__get()
PhpExt_Object::__set()

Inherited From PhpExt_Layout_ContainerLayout

PhpExt_Layout_ContainerLayout::LAYOUT_ABSOLUTE
PhpExt_Layout_ContainerLayout::LAYOUT_ACCORDION
PhpExt_Layout_ContainerLayout::LAYOUT_ANCHOR
PhpExt_Layout_ContainerLayout::LAYOUT_BORDER
PhpExt_Layout_ContainerLayout::LAYOUT_CARD
PhpExt_Layout_ContainerLayout::LAYOUT_COLUMN
PhpExt_Layout_ContainerLayout::LAYOUT_DEFAULT
PhpExt_Layout_ContainerLayout::LAYOUT_FIT
PhpExt_Layout_ContainerLayout::LAYOUT_FORM
PhpExt_Layout_ContainerLayout::LAYOUT_TAB
PhpExt_Layout_ContainerLayout::LAYOUT_TABLE

[ Top ]
Method Summary
PhpExt_Layout_FormLayout   __construct()  
string   getElementCssStyle()   A CSS style specification string to add to each field element in this layout (defaults to '').
boolean   getHideLabels()   True to hide field labels by default (defaults to false)
string   getItemCssClass()   A CSS class to add to the div wrapper that contains each field label and field element (the default class is 'x-form-item' and itemCls will be added to that)
string   getLabelAlign()   The default label alignment. The default value is empty string '' or PhpExt_Form_FormPanel::LABEL_ALIGN_LEFT for left alignment, but specifying PhpExt_Form_FormPanel::LABEL_ALIGN_TOP will align the labels above the fields.
boolean   getLabelCssStyle()   A CSS style specification string to add to each field label in this layout (defaults to '').
integer   getLabelPad()   The default padding in pixels for field labels (defaults to 5). labelPad only applies if labelWidth is also specified, otherwise it will be ignored.
string   getLabelSeparator()   The standard separator to display after the text of each form label (defaults to a colon ':'). To turn off separators for all fields in this layout by default specify empty string '' (if the labelSeparator value is explicitly set at the field level, those will still be displayed).
integer   getLabelWidth()   The default width in pixels of field labels (defaults to 100)
string   getLayoutKey()   Returns the internal config string for the layout.
PhpExt_Layout_FormLayout   setElementCssStyle()   A CSS style specification string to add to each field element in this layout (defaults to '').
PhpExt_Layout_FormLayout   setHideLabels()   True to hide field labels by default (defaults to false)
PhpExt_Layout_FormLayout   setItemCssClass()   A CSS class to add to the div wrapper that contains each field label and field element (the default class is 'x-form-item' and itemCls will be added to that)
PhpExt_Layout_FormLayout   setLabelAlign()   The default label alignment. The default value is empty string '' or PhpExt_Form_FormPanel::LABEL_ALIGN_LEFT for left alignment, but specifying PhpExt_Form_FormPanel::LABEL_ALIGN_TOP will align the labels above the fields.
PhpExt_Layout_FormLayout   setLabelCssStyle()   A CSS style specification string to add to each field label in this layout (defaults to '').
PhpExt_Layout_FormLayot   setLabelPad()   The default padding in pixels for field labels (defaults to 5). labelPad only applies if labelWidth is also specified, otherwise it will be ignored.
PhpExt_Layout_FormLayout   setLabelSeparator()   The standard separator to display after the text of each form label (defaults to a colon ':'). To turn off separators for all fields in this layout by default specify empty string '' (if the labelSeparator value is explicitly set at the field level, those will still be displayed).
PhpExt_Layout_FormLayout   setLabelWidth()   The default width in pixels of field labels (defaults to 100)

[ Top ]
Methods
Constructor __construct  [line 205]

  PhpExt_Layout_FormLayout __construct( )


API Tags:
Access:  public


Redefinition of:
PhpExt_Layout_AnchorLayout::__construct()

[ Top ]
getElementCssStyle  [line 155]

  string getElementCssStyle( )

A CSS style specification string to add to each field element in this layout (defaults to '').


API Tags:
Access:  public


[ Top ]
getHideLabels  [line 59]

  boolean getHideLabels( )

True to hide field labels by default (defaults to false)


API Tags:
Access:  public


[ Top ]
getItemCssClass  [line 77]

  string getItemCssClass( )

A CSS class to add to the div wrapper that contains each field label and field element (the default class is 'x-form-item' and itemCls will be added to that)


API Tags:
Access:  public


[ Top ]
getLabelAlign  [line 101]

  string getLabelAlign( )

The default label alignment. The default value is empty string '' or PhpExt_Form_FormPanel::LABEL_ALIGN_LEFT for left alignment, but specifying PhpExt_Form_FormPanel::LABEL_ALIGN_TOP will align the labels above the fields.


API Tags:
Access:  public
Uses:  PhpExt_Form_FormPanel::LABEL_ALIGN_TOP
Uses:  PhpExt_Form_FormPanel::LABEL_ALIGN_RIGHT
Uses:  PhpExt_Form_FormPanel::LABEL_ALIGN_LEFT


[ Top ]
getLabelCssStyle  [line 191]

  boolean getLabelCssStyle( )

A CSS style specification string to add to each field label in this layout (defaults to '').


API Tags:
Access:  public


[ Top ]
getLabelPad  [line 119]

  integer getLabelPad( )

The default padding in pixels for field labels (defaults to 5). labelPad only applies if labelWidth is also specified, otherwise it will be ignored.


API Tags:
Access:  public


[ Top ]
getLabelSeparator  [line 173]

  string getLabelSeparator( )

The standard separator to display after the text of each form label (defaults to a colon ':'). To turn off separators for all fields in this layout by default specify empty string '' (if the labelSeparator value is explicitly set at the field level, those will still be displayed).


API Tags:
Access:  public


[ Top ]
getLabelWidth  [line 137]

  integer getLabelWidth( )

The default width in pixels of field labels (defaults to 100)


API Tags:
Access:  public


[ Top ]
getLayoutKey  [line 201]

  string getLayoutKey( )

Returns the internal config string for the layout.


API Tags:
See:  PhpExt_Layout_ContainerLayout::LAYOUT_FORM;
Access:  public


Redefinition of:
PhpExt_Layout_AnchorLayout::getLayoutKey()
Returns the internal config string for the layout.

[ Top ]
setElementCssStyle  [line 147]

  PhpExt_Layout_FormLayout setElementCssStyle( string $value  )

A CSS style specification string to add to each field element in this layout (defaults to '').

Parameters:
string   $value: 

API Tags:
Access:  public


[ Top ]
setHideLabels  [line 51]

  PhpExt_Layout_FormLayout setHideLabels( boolean $value  )

True to hide field labels by default (defaults to false)

Parameters:
boolean   $value: 

API Tags:
Access:  public


[ Top ]
setItemCssClass  [line 69]

  PhpExt_Layout_FormLayout setItemCssClass( string $value  )

A CSS class to add to the div wrapper that contains each field label and field element (the default class is 'x-form-item' and itemCls will be added to that)

Parameters:
string   $value: 

API Tags:
Access:  public


[ Top ]
setLabelAlign  [line 90]

  PhpExt_Layout_FormLayout setLabelAlign( string $value  )

The default label alignment. The default value is empty string '' or PhpExt_Form_FormPanel::LABEL_ALIGN_LEFT for left alignment, but specifying PhpExt_Form_FormPanel::LABEL_ALIGN_TOP will align the labels above the fields.

Parameters:
string   $value: 

API Tags:
Access:  public
Uses:  PhpExt_Form_FormPanel::LABEL_ALIGN_TOP
Uses:  PhpExt_Form_FormPanel::LABEL_ALIGN_RIGHT
Uses:  PhpExt_Form_FormPanel::LABEL_ALIGN_LEFT


[ Top ]
setLabelCssStyle  [line 183]

  PhpExt_Layout_FormLayout setLabelCssStyle( boolean $value  )

A CSS style specification string to add to each field label in this layout (defaults to '').

Parameters:
boolean   $value: 

API Tags:
Access:  public


[ Top ]
setLabelPad  [line 111]

  PhpExt_Layout_FormLayot setLabelPad( integer $value  )

The default padding in pixels for field labels (defaults to 5). labelPad only applies if labelWidth is also specified, otherwise it will be ignored.

Parameters:
integer   $value: 

API Tags:
Access:  public


[ Top ]
setLabelSeparator  [line 165]

  PhpExt_Layout_FormLayout setLabelSeparator( string $value  )

The standard separator to display after the text of each form label (defaults to a colon ':'). To turn off separators for all fields in this layout by default specify empty string '' (if the labelSeparator value is explicitly set at the field level, those will still be displayed).

Parameters:
string   $value: 

API Tags:
Access:  public


[ Top ]
setLabelWidth  [line 129]

  PhpExt_Layout_FormLayout setLabelWidth( integer $value  )

The default width in pixels of field labels (defaults to 100)

Parameters:
integer   $value: 

API Tags:
Access:  public


[ Top ]

Documentation generated on Fri, 08 Aug 2008 15:54:04 -0500 by phpDocumentor 1.4.0