Skip to content

Commit

Permalink
Version update
Browse files Browse the repository at this point in the history
version update
  • Loading branch information
bigrocs committed Sep 18, 2017
1 parent ae8469e commit 4c1f4bb
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 22 deletions.
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
],
"require": {
"php": "~5.6|~7.0",
"corecmf/admin": "1.1.*",
"corecmf/admin": "1.3.*",
"ignited/laravel-omnipay": "2.*",
"lokielse/omnipay-alipay": "2.*"
},
Expand All @@ -45,7 +45,7 @@
},
"extra": {
"branch-alias": {
"dev-master": "1.1-dev"
"dev-master": "1.3.1-dev"
}
},
"config": {
Expand Down
28 changes: 8 additions & 20 deletions src/Http/Listeners/OmnipayEventSubscriber.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,35 +2,23 @@

namespace CoreCMF\Omnipay\Http\Listeners;

use CoreCMF\Omnipay\Http\Models\Config;
/**
* [SocialiteEventSubscriber 社会登录事件订阅者]
* [OmnipayEventSubscriber 支付扩展包订阅器]
*/
class OmnipayEventSubscriber
{
private $configModel;

public function __construct(Config $configPro){
$this->configModel = $configPro;
}
/**
* [onBuilderTablePackage 后台模型table渲染处理]
* @param [type] $event [description]
* @return [type] [description]
*/
public function onBuilderTablePackage($event)
public function onAdminMain($event)
{
$table = $event->table;
if ($table->event == 'package') {
$table->data->transform(function ($item, $key) {
if ($item->name == 'Omnipay') {
// $item->rightButton = [
// ['title'=>'云存储管理','apiUrl'=> route('api.omnipay.config.index'),'type'=>'info', 'icon'=>'fa fa-edit']
// ];
}
return $item;
});
}
// $main = $event->main;
// if ($main->event == 'AdminMain') {
// // dd($main);
// }
}
/**
* 为订阅者注册监听器.
Expand All @@ -40,8 +28,8 @@ public function onBuilderTablePackage($event)
public function subscribe($events)
{
$events->listen(
'CoreCMF\Core\Events\BuilderTable',
'CoreCMF\Omnipay\Http\Listeners\OmnipayEventSubscriber@onBuilderTablePackage'
'CoreCMF\Core\Support\Events\BuilderMain',
'CoreCMF\Omnipay\Http\Listeners\OmnipayEventSubscriber@onAdminMain'
);
}

Expand Down

0 comments on commit 4c1f4bb

Please sign in to comment.