Class Atk4\Ui\Callback

extends AbstractView

Add this object to your render tree and it will expose a unique URL which, when executed directly will perform a PHP callback that you set().

Callback function run when triggered, i.e. when it's urlTrigger param value is present in the $_GET request. The current callback will be set within the $_GET[Callback::URL_QUERY_TARGET] and will be set to urlTrigger as well.

$button = Button::addTo($layout); $button->set('Click to do something')->link( Callback::addTo($button) ->set(function () { do_something(); }) ->getUrl() );

Located at ui/src/Callback.php
Methods
Methods inherited from Atk4\Ui\AbstractView
getOwner()
Methods used from Atk4\Core\AppScopeTrait
assertInstanceOfApp(), issetApp(), getApp(), setApp()
Methods used from Atk4\Core\ContainerTrait
_uniqueElementName(), _addContainer(), removeElement(), _shorten(), getElement(), hasElement()
Methods used from Atk4\Core\InitializerTrait
isInitialized(), assertIsInitialized(), invokeInit()
Methods used from Atk4\Core\StaticAddToTrait
_addToAdd(), addTo(), addToWithCl(), addToWithClUnsafe()
Methods used from Atk4\Core\TrackableTrait
issetOwner(), setOwner(), unsetOwner(), getDesiredName(), destroy()
Constants
Properties
Properties inherited from Atk4\Ui\AbstractView
$_addLater, $_rendered, $elements
Properties used from Atk4\Core\AppScopeTrait
$_app, $maxNameLength, $uniqueNameHashes
Properties used from Atk4\Core\ContainerTrait
$_elementNameCounts
Properties used from Atk4\Core\InitializerTrait
$_initialized
Properties used from Atk4\Core\NameTrait
$name
Properties used from Atk4\Core\TrackableTrait
$_owner, $shortName