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

Class: PhpExt_Component

Source Location: /PhpExt/Component.php

Class PhpExt_Component

Class Overview

Base class for all Ext components. All subclasses of Component can automatically participate in the standard Ext component lifecycle of creation, rendering and destruction. They also have automatic support for basic hide/show and enable/disable behavior. All visual widgets that require rendering into a layout should subclass PhpExt_Component (or BoxComponent if managed box model handling is required).

Every component has a specific xtype. This is the list of all valid xtypes:

 xtype            Class
 -------------    ------------------
 box              BoxComponent
 button           Button
 colorpalette     ColorPalette
 component        Component
 container        Container
 cycle            CycleButton
 dataview         DataView
 datepicker       DatePicker
 editor           Editor
 editorgrid       EditorGridPanel
 grid             GridPanel
 paging           PagingToolbar
 panel            Panel
 progress         ProgressBar
 splitbutton      SplitButton
 tabpanel         TabPanel
 treepanel        TreePanel
 viewport         ViewPort
 window           Window

 Toolbar components
 ---------------------------------------
 toolbar          Toolbar

 Form components
 ---------------------------------------
 checkbox         Checkbox
 combo            ComboBox
 datefield        DateField
 field            Field
 fieldset         FieldSet
 form             FormPanel
 hidden           Hidden
 htmleditor       HtmlEditor
 numberfield      NumberField
 radio            Radio
 textarea         TextArea
 textfield        TextField
 timefield        TimeField

Located in /PhpExt/Component.php [line 78]

PhpExt_Object
   |
   --PhpExt_Observable
      |
      --PhpExt_Component
Author(s):
API Tags:
Abstract:  

Properties

Methods

[ Top ]
Descendants
Child Class Description
PhpExt_BoxComponent Base class for any visual PhpExt_Component that uses a box container.
PhpExt_Button Simple Button class
PhpExt_Editor A base editor field that handles displaying/hiding on demand and has some built-in sizing and event handling logic.
PhpExt_Menu_BaseItem The base class for all items that render into menus. BaseItem provides default rendering, activated state management and base configuration options shared by all menu components.

[ Top ]
Method Summary
PhpExt_Component   __construct()   ** Overrides ***
boolean   getAllowDomMove()   Whether the component can move the Dom node when rendering (defaults to true).
string   getApplyTo()   The id of the node, a DOM node or an existing Element corresponding to a DIV that is already present in the document that specifies some structural markup for this component. When applyTo is used, constituent parts of the component can also be specified by id or CSS class name within the main element, and the component being created may attempt to create its subcomponents from that markup if applicable. Using this config, a call to render() is not required. If applyTo is specified, any value passed for renderTo will be ignored and the target element's parent node will automatically be used as the component's container.
boolean   getAutoShow()   True if the component should check for hidden classes (e.g. 'x-hidden' or 'x-hide-display') and remove them on render (defaults to false).
void   getConfigParams()  
string   getContainerCssClass()   An optional extra CSS class that will be added to this component's container (defaults to ''). This can be useful for adding customized styles to the container or any of its children using standard CSS rules.
string   getCssClass()   An optional extra CSS class that will be added to this component's Element (defaults to ''). This can be useful for adding customized styles to the component or any of its children using standard CSS rules.
string|PhpExt_JavascriptStm   getCssStyle()   A custom style specification to be applied to this component's Element.
string   getDisabledCssClass()   CSS class added to the component when it is disabled (defaults to "x-item-disabled").
string   getEl()   The DOM element to which this component show be rendered to. This should be used instead of renderTo or applyTo if using lazy render.
string   getHideMode()   How this component should hidden. Supported values are
  1. PhpExt_Component::HIDE_MODE_VISIBILITY
(css visibility),
  1. PhpExt_Component::HIDE_MODE_OFFSETS
(negative offset position) and
  1. PhpExt_Component::HIDE_MODE_DISPLAY
