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

Class: PhpExt_Container

Source Location: /PhpExt/Container.php

Class PhpExt_Container

Class Overview

Base class for any Ext.BoxComponent that can contain other components. Containers handle the basic behavior of containing items, namely adding, inserting and removing them. The specific layout logic required to visually render contained items is delegated to any one of the different layout classes available. This class is intended to be extended and should generally not need to be created directly via the new keyword.

Located in /PhpExt/Container.php [line 32]

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

Properties

Methods

[ Top ]
Descendants
Child Class Description
PhpExt_Panel
PhpExt_Viewport A specialized container representing the viewable application area (the browser viewport).

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

Inherited From PhpExt_Component

PhpExt_Component::$_layoutData
PhpExt_Component::$_ownerCollection
PhpExt_Component::$_plugins
PhpExt_Component::$_xType

Inherited From PhpExt_Observable

PhpExt_Observable::$_listeners

Inherited From PhpExt_Object

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

Inherited From PhpExt_BoxComponent

PhpExt_BoxComponent::__construct()
PhpExt_BoxComponent::getAutoHeight()
True to use height:'auto', false to use fixed height (defaults to false).
PhpExt_BoxComponent::getAutoWidth()
True to use width:'auto', false to use fixed width (defaults to false).
PhpExt_BoxComponent::getHeight()
The height of this component in pixels (defaults to auto).
PhpExt_BoxComponent::getWidth()
The width of this component in pixels (defaults to auto).
PhpExt_BoxComponent::setAutoHeight()
True to use height:'auto', false to use fixed height (defaults to false).
PhpExt_BoxComponent::setAutoWidth()
True to use width:'auto', false to use fixed width (defaults to false).
PhpExt_BoxComponent::setHeight()
The height of this component in pixels (defaults to auto).
PhpExt_BoxComponent::setWidth()
The width of this component in pixels (defaults to auto).

Inherited From PhpExt_Component

PhpExt_Component::__construct()
** Overrides ***
PhpExt_Component::getAllowDomMove()
Whether the component can move the Dom node when rendering (defaults to true).
PhpExt_Component::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.
PhpExt_Component::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).
PhpExt_Component::getConfigParams()
PhpExt_Component::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.
PhpExt_Component::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.
PhpExt_Component::getCssStyle()
A custom style specification to be applied to this component's Element.
PhpExt_Component::getDisabledCssClass()
CSS class added to the component when it is disabled (defaults to "x-item-disabled").
PhpExt_Component::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.
PhpExt_Component::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
.
PhpExt_Component::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.
PhpExt_Component::getId()
The unique id of this component (defaults to an auto-assigned id).
PhpExt_Component::getLayoutData()
PhpExt_Component::getOwnerCollection()
PhpExt_Component::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.
PhpExt_Component::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.
PhpExt_Component::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.
PhpExt_Component::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.
PhpExt_Component::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.

Inherited From PhpExt_Observable

PhpExt_Observable::__construct()
PhpExt_Observable::attachListener()
Adds a PhpExt_Listener to the specified $eventName. This lintener will execute when the Javascript object fires that event.
PhpExt_Observable::getConfigParams()
PhpExt_Observable::getListeners()

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_Component

PhpExt_Component::HIDE_MODE_DISPLAY
PhpExt_Component::HIDE_MODE_OFFSETS
PhpExt_Component::HIDE_MODE_VISIBILITY

