...
Action methods should accept the event data argument, containing input from the UI (e.g. attributes, item id, etc.).
Code example
Code Block | ||
---|---|---|
| ||
class BasicappPanelActions extends \Innomatic\Desktop\Panel\PanelActions { public function __construct(\Innomatic\Desktop\Panel\PanelController $controller) { parent::__construct($controller); } public function beginHelper() {} public function endHelper() {} public function executeDeleteItem($eventData) { $this->dataAccess->execute(‘DELETE FROM my_items WHERE ID=‘.$eventData[‘id’]); } } |
...
Helpers
The panel view actions also supports a begin and end helper that are called just before and after a view is executed.
Code Block | ||
---|---|---|
| ||
public function beginHelper() { $this->localeCatalog = new \Innomatic\Locale\LocaleCatalog( 'example-basic-app::panel', $this->container->getCurrentUser()->getLanguage() ); } public function endHelper() { } |