• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP VanillaController类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中VanillaController的典型用法代码示例。如果您正苦于以下问题:PHP VanillaController类的具体用法?PHP VanillaController怎么用?PHP VanillaController使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



在下文中一共展示了VanillaController类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: _RenderVotingForm

 /**
  * Renders a voting form for a poll object
  * @param VanillaController $Sender controller object
  * @param stdClass $Poll poll object
  * @param boolean $Echo echo or return result string
  * @return mixed Will return string if $Echo is false, will return true otherwise
  */
 protected function _RenderVotingForm($Sender, $Poll, $PartialAnswers, $Echo = TRUE)
 {
     $Sender->PollForm = new Gdn_Form();
     $Sender->PollForm->AddHidden('DiscussionID', $Poll->DiscussionID);
     $Sender->PollForm->AddHidden('PollID', $Poll->PollID);
     if ($Sender->Data('DiscussionPollsMessage')) {
         $Sender->PollForm->AddError($Sender->Data('DiscussionPollsMessage'));
     }
     include_once $this->ThemeView('voting');
     if ($Echo) {
         DiscussionPollAnswerForm($Sender->PollForm, $Poll, $PartialAnswers);
         return TRUE;
     } else {
         ob_start();
         DiscussionPollAnswerForm($Sender->PollForm, $Poll, $PartialAnswers);
         $Result = ob_get_contents();
         ob_end_clean();
         return $Result;
     }
 }
开发者ID:Nordic-T,项目名称:vanilla-plugins,代码行数:27,代码来源:class.discussionpolls.plugin.php


示例2: Initialize

 public function Initialize()
 {
     parent::Initialize();
     $this->AddCssFile('garden.css');
     if ($this->Menu) {
         $this->Menu->HighlightRoute('/garden/settings');
     }
 }
开发者ID:jhampha,项目名称:Garden,代码行数:8,代码来源:settings.php


示例3: Initialize

 public function Initialize()
 {
     parent::Initialize();
     $this->ShowOptions = TRUE;
     $this->Menu->HighlightRoute('/discussions');
     $this->AddCssFile('vanilla.css');
     $this->AddJsFile('/js/library/jquery.gardenmorepager.js');
 }
开发者ID:robi-bobi,项目名称:Garden,代码行数:8,代码来源:discussions.php


示例4: initialize

 public function initialize()
 {
     parent::initialize();
     /**
      * The default Cache-Control header does not include no-store, which can cause issues with outdated category
      * information (e.g. counts).  The same check is performed here as in Gdn_Controller before the Cache-Control
      * header is added, but this value includes the no-store specifier.
      */
     if (Gdn::session()->isValid()) {
         $this->setHeader('Cache-Control', 'private, no-cache, no-store, max-age=0, must-revalidate');
     }
 }
开发者ID:odontomachus,项目名称:vanilla,代码行数:12,代码来源:class.categorycontroller.php


示例5: Initialize

 public function Initialize()
 {
     parent::Initialize();
     $this->ShowOptions = TRUE;
     $this->Menu->HighlightRoute('/discussions');
     $this->AddCssFile('vanilla.css');
     $this->AddJsFile('bookmark.js');
     $this->AddJsFile('discussions.js');
     $this->AddJsFile('jquery.menu.js');
     $this->AddJsFile('options.js');
     $this->AddJsFile('jquery.gardenmorepager.js');
     $this->FireEvent('AfterInitialize');
 }
开发者ID:kerphi,项目名称:Garden,代码行数:13,代码来源:class.discussionscontroller.php


示例6: Initialize

 /**
  * Include CSS for all methods.
  *
  * Always called by dispatcher before controller's requested method.
  *
  * @since 2.0.0
  * @access public
  */
 public function Initialize()
 {
     parent::Initialize();
     $this->AddCssFile('vanilla.css');
     $this->AddModule('NewDiscussionModule');
 }
