silverorange Code


Swat.SwatReplicableContainer
/Swat/SwatReplicableContainer.php at line 15

Class SwatReplicableContainer

SwatObject
└─SwatUIObject
└─SwatWidget
└─SwatContainer
└─SwatDisplayableContainer
└─SwatReplicableContainer
All Implemented Interfaces:
SwatReplicable

public class SwatReplicableContainer
extends SwatDisplayableContainer

A container that replicates itself and its children

Copyright:
2005-2007 silverorange
License:
http://www.gnu.org/copyleft/lesser.html LGPL License 2.1

Field Summary
array

$replication_ids

An array of unique ids, one for each replication.

array

$replicators

An array of unique id => title pairs, one for each replication.

Constructor Summary

SwatReplicableContainer(string id)

Creates a new replicator container.

Method Summary
void

addReplication(mixed id)

SwatWidget

getWidget(string widget_id, string replicator_id)

Retrives a reference to a replicated widget.

void

init()

Initilizes this replicable container.

Methods inherited from Swat.SwatDisplayableContainer
display, getCSSClassNames
Methods inherited from Swat.SwatContainer
add, addChild, copy, display, displayChildren, getChild, getChildren, getDescendantStates, getDescendants, getFirst, getFirstDescendant, getFocusableHtmlId, getHtmlHeadEntrySet, getMessages, hasMessage, init, notifyOfAdd, packEnd, packStart, printWidgetTree, process, remove, replace, sendAddNotifySignal, setDescendantStates
Methods inherited from Swat.SwatWidget
addCompositeWidget, addMessage, confirmCompositeWidgets, copy, createCompositeWidgets, display, displayHtmlHeadEntries, getCSSClassNames, getCompositeWidget, getCompositeWidgets, getFocusableHtmlId, getHtmlHeadEntrySet, getMessages, hasMessage, init, isDisplayed, isInitialized, isProcessed, isSensitive, printWidgetTree, process, replaceWithContainer
Methods inherited from Swat.SwatUIObject
addComment, addJavaScript, addStyleSheet, addTangoAttribution, copy, getCSSClassNames, getCSSClassString, getFirstAncestor, getHtmlHeadEntrySet, getInlineJavaScript, getUniqueId, isVisible

Field Detail

/Swat/SwatReplicableContainer.php at line 40

replication_ids

public array $replication_ids = null

An array of unique ids, one for each replication

The ids are used to suffix the original widget ids to create unique ids for the replicated widgets.


/Swat/SwatReplicableContainer.php at line 30

replicators

public array $replicators = null

An array of unique id => title pairs, one for each replication

The ids are used to suffix the original widget ids to create unique ids for the replicated widgets. Some sub-classes use the titles on containers such as fieldsets which surround the replicated widgets.

Deprecated:
Use a SwatReplicableContainer::$replication_ids instead

Constructor Detail

/Swat/SwatReplicableContainer.php at line 58

SwatReplicableContainer

public SwatReplicableContainer(string id)

Creates a new replicator container

Parameters:
id - a non-visible unique id for this widget.
See Also:
SwatWidget::__construct()

Method Detail

/Swat/SwatReplicableContainer.php at line 95

addReplication

public void addReplication(mixed id)

/Swat/SwatReplicableContainer.php at line 133

getWidget

public SwatWidget getWidget(string widget_id, string replicator_id)

Retrives a reference to a replicated widget

Parameters:
widget_id - the unique id of the original widget
replicator_id - the replicator id of the replicated widget
Returns:
a reference to the replicated widget, or null if the widget is not found.

/Swat/SwatReplicableContainer.php at line 73

init

public void init()

Initilizes this replicable container

Goes through the internal widgets, clones them, and adds them to the widget tree.

See Also:
SwatWidget::init()

silverorange Code