<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace Module\Edm\Core; use Illuminate\Events\Dispatcher; use Illuminate\Support\ServiceProvider; use ModStart\Admin\Config\AdminMenu; use ModStart\Admin\Widget\DashboardItemA; use ModStart\Core\Dao\ModelUtil; use ModStart\Layout\Row; use Module\Edm\Provider\Sender\EdmMailSenderProvider; use Module\Edm\Provider\Sender\SmtpEdmMailSenderProvider; use Module\Edm\Schedule\EdmTaskSendScheduler; use Module\Edm\Type\EdmTaskItemStatus; use Module\Vendor\Admin\Widget\AdminWidgetDashboard; use Module\Vendor\Provider\Schedule\ScheduleBiz; class ModuleServiceProvider extends ServiceProvider { public function boot(Dispatcher $W0y23) { goto zBNnm; NnVq2: ScheduleBiz::register(EdmTaskSendScheduler::class); goto ej0M0; cPNfg: AdminWidgetDashboard::registerIcon(function (Row $YhT5x) { $YhT5x->column(3, DashboardItemA::makeIconNumberTitle('iconfont icon-users', ModelUtil::count('edm_email'), '客户邮箱', modstart_admin_url('edm/email'))); $YhT5x->column(3, DashboardItemA::makeIconNumberTitle('iconfont icon-fly', ModelUtil::count('edm_task_item', array('status' => EdmTaskItemStatus::SUCCESS)), '累计发送', modstart_admin_url('edm/task_item'))); $YhT5x->column(3, DashboardItemA::makeIconNumberTitle('iconfont icon-list-alt', ModelUtil::count('edm_task', array()), '营销任务', modstart_admin_url('edm/task'))); $YhT5x->column(3, DashboardItemA::makeIconNumberTitle('iconfont icon-email', ModelUtil::count('edm_template', array()), '邮件模板', modstart_admin_url('edm/template'))); }); goto Cb1Np; ej0M0: AdminMenu::register(function () { return array(array('title' => 'EDM邮件营销', 'icon' => 'email', 'sort' => 150, 'children' => array(array('title' => '客户邮箱', 'url' => '\\Module\\Edm\\Admin\\Controller\\EmailController@index'), array('title' => '邮件模板', 'url' => '\\Module\\Edm\\Admin\\Controller\\TemplateController@index'), array('title' => '营销任务', 'url' => '\\Module\\Edm\\Admin\\Controller\\TaskController@index'), array('title' => '发送队列', 'url' => '\\Module\\Edm\\Admin\\Controller\\TaskItemController@index'), array('title' => '随机语料', 'url' => '\\Module\\Edm\\Admin\\Controller\\RandomController@index'), array('title' => '邮件发送器', 'url' => '\\Module\\Edm\\Admin\\Controller\\SenderController@index'), array('title' => '功能设置', 'url' => '\\Module\\Edm\\Admin\\Controller\\ConfigController@index')))); }); goto cPNfg; zBNnm: EdmMailSenderProvider::register(SmtpEdmMailSenderProvider::class); goto NnVq2; Cb1Np: } public function register() { } }