Ubiquity 2.5.2
php rapid development framework
Loading...
Searching...
No Matches
CRUDEvents.php
Go to the documentation of this file.
1<?php
2
4
5use Ajax\semantic\widgets\datatable\DataTable;
6
7class CRUDEvents {
8 protected $controller;
9
10 public function __construct($controller) {
11 $this->controller = $controller;
12 }
13
21 public function onSuccessDeleteMessage(CRUDMessage $message, $instance): CRUDMessage {
22 return $message;
23 }
24
32 public function onErrorDeleteMessage(CRUDMessage $message, $instance): CRUDMessage {
33 return $message;
34 }
35
43 public function onConfDeleteMessage(CRUDMessage $message, $instance): CRUDMessage {
44 return $message;
45 }
46
54 public function onSuccessUpdateMessage(CRUDMessage $message, $instance): CRUDMessage {
55 return $message;
56 }
57
65 public function onErrorUpdateMessage(CRUDMessage $message, $instance): CRUDMessage {
66 return $message;
67 }
68
76 public function onNotFoundMessage(CRUDMessage $message, $ids): CRUDMessage {
77 return $message;
78 }
79
85 public function beforeLoadView($viewName, &$vars) {
86 }
87
95 public function onDisplayElements($dataTable, $objects, $refresh) {
96 }
97
98 public function onSuccessDeleteMultipleMessage(CRUDMessage $message, $instance): CRUDMessage {
99 return $message;
100 }
101
103 return $message;
104 }
105
106 public function onConfDeleteMultipleMessage(CRUDMessage $message, $data): CRUDMessage {
107 return $message;
108 }
109
116 public function onNewInstance(object $instance) {
117 }
118
125 public function onBeforeUpdate(object $instance, bool $isNew) {
126 }
127
134 public function onBeforeUpdateRequest(array &$requestValues, bool $isNew) {
135 }
136}
137
onConfDeleteMultipleMessage(CRUDMessage $message, $data)
onNewInstance(object $instance)
Triggered when a new instance is created before rendering in the form.
onSuccessUpdateMessage(CRUDMessage $message, $instance)
Returns the message displayed when an instance is added or inserted.
onDisplayElements($dataTable, $objects, $refresh)
Triggered after displaying objects in dataTable.
onBeforeUpdate(object $instance, bool $isNew)
Triggered before the instance updating (insert or update).
onErrorDeleteMultipleMessage(CRUDMessage $message)
onConfDeleteMessage(CRUDMessage $message, $instance)
Returns the confirmation message displayed before deleting an instance.
onNotFoundMessage(CRUDMessage $message, $ids)
Returns the message displayed when an instance does not exist.
onSuccessDeleteMessage(CRUDMessage $message, $instance)
Returns the message displayed after a deletion.
onSuccessDeleteMultipleMessage(CRUDMessage $message, $instance)
onErrorUpdateMessage(CRUDMessage $message, $instance)
Returns the message displayed when an error occurred when updating or inserting.
onBeforeUpdateRequest(array &$requestValues, bool $isNew)
Triggered before the instance updating, for POST values updating (insert or update).
onErrorDeleteMessage(CRUDMessage $message, $instance)
Returns the message displayed when an error occurred when deleting.