/** * 初始化 */ public function init() { parent::init(); $this->view->baseUrl = $this->_request->getBaseUrl(); $this->view->article = new ArticleModel(); $this->view->layout = array('title' => '文章管理', 'action' => array('list' => array('url' => array('module' => 'admin', 'controller' => 'article', 'action' => 'list'), 'text' => '文章列表'), 'add' => array('url' => array('module' => 'admin', 'controller' => 'article', 'action' => 'add'), 'text' => '添加文章')), 'current' => $this->module['action']); $mcate = new CategoryModule(); $this->view->db = $mcate->getDb(); $this->view->cate = new YUN_Cate($this->view->db); $this->view->treeRow = $this->view->cate->jqCateList(); }
/** * 根据直播视频的id 查询对应的类型、 内容、 标签 并赋值给视频直播 * @param unknown $video */ public function save_foreign($video) { $categoyMod = new CategoryModule(); $tagMod = new TagModule(); $sectTab = new SectionTable(); $category = $categoyMod->get_by_id($video->category->id); $sect_list = $sectTab->get_sec_by_videoId($video->id); $tag_list = $tagMod->get_video_tag_by_videoId($video->id); $video->category = $category; // 存入类型 $video->content = $sect_list; // 存入内容 $video->tags = $tag_list; // 存入标签 }