(css display) - defaults to
  1. PhpExt_Component::HIDE_MODE_DISPLAY
.
boolean   getHideParent()   True to hide and show the component's container when hide/show is called on the component, false to hide and show the component itself (defaults to false). For example, this can be used as a shortcut for a hide button on a window by setting hide:true on the button when adding it to its parent container.
string   getId()   The unique id of this component (defaults to an auto-assigned id).
PhpExt_Layout_ContainerLayoutData   getLayoutData()  
PhpExt_ComponentCollection   getOwnerCollection()  
PhpExt_ObjectCollection   getPlugins()   An object or array of objects that will provide custom functionality for this component. The only requirement for a valid plugin is that it contain an init method that accepts a reference of type Ext.Component. When a component is created, if any plugins are available, the component will call the init method on each plugin, passing a reference to itself. Each plugin can then call methods or respond to events on the component as needed to provide its functionality.
string|PhpExt_JavascriptStm   getRenderTo()   The id of the node, a DOM node or an existing Element that will be the container to render this component into. Using this config, a call to render() is not required.
void   render()   ** Ext Object Methods ***
PhpExt_Component   setAllowDomMove()   Whether the component can move the Dom node when rendering (defaults to true).
PhpExt_Component   setApplyTo()   The id of the node, a DOM node or an existing Element corresponding to a DIV that is already present in the document that specifies some structural markup for this component. When applyTo is used, constituent parts of the component can also be specified by id or CSS class name within the main element, and the component being created may attempt to create its subcomponents from that markup if applicable. Using this config, a call to render() is not required. If applyTo is specified, any value passed for renderTo will be ignored and the target element's parent node will automatically be used as the component's container.
PhpExt_Component   setAutoShow()   True if the component should check for hidden classes (e.g. 'x-hidden' or 'x-hide-display') and remove them on render (defaults to false).
PhpExt_Component   setContainerCssClass()   An optional extra CSS class that will be added to this component's container (defaults to ''). This can be useful for adding customized styles to the container or any of its children using standard CSS rules.
PhpExt_Component   setCssClass()   An optional extra CSS class that will be added to this component's Element (defaults to ''). This can be useful for adding customized styles to the component or any of its children using standard CSS rules.
PhpExt_Component   setCssStyle()   A custom style specification to be applied to this component's Element.
PhpExt_Component   setDisabledCssClass()   CSS class added to the component when it is disabled (defaults to "x-item-disabled").
PhpExt_Component   setEl()   The DOM element to which this component show be rendered to. This should be used instead of renderTo or applyTo if using lazy render.
void   setExtClassInfo()  
PhpExt_Component   setHideMode()   How this component should hidden. Supported values are
  1. PhpExt_Component::HIDE_MODE_VISIBILITY
(css visibility),
  1. PhpExt_Component::HIDE_MODE_OFFSETS
(negative offset position) and
  1. PhpExt_Component::HIDE_MODE_DISPLAY
(css display) - defaults to
  1. PhpExt_Component::HIDE_MODE_DISPLAY
.
PhpExt_Component   setHideParent()   True to hide and show the component's container when hide/show is called on the component, false to hide and show the component itself (defaults to false). For example, this can be used as a shortcut for a hide button on a window by setting hide:true on the button when adding it to its parent container.
PhpExt_Component   setId()   The unique id of this component (defaults to an auto-assigned id).
PhpExt_Component   setLayoutData()   Layout specific properties for the corresponding layout of the container.
void   setOwnerCollection()  
PhpExt_Component   setRenderTo()   The id of the node, a DOM node or an existing Element that will be the container to render this component into. Using this config, a call to render() is not required.

[ Top ]
Properties
PhpExt_Layout_ContainerLayoutData   $_layoutData [line 271]
API Tags:
Access:  protected


[ Top ]
PhpExt_ComponentCollection   $_ownerCollection [line 358]
API Tags:
Access:  protected


