コード例 #1
0
ファイル: class.qna.plugin.php プロジェクト: vanilla/addons
 /**
  * Override the PostController->Discussion() method before render to use our view instead.
  *
  * @param PostController $sender Sending controller instance.
  */
 public function postController_beforeDiscussionRender_handler($sender)
 {
     // Override if we are looking at the question url.
     if ($sender->RequestMethod == 'question') {
         $sender->Form->addHidden('Type', 'Question');
         $sender->title(t('Ask a Question'));
         $sender->setData('Breadcrumbs', array(array('Name' => $sender->data('Title'), 'Url' => '/post/question')));
     }
 }