Skip to content

Commit

Permalink
Services类handle传引用改为传值
Browse files Browse the repository at this point in the history
  • Loading branch information
王正东 committed Jan 28, 2021
1 parent a63c0c5 commit 1321928
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 17 deletions.
9 changes: 5 additions & 4 deletions classes/Services/AdminPurviewService.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

namespace Ecjia\App\Maintain\Services;


Expand All @@ -13,11 +14,11 @@ class AdminPurviewService
* @param $options
* @return array
*/
public function handle(& $options)
public function handle($options)
{
$purviews = array(
array('action_name' => __('运维工具管理', 'maintain'), 'action_code' => 'maintain_manage', 'relevance' => ''),
array('action_name' => __('日志查看管理', 'maintain'), 'action_code' => 'logviewer_manage', 'relevance' => ''),
$purviews = array(
array('action_name' => __('运维工具管理', 'maintain'), 'action_code' => 'maintain_manage', 'relevance' => ''),
array('action_name' => __('日志查看管理', 'maintain'), 'action_code' => 'logviewer_manage', 'relevance' => ''),
);
return $purviews;
}
Expand Down
6 changes: 3 additions & 3 deletions classes/Services/PluginInstallService.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,10 @@ class PluginInstallService
{
/**
* @param $options
* @throws \Exception
* @return bool
* @throws \Exception
*/
public function handle(& $options)
public function handle($options)
{
if (!(isset($options['file']) && isset($options['config']))) {
return ecjia_plugin::add_error('plugin_install_error', __('插件安装卸载必要参数不全', 'maintain'));
Expand All @@ -79,7 +79,7 @@ public function handle(& $options)
ecjia_admin::admin_log($installer->getConfigByKey('maintain_code'), 'install', 'maintain');

return true;
}
}
}

// end
8 changes: 4 additions & 4 deletions classes/Services/PluginMenuService.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,12 @@ class PluginMenuService
* @param $options
* @return mixed
*/
public function handle(& $options)
public function handle($options)
{
$menus = ecjia_admin::make_admin_menu('maintain_list', __('运维工具', 'maintain'), RC_Uri::url('maintain/admin/init'), 41)->add_purview('maintain_manage')->add_base('maintain');
$menus = ecjia_admin::make_admin_menu('maintain_list', __('运维工具', 'maintain'), RC_Uri::url('maintain/admin/init'), 41)->add_purview('maintain_manage')->add_base('maintain');

return $menus;
}
return $menus;
}
}

// end
4 changes: 2 additions & 2 deletions classes/Services/PluginUninstallService.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ class PluginUninstallService
* @param $options
* @return bool
*/
public function handle(& $options)
public function handle($options)
{
if (!(isset($options['file']) && isset($options['config']))) {
return ecjia_plugin::add_error('plugin_uninstall_error', __('插件安装卸载必要参数不全', 'maintain'));
Expand All @@ -78,7 +78,7 @@ public function handle(& $options)
ecjia_admin::admin_log($installer->getConfigByKey('maintain_code'), 'uninstall', 'maintain');

return true;
}
}
}

// end
9 changes: 5 additions & 4 deletions classes/Services/ToolMenuService.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

namespace Ecjia\App\Maintain\Services;


Expand All @@ -15,13 +16,13 @@ class ToolMenuService
* @param $options
* @return
*/
public function handle(& $options)
public function handle($options)
{

$menus = ecjia_admin::make_admin_menu('06_maintain_list', __('运维工具', 'maintain'), RC_Uri::url('maintain/admin/init'), 6)->add_purview('maintain_manage');
return $menus;

return $menus;

}
}

Expand Down

0 comments on commit 1321928

Please sign in to comment.