[ Top ]
Method Summary
PhpExt_Container   __construct()  
PhpExt_Container   addItem()   Adds a component to the items collection
string|int   getActiveItem()   A string component id or the numeric index of the component that should be initially activated within the container's layout on render. For example, activeItem: 'item-1' or activeItem: 0 (index 0 = the first item in the container's collection). activeItem only applies to layout styles that can display items one at a time (like Ext.layout.Accordion, Ext.layout.CardLayout and Ext.layout.FitLayout). Related to Ext.layout.ContainerLayout.activeItem.
boolean   getAutoDestroy()   If true the container will automatically destroy any contained component that is removed from it, else destruction must be handled manually (defaults to true).
boolean|int   getBufferResize()   When set to true (100 milliseconds) or a number of milliseconds, the layout assigned for this container will buffer the frequency it calculates and does a re-layout of components. This is useful for heavy containers or containers with a large amount of sub components that frequent calls to layout are expensive.
void   getConfigParams()  
PhpExt_Config_ConfigObject   getDefaults()  
string   getDefaultType()   The default type of container represented by this object as registered in Ext.ComponentMgr (defaults to 'panel').
boolean   getHideBorders()   True to hide the borders of each contained component, false to defer to the component's existing border settings (defaults to false).
PhpExt_ComponentCollection   getItems()   A single item, or an array of child Components to be added to this container. Each item can be any type of object based on Ext.Component.
PhpExt_Layout_ContainerLayout   getLayout()   The layout type to be used in this container. If not specified, a default PhpExt_Layout_ContainerLayout will be created and used.
boolean   getMonitorResize()   True to automatically monitor window resize events to handle anything that is sensitive to the current size of the viewport. This value is typically managed by the chosen layout and should not need to be set manually.
PhpExt_Container   setActiveItem()   A string component id or the numeric index of the component that should be initially activated within the container's layout on render. For example, activeItem: 'item-1' or activeItem: 0 (index 0 = the first item in the container's collection). activeItem only applies to layout styles that can display items one at a time (like Ext.layout.Accordion, Ext.layout.CardLayout and Ext.layout.FitLayout). Related to Ext.layout.ContainerLayout.activeItem.
PhpExt_Container   setAutoDestroy()   If true the container will automatically destroy any contained component that is removed from it, else destruction must be handled manually (defaults to true).
PhpExt_Container   setBufferResize()   When set to true (100 milliseconds) or a number of milliseconds, the layout assigned for this container will buffer the frequency it calculates and does a re-layout of components. This is useful for heavy containers or containers with a large amount of sub components that frequent calls to layout are expensive.
PhpExt_Container   setDefaults()   A config object that will be applied to all components added to this container either via the items config or via the add or insert methods. The defaults config can contain any number of name/value property pairs to be added to each item, and should be valid for the types of items being added to the container. For example, to automatically apply padding to the body of each of a set of contained PhpExt_Panel items, you could pass: new PhpExt_Config_ConfigObject(array('bodyStyle'=>'padding:15px')).
PhpExt_Container   setDefaultType()   The default type of container represented by this object as registered in Ext.ComponentMgr (defaults to 'panel').
PhpExt_Container   setHideBorders()   True to hide the borders of each contained component, false to defer to the component's existing border settings (defaults to false).
PhpExt_Container   setLayout()   The layout type to be used in this container. If not specified, a default PhpExt_Layout_ContainerLayout will be created and used.
PhpExt_Container   setMonitorResize()   True to automatically monitor window resize events to handle anything that is sensitive to the current size of the viewport. This value is typically managed by the chosen layout and should not need to be set manually.

[ Top ]
Properties
PhpExt_Layout_ContainerLayout   $_defaultLayout [line 186]
API Tags:
Access:  protected


[ Top ]
PhpExt_ComponentCollection   $_items = null [line 149]

PhpExt_Component Collection

API Tags:
Access:  protected


[ Top ]
PhpExt_Layout_ContainerLayout   $_layout [line 190]
API Tags:
Access:  protected


[ Top ]
Methods
addItem  [line 157]

  PhpExt_Container addItem( PhpExt_Component $item, [PhpExt_Layout_ContainerLayoutData $layoutData = null]  )

Adds a component to the items collection

Parameters:
PhpExt_Component   $item:  Descendants of PhpExt_Component
PhpExt_Layout_ContainerLayoutData   $layoutData: 

API Tags:
Access:  public


[ Top ]
getActiveItem  [line 49]

  string|int getActiveItem( )

A string component id or the numeric index of the component that should be initially activated within the container's layout on render. For example, activeItem: 'item-1' or activeItem: 0 (index 0 = the first item in the container's collection). activeItem only applies to layout styles that can display items one at a time (like Ext.layout.Accordion, Ext.layout.CardLayout and Ext.layout.FitLayout). Related to Ext.layout.ContainerLayout.activeItem.


API Tags:
Access:  public


[ Top ]
getAutoDestroy  [line 67]

  boolean getAutoDestroy( )

If true the container will automatically destroy any contained component that is removed from it, else destruction must be handled manually (defaults to true).


API Tags:
Access:  public


[ Top ]
getBufferResize  [line 85]

  boolean|int getBufferResize( )

When set to true (100 milliseconds) or a number of milliseconds, the layout assigned for this container will buffer the frequency it calculates and does a re-layout of components. This is useful for heavy containers or containers with a large amount of sub components that frequent calls to layout are expensive.


API Tags:
Access:  public


[ Top ]
getConfigParams  [line 279]

  void getConfigParams( [ $lazy = false]  )

Parameters:
   $lazy: 

API Tags:
Access:  protected


Redefinition of:
PhpExt_Component::getConfigParams()

Redefined in descendants as:

[ Top ]
getDefaults  [line 121]

  PhpExt_Config_ConfigObject getDefaults( )


API Tags:
Access:  public


[ Top ]
getDefaultType  [line 103]

  string getDefaultType( )

The default type of container represented by this object as registered in Ext.ComponentMgr (defaults to 'panel').


API Tags:
Access:  public


[ Top ]
getHideBorders  [line 139]

  boolean getHideBorders( )

True to hide the borders of each contained component, false to defer to the component's existing border settings (defaults to false).


API Tags:
Access:  public


[ Top ]
getItems  [line 178]

A single item, or an array of child Components to be added to this container. Each item can be any type of object based on Ext.Component.

Component config objects may also be specified in order to avoid the overhead of constructing a real Component object if lazy rendering might mean that the added Component will not be rendered immediately. To take advantage of this "lazy instantiation", set the Ext.Component.xtype config property to the registered type of the Component wanted.

For a list of all available xtypes, see Ext.Component.


API Tags:
Access:  public


[ Top ]
getLayout  [line 230]

The layout type to be used in this container. If not specified, a default PhpExt_Layout_ContainerLayout will be created and used.

