PHP 클래스 Prado\Web\UI\ActiveControls\TCallbackClientScript

The TCallbackClientScript class provides corresponding methods that can be executed on the client-side (i.e. the browser client that is viewing the page) during a callback response. The available methods includes setting/clicking input elements, changing Css styles, hiding/showing elements, and adding visual effects to elements on the page. The client-side methods can be access through the CallbackClient property available in TPage. For example, to hide "$myTextBox" element during callback response, do $this->getPage()->getCallbackClient()->hide($myTextBox); To call a specific jQuery method on an element, use the {@link jQuery} method: simple example: focus a textbox $this->getCallbackClient()->jQuery($myTextBox, 'focus'); complex example: resize a textbox using an animation $this->getCallbackClient()->jQuery($myTextBox, 'animate', array( array( 'width' => '+=100', 'height' => '+=50' ), array('duration' => 1000) )); To call a jQueryUI effect on an element, use the {@link juiEffect} method: simple example: focus a textbox $this->getCallbackClient()->juiEffect($myTextBox, 'highlight'); In order to use the jQueryUI effects, the jqueryui script must be registered: $this->getPage()->getClientScript()->registerPradoScript('jqueryui');
부터: 3.1
상속: extends Prado\TApplicationComponent
파일 보기 프로젝트 열기: pradosoft/prado

공개 메소드들

메소드 설명
__construct ( ) Constructor.
addCssClass ( $element, $cssClass ) Add a Css class name to the element.
appear ( $element, $options = [] ) Alias of fadeIn()
appendContent ( $element, $content ) Append a HTML fragement to the element.
appendScriptBlock ( $content ) Appends a block of inline javascript enclosed in a boundary.
blind ( $element, $options = [] ) Visual Effect: Blind.
blindDown ( $element, $options = [] ) Alias of blind(), presets the direction to 'down'
blindUp ( $element, $options = [] ) Alias of blind(), presets the direction to 'up'
callClientFunction ( $function, $params = [] ) Executes a client-side statement.
check ( $checkbox, $checked = true ) Client script to check or uncheck a checkbox or radio button.
click ( $control ) Client script to click on an element. This client-side function is unpredictable.
drop ( $element, $options = [] ) Visual Effect: Drop out.
dropOut ( $element, $options = [] ) Alias of drop()
evaluateScript ( $writer ) Evaluate a block of javascript enclosed in a boundary.
fade ( $element, $options = [] ) Alias of fadeOut()
fadeIn ( $element, $options = [] ) Visual Effect: Gradually make the element appear.
fadeOut ( $element, $options = [] ) Visual Effect: Gradually fade the element.
fadeTo ( $element, $value, $duration = 500 ) Set the opacity on a html element or control.
focus ( $element ) Focus on a particular element.
fold ( $element, $options = [] ) Visual Effect: Fold.
getClientFunctionsToExecute ( ) : array
grow ( $element, $options = [] ) Alias of size()
hide ( $element ) Hides an element by changing its CSS display style to "none".
highlight ( $element, $options = [] ) Visual Effect: High light the element for about 2 seconds.
insertContentAfter ( $element, $content ) Insert a HTML fragement after the element.
insertContentBefore ( $element, $content ) Insert a HTML fragement in before the element.
jQuery ( $element, $method, $params = [] ) Executes a jQuery client-side method over an element.
juiEffect ( $element, $effect, $options = [] ) Add a jQuery-ui effect the element.
prependContent ( $element, $content ) Prepend a HTML fragement to the element.
puff ( $element, $options = [] ) Visual Effect: Gradually grow and fade the element.
pulsate ( $element, $options = [] ) Visual Effect: Pulsate.
raiseClientEvent ( $control, $eventName ) Raise the client side event (given by $eventName) on a particular element.
remove ( $element ) Removes an element from the HTML page.
removeCssClass ( $element, $cssClass ) Remove a Css class name from the element.
replaceContent ( $element, $content, $self = true ) Replace the content of an element with new content contained in writer.
scale ( $element, $options = [] ) Visual Effect: Scale the element.
scrollTo ( $element, $options = [] ) Scroll the top of the browser viewing area to the location of the element.
select ( $control, $method = 'Value', $value = null, $type = null ) Client script to select/clear/check a drop down list, check box list, or radio button list.
setAttribute ( $control, $name, $value ) Sets the attribute of a particular control.
setListItems ( $control, $items ) Sets the options of a select input element.
setOpacity ( $element, $value ) Alias of fadeTo()
setStyle ( $element, $styles ) Sets the style of element. The style must be a key-value array where the key is the style property and the value is the style value.
setValue ( $input, $text ) Client script to set the value of a particular input element.
shake ( $element, $options = [] ) Visual Effect: Shake the element.
show ( $element ) Shows an element by changing its CSS display style as empty.
shrink ( $element, $options = [] ) Alias of scale()
size ( $element, $options = [] ) Visual Effect: Gradually make an element grow to a predetermined size.
slideDown ( $element, $options = [] ) Visual Effect: Slide down.
slideUp ( $element, $options = [] ) Visual Effect: Slide up.
squish ( $element, $options = [] ) Alias of scale()
switchOff ( $element, $options = [] ) Alias of scale()
toggle ( $element, $effect = null, $options = [] ) Toggles the visibility of the element.
update ( $element, $content ) Update the element's innerHTML with new content.
visualEffect ( $type, $element, $options = [] ) Add a visual effect the element.