[ Top ]
PhpExt_ObjectCollection   $_plugins = null [line 304]
API Tags:
Access:  protected


[ Top ]
mixed   $_xType = "" [line 84]
API Tags:
Access:  protected


[ Top ]
Methods
Constructor __construct  [line 396]

  PhpExt_Component __construct( )

** Overrides ***


API Tags:
Access:  public


Redefinition of:
PhpExt_Observable::__construct()

Redefined in descendants as:

[ Top ]
getAllowDomMove  [line 101]

  boolean getAllowDomMove( )

Whether the component can move the Dom node when rendering (defaults to true).


API Tags:
Access:  public


[ Top ]
getApplyTo  [line 119]

  string getApplyTo( )

The id of the node, a DOM node or an existing Element corresponding to a DIV that is already present in the document that specifies some structural markup for this component. When applyTo is used, constituent parts of the component can also be specified by id or CSS class name within the main element, and the component being created may attempt to create its subcomponents from that markup if applicable. Using this config, a call to render() is not required. If applyTo is specified, any value passed for renderTo will be ignored and the target element's parent node will automatically be used as the component's container.


API Tags:
Access:  public


Redefined in descendants as:
  • PhpExt_Panel::getApplyTo() : The id of the node, a DOM node or an existing Element corresponding to a DIV that is already present in the document that specifies some panel-specific structural markup. When applyTo is used, constituent parts of the panel can be specified by CSS class name within the main element, and the panel will automatically create those components from that markup. Any required components not specified in the markup will be autogenerated if necessary. The following class names are supported (baseCls will be replaced by BaseCssClass):

[ Top ]
getAutoShow  [line 137]

  boolean getAutoShow( )

True if the component should check for hidden classes (e.g. 'x-hidden' or 'x-hide-display') and remove them on render (defaults to false).


API Tags:
Access:  public


[ Top ]
getConfigParams  [line 430]

  void getConfigParams( [ $lazy = false]  )

Parameters:
   $lazy: 

API Tags:
Access:  protected


Redefinition of:
PhpExt_Observable::getConfigParams()

Redefined in descendants as:

[ Top ]
getContainerCssClass  [line 173]

  string getContainerCssClass( )

An optional extra CSS class that will be added to this component's container (defaults to ''). This can be useful for adding customized styles to the container or any of its children using standard CSS rules.


API Tags:
Access:  public


[ Top ]
getCssClass  [line 155]

  string getCssClass( )

An optional extra CSS class that will be added to this component's Element (defaults to ''). This can be useful for adding customized styles to the component or any of its children using standard CSS rules.


API Tags:
Access:  public


Redefined in descendants as:

[ Top ]
getCssStyle  [line 345]

  string|PhpExt_JavascriptStm getCssStyle( )

A custom style specification to be applied to this component's Element.


API Tags:
Access:  public


[ Top ]
getDisabledCssClass  [line 191]

  string getDisabledCssClass( )

CSS class added to the component when it is disabled (defaults to "x-item-disabled").


API Tags:
Access:  public


[ Top ]
getEl  [line 209]

  string getEl( )

The DOM element to which this component show be rendered to. This should be used instead of renderTo or applyTo if using lazy render.


API Tags:
Access:  public


[ Top ]
getHideMode  [line 227]

  string getHideMode( )

How this component should hidden. Supported values are

  1. PhpExt_Component::HIDE_MODE_VISIBILITY
(css visibility),
  1. PhpExt_Component::HIDE_MODE_OFFSETS
(negative offset position) and
  1. PhpExt_Component::HIDE_MODE_DISPLAY
(css display) - defaults to
  1. PhpExt_Component::HIDE_MODE_DISPLAY
.


API Tags:
Access:  public


[ Top ]
getHideParent  [line 245]

  boolean getHideParent( )

