<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace Module\Vendor\Admin\Controller; use Illuminate\Routing\Controller; use ModStart\Core\Dao\ModelManageUtil; use ModStart\Core\Dao\ModelUtil; use ModStart\Core\Util\TreeUtil; use ModStart\Module\ModuleManager; class WidgetLinkController extends Controller { private function build($jjCp8, $tDXBC) { if (empty($tDXBC)) { return null; } return array('title' => $jjCp8, 'list' => array_filter(array_map(function ($qgfZ7) { return $qgfZ7 ? array('title' => $qgfZ7[0], 'link' => $qgfZ7[1]) : null; }, $tDXBC))); } public function select() { goto iys_e; VmCF9: if (ModuleManager::isModuleInstalled('News')) { $m62oh[] = $this->build('新闻资讯', array_merge(array(array('新闻资讯', modstart_web_url('news'))), array_map(function ($Lu5WV) { return array('|-' . $Lu5WV['title'], modstart_web_url("news?categoryId={$Lu5WV['id']}")); }, ModelUtil::all('news_category')))); } goto DXDGT; tXTY8: return view('modstart::admin.dialog.linkSelector', array('links' => array_filter($m62oh))); goto MFxoq; BYOTi: if (ModuleManager::isModuleInstalled('CmsJob')) { $m62oh[] = $this->build('招聘', array_merge(array(array('招聘', modstart_web_url('job'))), array_map(function ($Lu5WV) { return array('|-' . $Lu5WV['title'], modstart_web_url("job/{$Lu5WV['id']}")); }, ModelUtil::all('cms_job')))); } goto n9X8V; ltTx0: if (ModuleManager::isModuleInstalled('Post')) { goto zwx6W; ZIc3F: $m62oh[] = $this->build('分类文章', array_merge(array_map(function ($Lu5WV) { return array(str_repeat('|-', $Lu5WV['level']) . $Lu5WV['title'], modstart_web_url("post?categoryId={$Lu5WV['id']}")); }, $vKRZ2))); goto Bk3xj; zwx6W: $oju_U = TreeUtil::modelToTree('post_category', array('title' => 'title')); goto LnK5o; LnK5o: $vKRZ2 = TreeUtil::treeToListWithLevel($oju_U); goto ZIc3F; Bk3xj: } goto VmCF9; L_edF: if (ModuleManager::isModuleInstalled('Product')) { $m62oh[] = $this->build('产品', array_merge(array(array('产品', '/product')), array_map(function ($Lu5WV) { return array('|-' . $Lu5WV['title'], modstart_web_url("product?categoryId={$Lu5WV['id']}")); }, ModelUtil::all('product_category')))); } goto ltTx0; DXDGT: if (ModuleManager::isModuleInstalled('Cases')) { $m62oh[] = $this->build('案例', array_merge(array(array('案例', modstart_web_url('case'))), array_map(function ($Lu5WV) { return array('|-' . $Lu5WV['title'], modstart_web_url("case?categoryId={$Lu5WV['id']}")); }, ModelUtil::all('news_category')))); } goto BYOTi; ciXGH: if (ModuleManager::isModuleInstalled('LandingPage')) { $n9SfG = ModuleManager::getModuleConfig('LandingPage', 'prefix', modstart_web_url('p/')); $m62oh[] = $this->build('落地页', array_map(function ($Lu5WV) use($n9SfG) { return array($Lu5WV['title'], $n9SfG . $Lu5WV['url']); }, ModelUtil::all('landing_page'))); } goto L_edF; ULTdX: if (ModuleManager::isModuleInstalled('CmsHelp')) { goto JcWhr; JcWhr: $oju_U = TreeUtil::modelToTree('cms_help_category', array('name' => 'name')); goto WTWw5; WTWw5: $R3Flm = TreeUtil::treeToListWithIndent($oju_U, 'id', 'name'); goto rFfWm; rFfWm: $m62oh[] = $this->build('帮助', array_merge(array(array('帮助', '/help')), array_map(function ($Lu5WV) { return array('|-' . $Lu5WV['title'], modstart_web_url("help/category/{$Lu5WV['id']}")); }, $R3Flm))); goto y0s1f; y0s1f: } goto tXTY8; DGVHA: $m62oh[] = $this->build('系统', array(array('首页', modstart_web_url('')))); goto EduVq; n9X8V: if (ModuleManager::isModuleInstalled('CmsBook')) { $m62oh[] = $this->build('预约', array(array('接口-预约提交', modstart_web_url('book/submit')))); } goto ULTdX; iys_e: $m62oh = array(); goto DGVHA; EduVq: foreach (ModuleManager::listAllInstalledModules() as $DOMdu => $NQdhK) { $xiCdH = '\\Module\\' . $DOMdu . '\\Widget\\AdminLinkWidget'; if (class_exists($xiCdH)) { $m62oh = array_merge($m62oh, $xiCdH::all()); } } goto ciXGH; MFxoq: } }