보호된 메소드들

메소드 설명
replace ( $element, $content, $self ) Replace the content of an element with new content. The new content can be a string or a TControl component. If the content parameter is a TControl component, its rendered method will be called and its contents will be used for replacement.

비공개 메소드들

메소드 설명
getRenderedContentBoundary ( $control ) : string Renders the control and return the content boundary from TCallbackResponseWriter. This method should only be used by framework component developers. The render() method is defered to be called in the TActivePageAdapter class.
getResponseContentBoundary ( $html ) : string
getSelectionControlIsListType ( $control )
getSelectionControlType ( $control )

메소드 상세

__construct() 공개 메소드

Constructor.
public __construct ( )

addCssClass() 공개 메소드

Add a Css class name to the element.
public addCssClass ( $element, $cssClass )

appear() 공개 메소드

Alias of fadeIn()
사용 중단: since 3.4
public appear ( $element, $options = [] )

appendContent() 공개 메소드

Append a HTML fragement to the element.
public appendContent ( $element, $content )

appendScriptBlock() 공개 메소드

Similar to to evaluateScript(), but functions declared in the inline block will be available to page elements.
public appendScriptBlock ( $content )

blind() 공개 메소드

This effect needs jQueryUI.
public blind ( $element, $options = [] )

blindDown() 공개 메소드

Alias of blind(), presets the direction to 'down'
사용 중단: since 3.4
public blindDown ( $element, $options = [] )

blindUp() 공개 메소드

Alias of blind(), presets the direction to 'up'
사용 중단: since 3.4
public blindUp ( $element, $options = [] )

callClientFunction() 공개 메소드

Executes a client-side statement.
public callClientFunction ( $function, $params = [] )

check() 공개 메소드

Client script to check or uncheck a checkbox or radio button.
public check ( $checkbox, $checked = true )

click() 공개 메소드

Client script to click on an element. This client-side function is unpredictable.
public click ( $control )

drop() 공개 메소드

This effect needs jQueryUI.
public drop ( $element, $options = [] )

dropOut() 공개 메소드

Alias of drop()
사용 중단: since 3.4
public dropOut ( $element, $options = [] )

evaluateScript() 공개 메소드

Evaluate a block of javascript enclosed in a boundary.
public evaluateScript ( $writer )

fade() 공개 메소드

Alias of fadeOut()
사용 중단: since 3.4
public fade ( $element, $options = [] )

fadeIn() 공개 메소드

This effect doesn't need jQueryUI.
public fadeIn ( $element, $options = [] )

fadeOut() 공개 메소드

This effect doesn't need jQueryUI.
public fadeOut ( $element, $options = [] )

fadeTo() 공개 메소드

This effect doesn't need jQueryUI.
public fadeTo ( $element, $value, $duration = 500 )

focus() 공개 메소드

Focus on a particular element.
public focus ( $element )

fold() 공개 메소드

This effect needs jQueryUI.
public fold ( $element, $options = [] )

getClientFunctionsToExecute() 공개 메소드

public getClientFunctionsToExecute ( ) : array
리턴 array list of client function to be executed during callback response.

grow() 공개 메소드

