From fde2a1de9cfca24acabe5e4ed46c8e15c890c609 Mon Sep 17 00:00:00 2001 From: xieqiyu Date: Wed, 12 Jun 2024 18:16:06 +0800 Subject: [PATCH] * [task#120262,0.5h,1h] Add the function of getSwitcher for roadmap browse. --- module/product/model.php | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/module/product/model.php b/module/product/model.php index 306f5994c4..094e162480 100755 --- a/module/product/model.php +++ b/module/product/model.php @@ -2078,4 +2078,21 @@ class productModel extends model /* 4. Clear actions older than 30 days. */ $this->loadModel('action')->cleanActions(); } + + public function getSwitcher(int $productID = 0, string $extra = ''): string + { + $currentProductName = $productID ? $this->getByID($productID)->name : $this->lang->productCommon; + + list($locateModule, $locateMethod) = $this->productTao->computeLocate4DropMenu(); + + $fromModule = $this->app->tab == 'qa' ? 'qa' : ''; + $dropMenuModule = $this->app->tab == 'qa' ? 'product' : $this->app->tab; + $dropMenuLink = helper::createLink($dropMenuModule, 'ajaxGetDropMenu', "objectID=$productID&module=$locateModule&method=$locateMethod&extra=$extra&from=$fromModule"); + + $output = "
"; + + return $output; + } }