File tree Expand file tree Collapse file tree 3 files changed +84
-0
lines changed Expand file tree Collapse file tree 3 files changed +84
-0
lines changed Original file line number Diff line number Diff line change @@ -971,6 +971,14 @@ ibexa.notifications.delete:
971
971
requirements :
972
972
notificationId : ' \d+'
973
973
974
+ ibexa.notifications.delete :
975
+ path : /notification/delete/{notificationId}
976
+ defaults :
977
+ _controller : ' Ibexa\Bundle\AdminUi\Controller\NotificationController::deleteNotificationAction'
978
+ methods : [ GET ]
979
+ requirements :
980
+ notificationId : ' \d+'
981
+
974
982
ibexa.asset.upload_image :
975
983
path : /asset/image
976
984
options :
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ /**
4
+ * @copyright Copyright (C) Ibexa AS. All rights reserved.
5
+ * @license For full copyright and license information view LICENSE file distributed with this source code.
6
+ */
7
+ declare (strict_types=1 );
8
+
9
+ namespace Ibexa \AdminUi \Form \Data \Notification ;
10
+
11
+ class NotificationRemoveData
12
+ {
13
+ private array $ notifications ;
14
+
15
+ public function __construct (array $ notifications = [])
16
+ {
17
+ $ this ->notifications = $ notifications ;
18
+ }
19
+
20
+ public function getNotifications (): array
21
+ {
22
+ return $ this ->notifications ;
23
+ }
24
+
25
+ public function setNotifications (array $ notifications ): void
26
+ {
27
+ $ this ->notifications = $ notifications ;
28
+ }
29
+ }
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ /**
4
+ * @copyright Copyright (C) Ibexa AS. All rights reserved.
5
+ * @license For full copyright and license information view LICENSE file distributed with this source code.
6
+ */
7
+ declare (strict_types=1 );
8
+
9
+ namespace Ibexa \AdminUi \Form \Type \Notification ;
10
+
11
+ use Ibexa \AdminUi \Form \Data \Notification \NotificationRemoveData ;
12
+ use Symfony \Component \Form \AbstractType ;
13
+ use Symfony \Component \Form \Extension \Core \Type \CheckboxType ;
14
+ use Symfony \Component \Form \Extension \Core \Type \CollectionType ;
15
+ use Symfony \Component \Form \Extension \Core \Type \SubmitType ;
16
+ use Symfony \Component \Form \FormBuilderInterface ;
17
+ use Symfony \Component \OptionsResolver \OptionsResolver ;
18
+
19
+ class NotificationRemoveType extends AbstractType
20
+ {
21
+ public function buildForm (FormBuilderInterface $ builder , array $ options ): void
22
+ {
23
+ $ builder ->add (
24
+ 'notifications ' ,
25
+ CollectionType::class,
26
+ [
27
+ 'entry_type ' => CheckboxType::class,
28
+ 'required ' => false ,
29
+ 'allow_add ' => true ,
30
+ 'entry_options ' => ['label ' => false ],
31
+ 'label ' => false ,
32
+ ]
33
+ );
34
+
35
+ $ builder ->add (
36
+ 'remove ' ,
37
+ SubmitType::class
38
+ );
39
+ }
40
+
41
+ public function configureOptions (OptionsResolver $ resolver ): void
42
+ {
43
+ $ resolver ->setDefaults ([
44
+ 'data_class ' => NotificationRemoveData::class,
45
+ ]);
46
+ }
47
+ }
You can’t perform that action at this time.
0 commit comments