22
33namespace CoreCMF \Omnipay \Http \Listeners ;
44
5- use CoreCMF \Omnipay \Http \Models \Config ;
65/**
7- * [SocialiteEventSubscriber 社会登录事件订阅者 ]
6+ * [OmnipayEventSubscriber 支付扩展包订阅器 ]
87 */
98class OmnipayEventSubscriber
109{
11- private $ configModel ;
1210
13- public function __construct (Config $ configPro ){
14- $ this ->configModel = $ configPro ;
15- }
1611 /**
1712 * [onBuilderTablePackage 后台模型table渲染处理]
1813 * @param [type] $event [description]
1914 * @return [type] [description]
2015 */
21- public function onBuilderTablePackage ($ event )
16+ public function onAdminMain ($ event )
2217 {
23- $ table = $ event ->table ;
24- if ($ table ->event == 'package ' ) {
25- $ table ->data ->transform (function ($ item , $ key ) {
26- if ($ item ->name == 'Omnipay ' ) {
27- // $item->rightButton = [
28- // ['title'=>'云存储管理','apiUrl'=> route('api.omnipay.config.index'),'type'=>'info', 'icon'=>'fa fa-edit']
29- // ];
30- }
31- return $ item ;
32- });
33- }
18+ // $main = $event->main;
19+ // if ($main->event == 'AdminMain') {
20+ // // dd($main);
21+ // }
3422 }
3523 /**
3624 * 为订阅者注册监听器.
@@ -40,8 +28,8 @@ public function onBuilderTablePackage($event)
4028 public function subscribe ($ events )
4129 {
4230 $ events ->listen (
43- 'CoreCMF\Core\Events\BuilderTable ' ,
44- 'CoreCMF\Omnipay\Http\Listeners\OmnipayEventSubscriber@onBuilderTablePackage '
31+ 'CoreCMF\Core\Support\ Events\BuilderMain ' ,
32+ 'CoreCMF\Omnipay\Http\Listeners\OmnipayEventSubscriber@onAdminMain '
4533 );
4634 }
4735
0 commit comments