True to hide and show the component's container when hide/show is called on the component, false to hide and show the component itself (defaults to false). For example, this can be used as a shortcut for a hide button on a window by setting hide:true on the button when adding it to its parent container.


API Tags:
Access:  public


[ Top ]
getId  [line 263]

  string getId( )

The unique id of this component (defaults to an auto-assigned id).


API Tags:
Access:  public


Redefined in descendants as:

[ Top ]
getLayoutData  [line 296]

  PhpExt_Layout_ContainerLayoutData getLayoutData( )


API Tags:
Access:  public


[ Top ]
getOwnerCollection  [line 366]

  PhpExt_ComponentCollection getOwnerCollection( )


API Tags:
Access:  public


[ Top ]
getPlugins  [line 309]

  PhpExt_ObjectCollection getPlugins( )

An object or array of objects that will provide custom functionality for this component. The only requirement for a valid plugin is that it contain an init method that accepts a reference of type Ext.Component. When a component is created, if any plugins are available, the component will call the init method on each plugin, passing a reference to itself. Each plugin can then call methods or respond to events on the component as needed to provide its functionality.


API Tags:
Access:  public


[ Top ]
getRenderTo  [line 327]

  string|PhpExt_JavascriptStm getRenderTo( )

The id of the node, a DOM node or an existing Element that will be the container to render this component into. Using this config, a call to render() is not required.


API Tags:
Access:  public


[ Top ]
render  [line 388]

  void render( )

** Ext Object Methods ***


API Tags:
Access:  public


[ Top ]
setAllowDomMove  [line 93]

  PhpExt_Component setAllowDomMove( boolean $value  )

Whether the component can move the Dom node when rendering (defaults to true).

Parameters:
boolean   $value: 

API Tags:
Access:  public


[ Top ]
setApplyTo  [line 111]

  PhpExt_Component setApplyTo( string $value  )

The id of the node, a DOM node or an existing Element corresponding to a DIV that is already present in the document that specifies some structural markup for this component. When applyTo is used, constituent parts of the component can also be specified by id or CSS class name within the main element, and the component being created may attempt to create its subcomponents from that markup if applicable. Using this config, a call to render() is not required. If applyTo is specified, any value passed for renderTo will be ignored and the target element's parent node will automatically be used as the component's container.

Parameters:
string   $value: 

API Tags:
Access:  public


Redefined in descendants as:
  • PhpExt_Panel::setApplyTo() : The id of the node, a DOM node or an existing Element corresponding to a DIV that is already present in the document that specifies some panel-specific structural markup. When applyTo is used, constituent parts of the panel can be specified by CSS class name within the main element, and the panel will automatically create those components from that markup. Any required components not specified in the markup will be autogenerated if necessary. The following class names are supported (baseCls will be replaced by BaseCssClass):

[ Top ]
setAutoShow  [line 129]

  PhpExt_Component setAutoShow( boolean $value  )

True if the component should check for hidden classes (e.g. 'x-hidden' or 'x-hide-display') and remove them on render (defaults to false).

Parameters:
boolean   $value: 

API Tags:
Access:  public


[ Top ]
setContainerCssClass  [line 165]

  PhpExt_Component setContainerCssClass( string $value  )

An optional extra CSS class that will be added to this component's container (defaults to ''). This can be useful for adding customized styles to the container or any of its children using standard CSS rules.

Parameters:
string   $value: 

API Tags:
Access:  public


[ Top ]
setCssClass  [line 147]

  PhpExt_Component setCssClass( string $value  )

An optional extra CSS class that will be added to this component's Element (defaults to ''). This can be useful for adding customized styles to the component or any of its children using standard CSS rules.

Parameters:
string   $value: 

API Tags:
Access:  public


Redefined in descendants as:

[ Top ]
setCssStyle  [line 337]

  PhpExt_Component setCssStyle( string|PhpExt_JavascriptStm $value  )

A custom style specification to be applied to this component's Element.