Alias of size()
사용 중단: since 3.4
public grow ( $element, $options = [] )

hide() 공개 메소드

Hides an element by changing its CSS display style to "none".
public hide ( $element )

highlight() 공개 메소드

This effect needs jQueryUI.
public highlight ( $element, $options = [] )

insertContentAfter() 공개 메소드

Insert a HTML fragement after the element.
public insertContentAfter ( $element, $content )

insertContentBefore() 공개 메소드

Insert a HTML fragement in before the element.
public insertContentBefore ( $element, $content )

jQuery() 공개 메소드

Executes a jQuery client-side method over an element.
public jQuery ( $element, $method, $params = [] )

juiEffect() 공개 메소드

This method needs jQueryUI.
public juiEffect ( $element, $effect, $options = [] )

prependContent() 공개 메소드

Prepend a HTML fragement to the element.
public prependContent ( $element, $content )

puff() 공개 메소드

This effect needs jQueryUI.
public puff ( $element, $options = [] )

pulsate() 공개 메소드

This effect needs jQueryUI.
public pulsate ( $element, $options = [] )

raiseClientEvent() 공개 메소드

Raise the client side event (given by $eventName) on a particular element.
public raiseClientEvent ( $control, $eventName )

remove() 공개 메소드

Removes an element from the HTML page.
public remove ( $element )

removeCssClass() 공개 메소드

Remove a Css class name from the element.
public removeCssClass ( $element, $cssClass )

replace() 보호된 메소드

Replace the content of an element with new content. The new content can be a string or a TControl component. If the content parameter is a TControl component, its rendered method will be called and its contents will be used for replacement.
또한 보기: insertAbout
또한 보기: insertBelow
또한 보기: insertBefore
또한 보기: insertAfter
protected replace ( $element, $content, $self )

replaceContent() 공개 메소드

Replace the content of an element with new content contained in writer.
public replaceContent ( $element, $content, $self = true )

scale() 공개 메소드

This effect needs jQueryUI.
public scale ( $element, $options = [] )

scrollTo() 공개 메소드

Scroll the top of the browser viewing area to the location of the element.
public scrollTo ( $element, $options = [] )

select() 공개 메소드

The second parameter determines the selection method. Valid methods are - Value, select or check by value - Values, select or check by a list of values - Index, select or check by index (zero based index) - Indices, select or check by a list of index (zero based index) - Clear, clears or selections or checks in the list - All, select all - Invert, invert the selection.
public select ( $control, $method = 'Value', $value = null, $type = null )

setAttribute() 공개 메소드

Sets the attribute of a particular control.
public setAttribute ( $control, $name, $value )

setListItems() 공개 메소드

Sets the options of a select input element.
public setListItems ( $control, $items )

setOpacity() 공개 메소드

Alias of fadeTo()
사용 중단: since 3.4
public setOpacity ( $element, $value )

setStyle() 공개 메소드

Sets the style of element. The style must be a key-value array where the key is the style property and the value is the style value.
public setStyle ( $element, $styles )

setValue() 공개 메소드

Client script to set the value of a particular input element.
public setValue ( $input, $text )

shake() 공개 메소드

This effect needs jQueryUI.
public shake ( $element, $options = [] )

show() 공개 메소드

Shows an element by changing its CSS display style as empty.
public show ( $element )

shrink() 공개 메소드

Alias of scale()
사용 중단: since 3.4
public shrink ( $element, $options = [] )

size() 공개 메소드

This effect needs jQueryUI.
public size ( $element, $options = [] )

slideDown() 공개 메소드

This effect doesn't need jQueryUI.
public slideDown ( $element, $options = [] )

slideUp() 공개 메소드

This effect doesn't need jQueryUI.
public slideUp ( $element, $options = [] )

squish() 공개 메소드

Alias of scale()
사용 중단: since 3.4
public squish ( $element, $options = [] )

switchOff() 공개 메소드

Alias of scale()
사용 중단: since 3.4
public switchOff ( $element, $options = [] )

toggle() 공개 메소드

Toggles the visibility of the element.
public toggle ( $element, $effect = null, $options = [] )

update() 공개 메소드

Update the element's innerHTML with new content.
public update ( $element, $content )

visualEffect() 공개 메소드

Add a visual effect the element.
public visualEffect ( $type, $element, $options = [] )