PHP Class Prado\Web\UI\ActiveControls\TDropContainer

Warning: this class is deprecatd and will be removed in a future release. We suggest you to investigate using {@link TJuiDroppable} instead. When a TDraggable component is dropped into a TDropContainer, the {@link OnDrop OnDrop} event is raised. The {@link TDropContainerEventParameter} param will contain the dropped control. Properties : {@link setAcceptCssClass AcceptCssClass} : a coma delimited classname of elements that the drop container can accept. {@link setHoverCssClass HoverCssClass}: CSS classname of the container when a draggable element hovers over the container. Events: {@link OnDrop OnDrop} : raised when a TDraggable control is dropped. The dropped control id is encapsulated in the event parameter, as well as mouse coordinates and key modifiers status
Deprecation: Use TJuiDroppable instead
Author: Christophe BOULAIN ([email protected])
Inheritance: extends Prado\Web\UI\WebControls\TPanel, implements Prado\Web\UI\ActiveControls\IActiveControl, implements Prado\Web\UI\ActiveControls\ICallbackEventHandler
Datei anzeigen Open project: pradosoft/prado

Public Methods

Method Description
__construct ( ) Creates a new callback control, sets the adapter to TActiveControlAdapter. If you override this class, be sure to set the adapter appropriately by, for example, by calling this constructor.
createChildControls ( ) Creates child control Override parent implementation to create a container which will contain all child controls. This container will be a TActivePanel, in order to allow user to update its content on callback.
getAcceptCssClass ( ) : string Gets the Css class name that this container can accept.
getActiveControl ( ) : TBaseActiveControl
getClientSide ( ) : TCallbackClientSide
getControls ( ) : TControlCollection Override parent implementation to return the container control collection.
getHoverCssClass ( ) : string Gets the Css class name used when a draggble element is hovering over this container.
onCallback ( $param ) This method is invoked when a callback is requested. The method raises 'OnCallback' event to fire up the event handlers. If you override this method, be sure to call the parent implementation so that the event handler can be invoked.
onDrop ( $dropParams ) Raises the onDrop event.
onPreRender ( $param ) Registers clientscripts
raiseCallbackEvent ( $param ) Raises callback event. This method is required bu {@link ICallbackEventHandler} interface.
render ( $writer ) Renders and replaces the panel's content on the client-side.
setAcceptCssClass ( $value ) Sets the Css class name that this container can accept.
setHoverCssClass ( $value ) Sets the Css class name used when a draggble element is hovering over this container.

Protected Methods

Method Description
addAttributesToRender ( $writer ) Ensure that the ID attribute is rendered and registers the javascript code for initializing the active control.
getClientClassName ( ) : string Gets the name of the javascript class responsible for performing postback for this control.
getPostBackOptions ( ) : array Gets the post back options for this textbox.

Method Details

__construct() public method

Creates a new callback control, sets the adapter to TActiveControlAdapter. If you override this class, be sure to set the adapter appropriately by, for example, by calling this constructor.
public __construct ( )

addAttributesToRender() protected method

Ensure that the ID attribute is rendered and registers the javascript code for initializing the active control.
protected addAttributesToRender ( $writer )

createChildControls() public method

Creates child control Override parent implementation to create a container which will contain all child controls. This container will be a TActivePanel, in order to allow user to update its content on callback.
public createChildControls ( )

getAcceptCssClass() public method

Gets the Css class name that this container can accept.
public getAcceptCssClass ( ) : string
return string

getActiveControl() public method

public getActiveControl ( ) : TBaseActiveControl
return TBaseActiveControl standard active control options.

getClientClassName() protected method

This method overrides the parent implementation.
protected getClientClassName ( ) : string
return string the javascript class name

getClientSide() public method

public getClientSide ( ) : TCallbackClientSide
return TCallbackClientSide client side request options.

getControls() public method

Override parent implementation to return the container control collection.
public getControls ( ) : TControlCollection
return TControlCollection

getHoverCssClass() public method

Gets the Css class name used when a draggble element is hovering over this container.
public getHoverCssClass ( ) : string
return string css class name during draggable hover.

getPostBackOptions() protected method

Gets the post back options for this textbox.
protected getPostBackOptions ( ) : array
return array

onCallback() public method

This method is invoked when a callback is requested. The method raises 'OnCallback' event to fire up the event handlers. If you override this method, be sure to call the parent implementation so that the event handler can be invoked.
public onCallback ( $param )

onDrop() public method

The drop parameters are encapsulated into a {@link TDropContainerEventParameter}
public onDrop ( $dropParams )

onPreRender() public method

This method overrides the parent implementation and is invoked before render.
public onPreRender ( $param )

raiseCallbackEvent() public method

It raises the {@link onDrop OnDrop} event, then, the {@link onCallback OnCallback} event This method is mainly used by framework and control developers.
public raiseCallbackEvent ( $param )

render() public method

When render() is called before the OnPreRender event, such as when render() is called during a callback event handler, the rendering is defered until OnPreRender event is raised.
public render ( $writer )

setAcceptCssClass() public method

Sets the Css class name that this container can accept.
public setAcceptCssClass ( $value )

setHoverCssClass() public method

Sets the Css class name used when a draggble element is hovering over this container.
public setHoverCssClass ( $value )