本文整理汇总了PHP中Gdn_Controller::AddDefinition方法的典型用法代码示例。如果您正苦于以下问题:PHP Gdn_Controller::AddDefinition方法的具体用法?PHP Gdn_Controller::AddDefinition怎么用?PHP Gdn_Controller::AddDefinition使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Gdn_Controller
的用法示例。
在下文中一共展示了Gdn_Controller::AddDefinition方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: AttachButtonBarResources
/**
* Insert buttonbar resources
*
* This method is abstracted because it is invoked by two different
* controllers.
*
* @param Gdn_Controller $Sender
*/
protected function AttachButtonBarResources($Sender, $Formatter)
{
$Sender->AddCssFile('buttonbar.css', 'plugins/ButtonBar');
$Sender->AddJsFile('buttonbar.js', 'plugins/ButtonBar');
$Sender->AddJsFile('jquery.hotkeys.js', 'plugins/ButtonBar');
$Sender->AddDefinition('InputFormat', $Formatter);
}
示例2: AttachButtonBarResources
/**
* Insert buttonbar resources
*
* This method is abstracted because it is invoked by multiple controllers.
*
* @param Gdn_Controller $Sender
*/
protected function AttachButtonBarResources($Sender, $Formatter)
{
if (!in_array($Formatter, $this->Formats)) {
return;
}
$Sender->AddJsFile('buttonbar.js', 'plugins/ButtonBar');
$Sender->AddJsFile('jquery.hotkeys.js', 'plugins/ButtonBar');
$Sender->AddDefinition('ButtonBarLinkUrl', T('ButtonBar.LinkUrlText', 'Enter your URL:'));
$Sender->AddDefinition('ButtonBarImageUrl', T('ButtonBar.ImageUrlText', 'Enter image URL:'));
$Sender->AddDefinition('ButtonBarBBCodeHelpText', T('ButtonBar.BBCodeHelp', 'You can use <b><a href="http://en.wikipedia.org/wiki/BBCode" target="_new">BBCode</a></b> in your post.'));
$Sender->AddDefinition('ButtonBarHtmlHelpText', T('ButtonBar.HtmlHelp', 'You can use <b><a href="http://htmlguide.drgrog.com/cheatsheet.php" target="_new">Simple Html</a></b> in your post.'));
$Sender->AddDefinition('ButtonBarMarkdownHelpText', T('ButtonBar.MarkdownHelp', 'You can use <b><a href="http://en.wikipedia.org/wiki/Markdown" target="_new">Markdown</a></b> in your post.'));
$Sender->AddDefinition('InputFormat', $Formatter);
}
示例3: AddPasswordStrength
/**
*
* @param Gdn_Controller $Controller
*/
public function AddPasswordStrength($Controller)
{
$Controller->AddJsFile('password.js');
$Controller->AddDefinition('MinPassLength', C('Garden.Registration.MinPasswordLength'));
$Controller->AddDefinition('PasswordTranslations', T('Password Translations', 'Too Short,Contains Username,Very Weak,Weak,Ok,Good,Strong'));
}
示例4: _Emotify
/**
*
* @param Gdn_Controller $Sender
*/
private function _Emotify($Sender) {
$Sender->AddJsFile('plugins/Emotify/emotify.js');
$Sender->AddCssFile('plugins/Emotify/emotify.css');
$Sender->AddDefinition('FormatEmoticons', C('Plugins.Emotify.FormatEmoticons', TRUE));
}
示例5: AddPasswordStrength
/**
*
* @param Gdn_Controller $Controller
*/
public function AddPasswordStrength($Controller)
{
$Controller->AddJsFile('password.js');
$Controller->AddDefinition('MinPassLength', C('Garden.Registration.MinPasswordLength'));
$Controller->AddDefinition('PasswordTranslations', implode(',', array(T('Password Too Short', 'Too Short'), T('Password Contains Username', 'Contains Username'), T('Password Very Weak', 'Very Weak'), T('Password Weak', 'Weak'), T('Password Ok', 'OK'), T('Password Good', 'Good'), T('Password Strong', 'Strong'))));
}