public function run() { $folderList = $this->_getEmotionService()->getFolderList(); $catList = $this->_getEmotionCategoryDs()->getCategoryList(); foreach ($catList as $k => $cat) { /*$_apps = explode('|', $cat['emotion_apps']); $_appName = ''; foreach ((array)$_apps AS $_app) { $_appName .= $this->_getEmotionService()->getAppcationList($_app) .','; } $catList[$k]['apps'] = $_apps; $catList[$k]['appsname'] = $_appName;*/ if (Pw::inArray($cat['emotion_folder'], $folderList)) { foreach ($folderList as $key => $folder) { if ($cat['emotion_folder'] == $folder) { unset($folderList[$key]); } } } } $this->setOutput($this->_getEmotionService()->getAppcationList(), 'appList'); $this->setOutput($catList, 'catList'); $this->setOutput($folderList, 'folderList'); }