开发者ID:embo-hd,项目名称:vanilla,代码行数:14,代码来源:class.postcontroller.php


示例7: __construct

 public function __construct()
 {
     parent::__construct();
     $this->CategoryModel = new CategoryModel();
 }
开发者ID:rnovino,项目名称:Garden,代码行数:5,代码来源:class.categorycontroller.php


示例8: Initialize

 public function Initialize()
 {
     parent::Initialize();
     $this->Menu->HighlightRoute('/discussions');
 }
开发者ID:kerphi,项目名称:Garden,代码行数:5,代码来源:class.discussioncontroller.php


示例9: Initialize

 public function Initialize()
 {
     parent::Initialize();
     $this->AddCssFile('vanilla.css');
 }
开发者ID:Aetasiric,项目名称:Garden,代码行数:5,代码来源:post.php


示例10: initialize

 /**
  * Highlight route & add common JS definitions.
  *
  * Always called by dispatcher before controller's requested method.
  *
  * @since 2.0.0
  * @access public
  */
 public function initialize()
 {
     parent::initialize();
     $this->addDefinition('ConfirmDeleteCommentHeading', t('ConfirmDeleteCommentHeading', 'Delete Comment'));
     $this->addDefinition('ConfirmDeleteCommentText', t('ConfirmDeleteCommentText', 'Are you sure you want to delete this comment?'));
     $this->Menu->highlightRoute('/discussions');
 }
开发者ID:caidongyun,项目名称:vanilla,代码行数:15,代码来源:class.discussioncontroller.php


示例11: initialize

 /**
  * Highlight route and include JS, CSS, and modules used by all methods.
  *
  * Always called by dispatcher before controller's requested method.
  *
  * @since 2.0.0
  * @access public
  */
 public function initialize()
 {
     parent::initialize();
     $this->ShowOptions = true;
     $this->Menu->highlightRoute('/discussions');
     $this->addJsFile('discussions.js');
     // Inform moderator of checked comments in this discussion
     $CheckedDiscussions = Gdn::session()->getAttribute('CheckedDiscussions', array());
     if (count($CheckedDiscussions) > 0) {
         ModerationController::InformCheckedDiscussions($this);
     }
     $this->CountCommentsPerPage = c('Vanilla.Comments.PerPage', 30);
     $this->fireEvent('AfterInitialize');
 }
开发者ID:karanjitsingh,项目名称:iecse-forum,代码行数:22,代码来源:class.discussionscontroller.php


示例12: Initialize

 /**
  * Highlight route.
  *
  * Always called by dispatcher before controller's requested method.
  * 
  * @since 2.0.0
  * @access public
  */
 public function Initialize()
 {
     parent::Initialize();
     if ($this->Menu) {
         $this->Menu->HighlightRoute('/categories');
     }
 }
开发者ID:tautomers,项目名称:knoopvszombies,代码行数:15,代码来源:class.categoriescontroller.php


示例13: initialize

 /**
  * Include CSS for all methods.
  *
  * Always called by dispatcher before controller's requested method.
  *
  * @since 2.0.0
  * @access public
  */
 public function initialize()
 {
     parent::initialize();
     $this->addModule('NewDiscussionModule');
     $this->CssClass = 'NoPanel';
 }
开发者ID:caidongyun,项目名称:vanilla,代码行数:14,代码来源:class.postcontroller.php


示例14: data

 /**
  * {@inheritdoc}
  */
 public function data($Path, $Default = '')
 {
     if (isset($this->Data[$Path])) {
         return $this->Data[$Path];
     }
     switch ($Path) {
         case 'Categories':
             if ($this->categoriesCompatibilityCallback instanceof \Closure) {
                 deprecated('Categories', 'CategoryTree');
                 $this->Data['Categories'] = $categories = call_user_func($this->categoriesCompatibilityCallback);
                 return $categories;
             }
             return $Default;
         default:
             return parent::data($Path, $Default);
     }
 }
