本文整理匯總了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'))));
}