Parameters:
string|PhpExt_JavascriptStm   $value: 

API Tags:
Access:  public


[ Top ]
setDisabledCssClass  [line 183]

  PhpExt_Component setDisabledCssClass( string $value  )

CSS class added to the component when it is disabled (defaults to "x-item-disabled").

Parameters:
string   $value: 

API Tags:
Access:  public


[ Top ]
setEl  [line 201]

  PhpExt_Component setEl( string $value  )

The DOM element to which this component show be rendered to. This should be used instead of renderTo or applyTo if using lazy render.

Parameters:
string   $value: 

API Tags:
Access:  public


[ Top ]
setExtClassInfo  [line 425]

  void setExtClassInfo( $extClassName, $xtype  )

Parameters:
   $extClassName: 
   $xtype: 

API Tags:
Access:  protected


Redefinition of:
PhpExt_Object::setExtClassInfo()

[ Top ]
setHideMode  [line 219]

  PhpExt_Component setHideMode( string $value  )

How this component should hidden. Supported values are

  1. PhpExt_Component::HIDE_MODE_VISIBILITY
(css visibility),
  1. PhpExt_Component::HIDE_MODE_OFFSETS
(negative offset position) and
  1. PhpExt_Component::HIDE_MODE_DISPLAY
(css display) - defaults to
  1. PhpExt_Component::HIDE_MODE_DISPLAY
.

Parameters:
string   $value: 

API Tags:
Access:  public


[ Top ]
setHideParent  [line 237]

  PhpExt_Component setHideParent( boolean $value  )

True to hide and show the component's container when hide/show is called on the component, false to hide and show the component itself (defaults to false). For example, this can be used as a shortcut for a hide button on a window by setting hide:true on the button when adding it to its parent container.

Parameters:
boolean   $value: 

API Tags:
Access:  public


[ Top ]
setId  [line 255]

  PhpExt_Component setId( string $value  )

The unique id of this component (defaults to an auto-assigned id).

Parameters:
string   $value: 

API Tags:
Access:  public


Redefined in descendants as:

[ Top ]
setLayoutData  [line 288]

Layout specific properties for the corresponding layout of the container.

It must be a PhpExt_Layout_ContainerLayoutData object or any of its descendants.

Parameters:
PhpExt_Layout_ContainerLayoutData   $value: 

API Tags:
Access:  public
Uses:  PhpExt_Layout_FitLayoutData
Uses:  PhpExt_Layout_FormLayoutData
Uses:  PhpExt_Layout_TableLayoutData
Uses:  PhpExt_Layout_ColumnLayoutData
Uses:  PhpExt_Layout_CardLayoutData
Uses:  PhpExt_Layout_AccordionLayoutData
Uses:  PhpExt_Layout_AnchorLayoutData
Uses:  PhpExt_Layout_BorderLayoutData
Uses:  PhpExt_Layout_AbsoluteLayoutData


[ Top ]
setOwnerCollection  [line 359]

  void setOwnerCollection( PhpExt_ComponentCollection $owner  )

Parameters:
PhpExt_ComponentCollection   $owner: 

API Tags:
Access:  public


[ Top ]
setRenderTo  [line 319]

  PhpExt_Component setRenderTo( string|PhpExt_JavascriptStm $value  )

The id of the node, a DOM node or an existing Element that will be the container to render this component into. Using this config, a call to render() is not required.

Parameters:
string|PhpExt_JavascriptStm   $value: 

API Tags:
Access:  public


[ Top ]
Constants
HIDE_MODE_DISPLAY = 'display' [line 82]

[ Top ]
HIDE_MODE_OFFSETS = 'offsets' [line 81]

[ Top ]
HIDE_MODE_VISIBILITY = 'visibility' [line 80]

[ Top ]

Documentation generated on Fri, 08 Aug 2008 15:51:48 -0500 by phpDocumentor 1.4.0