Пример #1
0
 public function _show()
 {
     $oCategories = model_categories::getInstance()->findById(module_categories::getParam('id'));
     $oView = new _view('categories::show');
     $oView->oCategories = $oCategories;
     return $oView;
 }
Пример #2
0
 public function _edit()
 {
     $tMessage = $this->processSave();
     $oPosts = model_posts::getInstance()->findById(_root::getParam('id'));
     $oView = new _view('privatePosts::edit');
     $oView->oPosts = $oPosts;
     $oView->tId = model_posts::getInstance()->getIdTab();
     $oView->tJoinmodel_users = model_users::getInstance()->getSelect();
     $oView->tJoinmodel_categories = model_categories::getInstance()->getSelect();
     $oPluginXsrf = new plugin_xsrf();
     $oView->token = $oPluginXsrf->getToken();
     $oView->tMessage = $tMessage;
     $this->oLayout->add('main', $oView);
 }
Пример #3
0
 public function _show()
 {
     $oPosts = model_posts::getInstance()->findBySlug(module_posts::getParam('slug'));
     $oView = new _view('posts::show');
     $oView->oPosts = $oPosts;
     $oView->tJoinmodel_categories = model_categories::getInstance()->getSelect();
     $oView->tJoinmodel_users = model_users::getInstance()->getSelect();
     //we instance the module
     $oModuleComments = new module_comments();
     $oModuleComments->setPostId(module_posts::getParam('id'));
     //si vous souhaitez indiquer au module integrable des informations sur le module parent
     $oModuleComments->setRootLink('default::index', array('postsAction' => 'show', 'postsid' => _root::getParam('postsid')));
     //form add
     $oView->oCommentsAdd = $oModuleComments->_new();
     //comments
     $oView->oComments = $oModuleComments->_index();
     return $oView;
 }