[go: up one dir, main page]

Skip to content

Commit

Permalink
fix:backend gii template
Browse files Browse the repository at this point in the history
  • Loading branch information
liufee committed May 28, 2020
1 parent 819254c commit 9691c81
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions backend/components/gii/crud/default/controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ public function actions()
],
'create' => [
'class' => CreateAction::className(),
'create' => function($postData, $createAction) use($service){
'doCreate' => function($postData, $createAction) use($service){
return $service->create($postData);
},
'data' => function($createResultModel, $createAction) use($service){
Expand All @@ -120,7 +120,7 @@ public function actions()
'update' => [
'class' => UpdateAction::className(),
<?php if(!empty($idSign)){echo $idSign;} ?>
'update' => function(<?php if(!empty($closureIdParam)){echo $closureIdParam;echo ", ";}?>$postData, $updateAction) use($service){
'doUpdate' => function(<?php if(!empty($closureIdParam)){echo $closureIdParam;echo ", ";}?>$postData, $updateAction) use($service){
return $service->update(<?=$closureIdParam?>, $postData);
},
'data' => function(<?php if(!empty($closureIdParam)){echo $closureIdParam;echo ", ";}?>$updateResultModel, $updateAction) use($service){
Expand All @@ -133,13 +133,13 @@ public function actions()
'delete' => [
'class' => DeleteAction::className(),
<?php if(!empty($idSign)){echo $idSign;} ?>
'delete' => function(<?php if(!empty($closureIdParam)){echo $closureIdParam;echo ", ";}?>$deleteAction) use($service){
'doDelete' => function(<?php if(!empty($closureIdParam)){echo $closureIdParam;echo ", ";}?>$deleteAction) use($service){
return $service->delete(<?=$closureIdParam?>);
},
],
'sort' => [
'class' => SortAction::className(),
'sort' => function($id, $sort, $sortAction) use($service){
'doSort' => function($id, $sort, $sortAction) use($service){
return $service->sort($id, $sort);
},
],
Expand Down
2 changes: 1 addition & 1 deletion backend/components/gii/crud/default/service.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
use <?= $generator->modelClass . ";\n" ?>

class <?=$modelClass?>Service extends Service implements <?=$modelClass?>ServiceInterface{
public function getSearchModel(array $query, array $options=[])
public function getSearchModel(array $query=[], array $options=[])
{
<?php if (!empty($generator->searchModelClass)){ ?> return new <?=$searchModelClass?>();<?php }else { ?>return null;<?php } ?>

Expand Down
2 changes: 1 addition & 1 deletion common/config/main.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
return [
'name' => 'Feehi CMS',
'version' => '2.1.0',
'version' => '2.1.0.1',
'vendorPath' => dirname(dirname(__DIR__)) . '/vendor',
'aliases' => [
'@bower' => '@vendor/bower-asset',
Expand Down

0 comments on commit 9691c81

Please sign in to comment.