public function doDeleteTopicAction() { $tids = $this->getInput('tids'); if (!$tids) { $this->showError('operate.select'); } Wind::import('SRV:forum.srv.operation.PwDeleteTopic'); Wind::import('SRV:forum.srv.dataSource.PwFetchTopicByTid'); $srv = new PwDeleteTopic(new PwFetchTopicByTid($tids), new PwUserBo($this->adminUser->getUid())); $srv->execute(); $this->showMessage('删除成功了'); }
/** * 删除主题 */ public function doDeleteTopicAction() { $tids = $this->getInput('tids'); Wind::import('SRV:forum.srv.operation.PwDeleteTopic'); Wind::import('SRV:forum.srv.dataSource.PwFetchTopicByTid'); $srv = new PwDeleteTopic(new PwFetchTopicByTid($tids), $this->loginUser); $srv->execute(); $this->showMessage('删除成功了'); }
public function run($uid) { $operator = new PwDeleteTopic(new PwGetTopicByUid($uid), $this->operator); $operator->execute(); }