| Methods |
public
|
jsExecute(): JsBlock
|
#
|
public
|
setConfirm(string $text = 'Are you sure?'): void
Set a confirmation to be displayed before actually sending a request.
Set a confirmation to be displayed before actually sending a request.
|
#
|
public
|
set(
Closure(Jquery, mixed, mixed, mixed, mixed, mixed, mixed, mixed, mixed, mixed, mixed): (JsExpressionable|View|string|void) $fx = null,
$args = null,
): $this
Executes user-specified action when callback is triggered.
Executes user-specified action when callback is triggered.
Overrides
Overriden by
|
#
|
public
|
terminateAjax(string|null $ajaxec, ($success is true ? null : string) $msg = null, bool $success = true): void
A proper way to finish execution of AJAX response. Generates JSON
which is returned to frontend.
A proper way to finish execution of AJAX response. Generates JSON
which is returned to frontend.
Parameters
| $msg |
General message, typically won't be displayed
|
| $success |
Was request successful or not
|
Overriden by
|
#
|
public
|
getAjaxec(JsExpressionable|View|string|null $response, JsChain $chain = null): string
Provided with a $response from callbacks convert it into a JavaScript code.
Provided with a $response from callbacks convert it into a JavaScript code.
Parameters
| $response |
response from callbacks,
|
|
#
|
public
|
getUrl(string $mode = 'callback'): string
Return URL that will trigger action on this callback. If you intend to request
the URL loading from inside JavaScript,…
Return URL that will trigger action on this callback. If you intend to request
the URL loading from inside JavaScript, it's always advised to use getJsUrl instead.
Overrides
|
#
|
private
|
_getProperAction(View|string|JsExpressionable $response): JsExpressionable
Transform response into proper JS Action and return it.
Transform response into proper JS Action and return it.
|
#
|
private
|
_jsRenderIntoModal(View $response): JsExpressionable
|
#
|