本文整理汇总了PHP中VanillaController::Title方法的典型用法代码示例。如果您正苦于以下问题:PHP VanillaController::Title方法的具体用法?PHP VanillaController::Title怎么用?PHP VanillaController::Title使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类VanillaController
的用法示例。
在下文中一共展示了VanillaController::Title方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: SettingsController_DiscussionPolls_Create
/**
* Creates a settings page at /dashboard/settins/discussionpolls
* @param VanillaController $Sender SettingsController
*/
public function SettingsController_DiscussionPolls_Create($Sender)
{
$Sender->Permission('Garden.Settings.Manage');
$Sender->AddCSSFile($this->GetResource('design/settings.discussionpolls.css', FALSE, FALSE));
$Validation = new Gdn_Validation();
$ConfigurationModel = new Gdn_ConfigurationModel($Validation);
$ConfigurationModel->SetField(array('Plugins.DiscussionPolls.EnableShowResults'));
$ConfigurationModel->SetField(array('Plugins.DiscussionPolls.DisablePollTitle'));
$Sender->Form->SetModel($ConfigurationModel);
if ($Sender->Form->AuthenticatedPostBack() === FALSE) {
$Sender->Form->SetData($ConfigurationModel->Data);
} else {
if ($Sender->Form->Save() !== FALSE) {
$Sender->InformMessage('<span class="InformSprite Sliders"></span>' . T('Your changes have been saved.'), 'HasSprite');
}
}
// Makes it look like a dashboard page
$Sender->AddSideMenu('/dashboard/settings/discussionpolls');
$Sender->Title('Discussion Polls Settings');
$Sender->Render($this->ThemeView('settings'));
}