Valid values are: PhpExt_Layout_AccordionLayout, PhpExt_Layout_Anchor, PhpExt_Layout_Border, PhpExt_Layout_Card, PhpExt_Layout_Column, PhpExt_Layout_Fit, PhpExt_Layout_Form and PhpExt_Layout_Table. Specific config values for the chosen layout type can be specified using setLayoutConfig().


API Tags:
Access:  public
Uses:  PhpExt_Layout_Fit
Uses:  PhpExt_Layout_Form
Uses:  PhpExt_Layout_Table
Uses:  PhpExt_Layout_ContainerLayout
Uses:  PhpExt_Layout_Column
Uses:  PhpExt_Layout_Anchor
Uses:  PhpExt_Layout_Border
Uses:  PhpExt_Layout_Card
Uses:  PhpExt_Layout_AccordionLayout


Redefined in descendants as:

[ Top ]
getMonitorResize  [line 248]

  boolean getMonitorResize( )

True to automatically monitor window resize events to handle anything that is sensitive to the current size of the viewport. This value is typically managed by the chosen layout and should not need to be set manually.


API Tags:
Access:  public


Redefined in descendants as:

[ Top ]
setActiveItem  [line 41]

  PhpExt_Container setActiveItem( string|int $value  )

A string component id or the numeric index of the component that should be initially activated within the container's layout on render. For example, activeItem: 'item-1' or activeItem: 0 (index 0 = the first item in the container's collection). activeItem only applies to layout styles that can display items one at a time (like Ext.layout.Accordion, Ext.layout.CardLayout and Ext.layout.FitLayout). Related to Ext.layout.ContainerLayout.activeItem.

Parameters:
string|int   $value: 

API Tags:
Access:  public


[ Top ]
setAutoDestroy  [line 59]

  PhpExt_Container setAutoDestroy( boolean $value  )

If true the container will automatically destroy any contained component that is removed from it, else destruction must be handled manually (defaults to true).

Parameters:
boolean   $value: 

API Tags:
Access:  public


[ Top ]
setBufferResize  [line 77]

  PhpExt_Container setBufferResize( boolean|int $value  )

When set to true (100 milliseconds) or a number of milliseconds, the layout assigned for this container will buffer the frequency it calculates and does a re-layout of components. This is useful for heavy containers or containers with a large amount of sub components that frequent calls to layout are expensive.

Parameters:
boolean|int   $value: 

API Tags:
Access:  public


[ Top ]
setDefaults  [line 113]

  PhpExt_Container setDefaults( PhpExt_Config_ConfigObject $value  )

A config object that will be applied to all components added to this container either via the items config or via the add or insert methods. The defaults config can contain any number of name/value property pairs to be added to each item, and should be valid for the types of items being added to the container. For example, to automatically apply padding to the body of each of a set of contained PhpExt_Panel items, you could pass: new PhpExt_Config_ConfigObject(array('bodyStyle'=>'padding:15px')).

Parameters:
PhpExt_Config_ConfigObject   $value: 

API Tags:
Access:  public


[ Top ]
setDefaultType  [line 95]

  PhpExt_Container setDefaultType( string $value  )

The default type of container represented by this object as registered in Ext.ComponentMgr (defaults to 'panel').

Parameters:
string   $value: 

API Tags:
Access:  public


[ Top ]
setHideBorders  [line 131]

  PhpExt_Container setHideBorders( boolean $value  )

True to hide the borders of each contained component, false to defer to the component's existing border settings (defaults to false).

Parameters:
boolean   $value: 

API Tags:
Access:  public


[ Top ]
setLayout  [line 209]

The layout type to be used in this container. If not specified, a default PhpExt_Layout_ContainerLayout will be created and used.

Valid values are: PhpExt_Layout_AccordionLayout, PhpExt_Layout_Anchor, PhpExt_Layout_Border, PhpExt_Layout_Card, PhpExt_Layout_Column, PhpExt_Layout_Fit, PhpExt_Layout_Form and PhpExt_Layout_Table. Specific config values for the chosen layout type can be specified using setLayoutConfig().

Parameters:
PhpExt_Layout_ContainerLayout   $value: 

API Tags:
Access:  public
Uses:  PhpExt_Layout_Fit
Uses:  PhpExt_Layout_Form
Uses:  PhpExt_Layout_Table
Uses:  PhpExt_Layout_ContainerLayout
Uses:  PhpExt_Layout_Column
Uses:  PhpExt_Layout_Anchor
Uses:  PhpExt_Layout_Border
Uses:  PhpExt_Layout_Card
Uses:  PhpExt_Layout_AccordionLayout


Redefined in descendants as:

[ Top ]
setMonitorResize  [line 240]

  PhpExt_Container setMonitorResize( boolean $value  )

True to automatically monitor window resize events to handle anything that is sensitive to the current size of the viewport. This value is typically managed by the chosen layout and should not need to be set manually.

Parameters:
boolean   $value: 

API Tags:
Access:  public


Redefined in descendants as:

[ Top ]

Documentation generated on Fri, 08 Aug 2008 15:52:07 -0500 by phpDocumentor 1.4.0