开发者ID:vanilla,项目名称:vanilla,代码行数:20,代码来源:class.categoriescontroller.php


示例15: Initialize

 /**
  * Highlight route & add common JS definitions.
  *
  * Always called by dispatcher before controller's requested method.
  *
  * @since 2.0.0
  * @access public
  */
 public function Initialize()
 {
     parent::Initialize();
     $this->AddDefinition('ImageResized', T('This image has been resized to fit in the page. Click to enlarge.'));
     $this->AddDefinition('ConfirmDeleteCommentHeading', T('ConfirmDeleteCommentHeading', 'Delete Comment'));
     $this->AddDefinition('ConfirmDeleteCommentText', T('ConfirmDeleteCommentText', 'Are you sure you want to delete this comment?'));
     $this->Menu->HighlightRoute('/discussions');
 }
开发者ID:edward-tsai,项目名称:vanilla4china,代码行数:16,代码来源:class.discussioncontroller.php


示例16: Initialize

 /**
  * Highlight route.
  *
  * Always called by dispatcher before controller's requested method.
  * 
  * @since 2.0.0
  * @access public
  */
 public function Initialize()
 {
     parent::Initialize();
     if ($this->Menu) {
         $this->Menu->HighlightRoute('/categories');
     }
     $this->CountCommentsPerPage = C('Vanilla.Comments.PerPage', 30);
 }
开发者ID:remobjects,项目名称:Garden,代码行数:16,代码来源:class.categoriescontroller.php


示例17: Initialize

 public function Initialize()
 {
     parent::Initialize();
     $this->AddModule('SignedInModule');
     $this->Menu->HighlightRoute('/discussions');
 }
开发者ID:kennyma,项目名称:Garden,代码行数:6,代码来源:class.discussioncontroller.php


示例18: Initialize

 /**
  * Highlight route.
  *
  * Always called by dispatcher before controller's requested method.
  *
  * @since 2.0.0
  * @access public
  */
 public function Initialize()
 {
     parent::Initialize();
     $this->AddDefinition('ImageResized', T('This image has been resized to fit in the page. Click to enlarge.'));
     $this->Menu->HighlightRoute('/discussions');
 }
开发者ID:srikarrohit,项目名称:Vanillaforums-SSO,代码行数:14,代码来源:class.discussioncontroller.php


示例19: initialize

 /**
  * Highlight route.
  *
  * Always called by dispatcher before controller's requested method.
  *
  * @since 2.0.0
  * @access public
  */
 public function initialize()
 {
     parent::initialize();
     if (!c('Vanilla.Categories.Use')) {
         redirect('/discussions');
     }
     if ($this->Menu) {
         $this->Menu->highlightRoute('/categories');
     }
     $this->CountCommentsPerPage = c('Vanilla.Comments.PerPage', 30);
     /**
      * The default Cache-Control header does not include no-store, which can cause issues with outdated category
      * information (e.g. counts).  The same check is performed here as in Gdn_Controller before the Cache-Control
      * header is added, but this value includes the no-store specifier.
      */
     if (Gdn::session()->isValid()) {
         $this->setHeader('Cache-Control', 'private, no-cache, no-store, max-age=0, must-revalidate');
     }
 }
开发者ID:R-J,项目名称:vanilla,代码行数:27,代码来源:class.categoriescontroller.php


示例20: initialize

 /**
  * Include CSS for all methods.
  *
  * Always called by dispatcher before controller's requested method.
  *
  * @since 2.0.0
  * @access public
  */
 public function initialize()
 {
     parent::initialize();
     $this->CssClass = 'NoPanel';
 }
开发者ID:vanilla,项目名称:vanilla,代码行数:13,代码来源:class.postcontroller.php



注:本文中的VanillaController类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP VardefManager类代码示例发布时间:2022-05-23
下一篇:
PHP Value类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap